How to solve the Navicat for MySQL 1045 error in Linux
When connecting to the MySQL database, Navicat will inevitably encounter a 1045 error, mainly because the user's user name or password is incorrect and access is denied. If you do not want to reinstall it, you need to retrieve the password or reset the password.
Navicat for MySQL 1045 Error
Problem description:
1045-Access denied for user 'root' @ 'localhost' (using password: YES)
Cause analysis:
When you log on to the MySQL database and see Error 1045, the user name or password you entered is denied access. The simplest solution is to uninstall and reinstall the MySQL database, however, the disadvantage is that the information in the database will be lost. If you do not want to reinstall it, you need to retrieve the password or reset the password. There are many solutions. The following method applies to Linux systems. If you want to find a solution suitable for Windows, you can view the article: how to solve the Navicat for MySQL 1045 error.
Solution:
1. Stop the service
Run:/etc/init. d/mysqlstop
Your machine may not be/etc/init. d/mysql or/etc/init. d/mysqld. You can run the find command to find it.
2. Skip Verification
Run:/usr/local/mysql/bin/mysqld_safe -- skip-grant-tables>/dev/null 2> & 1 &
If the location of mysqld_safe is different, you can use the find command to find it.
3. Change the password
Run:
Log on to mysql:/usr/local/mysql/bin/mysql-u root mysql
Change PASSWORD: mysql> UPDATEuserSETpassword = PASSWORD ('newpswd ') WHEREuser = 'root'
Refresh the MySQL permission-related table: mysql> flushprivileges
Exit MySQL: mysql> exit
4. Restart the service
Run:
Close the mysql process: killall mysqld
Start mysql service:/etc/init. d/mysql start
It is easier to solve the Navicat for MySQL 1045 error in Linux. You can solve the problem by following the above steps.
This article comes from: http://www.formysql.com/wenti/Linux-1045.html