How to solve the Navicat for MySQL 1045 error in Linux

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.