Problems in the process of using Mysql

1. The solution to the error Public Key Retrieval is not allowed when DBeaver connects to MySQL

Change the value of allowPublicKeyRetrieval in Driver properties to True.

2. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) when logging in to MySQL

solution:

1. Stop the mysql database: systemctl stop mysqld

2. Start MySQL with the following command, without checking permissions:

mysqld --skip-grant-tables &

Another error was reported at this time: 2018-02-01T02:52:55.093724Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

Execute the command: mysqld --user=root --skip-grant-tables &

3. Log in to mysql: mysql -uroot or mysql

4. Update the root password

Versions below mysql5.7: UPDATE mysql.user SET Password=PASSWORD('123456') where USER='root';

mysql5.7版本:UPDATE mysql.user SET authentication_string=PASSWORD('123456') where USER='root';

5. Refresh privileges: flush privileges;

6. Exit mysql: exit or quit

7. Re-login to mysql using the root user

mysql -u root -p

Enter password:<Enter the new password 123456>

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324236649&siteId=291194637
Recommended