Mysql Workbench access denied

Asked

Viewed 1,129 times

0

Good afternoon, I am having problems in mysql Workbench, is giving permission denied, but when I enter the terminal as superuser I get access.

(image access denied on Workbench) inserir a descrição da imagem aqui

(Terminal access image as root) inserir a descrição da imagem aqui

(code of my.cnf)

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
  • Which distro are you using? how’s port 3306 on the firewall?

  • I am using Debian 9 and the port is open for mysql

  • Possible problems: Formatted port 3306 Mysql is not configured to receive external connections, because the terminal you can because you are making a local connection. Check the mysql configuration file and free it for external access.

  • @Alessandroschneider which configure file? my.cnf , debian.cnf, mysql.cnf, or mariadb.cnf? because none of them has specified port.

  • to free external access just comment the line bind-address = 127.0.0.1 in your my.cnf file

  • @Alessandroschneider my file does not have this line, I will edit the publication with the codes of my.cnf

  • 1

    You can edit this file you posted, or you can include it by specifying a new configuration file. You can have more details on https://mariadb.com/kb/en/library/configuring-mariadb-with-mycnf/

Show 2 more comments

1 answer

1

use mysql db and the command below.

UPDATE user SET plugin = 'mysql_native_password' WHERE user = 'root';
FLUSH PRIVILEGES;
  • 2

    This is the Portuguese community of Stackoverflow. Translate your answer to English.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.