Navicat some problems and solutions for connecting MySQL database

Source: Internet
Author: User

Objective

Installing MySQL database and navicat is not a difficult task, the key is how to make them work spent my whole day, and finally get it done. Encountered a variety of problems, the Internet to read a large number of blogs, found that many blogs are direct copy or not very good answers to their own problems. Here is a record of your problems and rescue plan.

About Software

Navicat and MySQL directly on the official web download can, installation is very convenient. Navicat is a fee-based software, if you think you can buy, if you want to crack, there are a lot of tutorials online (P.S: Here is not recommended to download "Green version" or "Perfect cracked version", is likely to be rogue software or is not complete features, now download feel can use, Follow-up development will encounter a variety of bugs, so it is recommended to download the official genuine, and then cracked. Pp. S: Here does not give the method is because, the crack tool in the late may be because the product upgrade changes, resulting in not piglet, so here does not give a crack tutorial. )

Problems encountered

Here only to talk about their own problems and solutions (do not know is the version of the problem, anyway, the Internet can search the solution I have actually tried it again ...)

About unable to start MySQL

1067: Your MySQL service does not open, go to the Task Manager, service, see if the MySQL service is turned on in the directory, if it is the MySQL developer version, there should be MySQL and MySQL80 both services, as long as MySQL80 is open on behalf of your service opened successfully.

3534: This should be the most common mistake. The possible reason is that your mysqld process or other process is actually taking up port 3306, and you can kill the process, which is a relatively low cause. The most common can be tried in the following ways:
will be C:\Program Files\MySQL\MySQL Server 8.0\bin added to the environment variable path, where the path may not be the same as mine, fill in your own path;

Enter C:\Program Files\MySQL\MySQL Server 8.0 , first see if there is a data folder
1. If there is no Data folder C:\Program Files\MySQL\MySQL Server 8.0\bin to enter the directory, SHIFT + right click, click into the Command Window (CMD window), enter the following command:

mysqld --installmysqld --initializenet start mysql

2. If there is a data folder, all the files in the Data folder will be emptied or removed before entering the C:\Program Files\MySQL\MySQL Server 8.0\bin execution:

mysqld -removemysqld --installmysqld --initializenet start mysql

If it's still 3534, restart your computer and try restarting the service. Because 3534 of the total is the port is occupied, the service did not open successfully, the Data folder has a problem, not joined the path caused by these reasons.

1405: This is the most let me headache problem, finally solved the service open problem, but unable to login. Login to C:\Program Files\MySQL\MySQL Server 8.0\bin Enter the cmd window mysql -u root -p and then enter the password to log in, but there will be 1405 error, there are the following two reasons:
1. Lose the password, make sure it is correct, but always error. This is probably the problem you configured Navicat, changed the encryption rules, so the MySQL command window can not be entered. Here I would recommend reloading MySQL server because it is the most convenient.
2. Do not remember the password, the encryption method has not changed. First net stop mysql Stop the MySQL service and then find the My.ini File open for modification (typically in the MySQL installation directory C:\Program Files\MySQL\MySQL Server 8.0‘,但也有可能是在 C:\ProgramData\MySQL\MySQL Server 8.0 下,ProgramData需要打开“显示隐藏文件的功能”) 在my.ini中的[mysqld]下加上skip_grant_tables跳过权限检查,保存。 然后登陆 mysql-u root-p ', At this time, you need to enter a password a carriage return can be landed, and then through the following command:

#将数据库切换至mysql库mysql> USE mysql;#修改密码mysql> UPDATE user SET password=PASSWORD(‘newpasswd’)WHERE user=’root’; #刷新MySQL权限相关的表mysql> flush privileges;mysql> exit;

After the password is changed successfully, delete or add the # comment to the SKIP permission statement added to the My.ini file. Restart the service and log in with the modified password.

About Navicat

If solve the problem successfully, in fact Navicat encountered the problem is very little, basically only 2059 error.
2059:2059 This error occurs because the encryption rule is mysql_native_password in the previous version of Mysql8, and the encryption rule after Mysql8 is aching_sha2_password. We can modify the encryption rules for MySQL user login to Mysql_native_password.
Make sure you can enter the window that mysql> this input command,

第一条: ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;第二条: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';#注意此处的password为你的登陆密码,本人的操作为:第一条: ALTER USER 'root'@'localhost' IDENTIFIED BY '123****' PASSWORD EXPIRE NEVER;第二条: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123****';
About deleting MySQL

If you find that you really don't know why you're making a mistake and you've tried all sorts of things, chances are you've changed some of the configuration in your attempt, so you can reinstall MySQL. In addition to using the installer to uninstall, you also need to clear the Regedit registry information, you can refer to this blog

Eventually

Navicat some problems and solutions for connecting MySQL database

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.