Mysql forgot password ---- modify Navicat connection password - and - (no password is set to join install Navicat) Sometimes the new connection password, the connection is unsuccessful --- problem-solving methods to solve a forgotten password

Password Forgot solution

Can refer http://jingyan.baidu.com/article/454316ab4e9e65f7a7c03ad1.html

1, the installation path (copy installation path)

2. Open a command prompt cmd

Shortcuts: windows + R

Open which disk (e.g. disk D open): Input D:

Paste the installation path (just copy the path)

3, open the Task Manager to end the process mysqld.exe

Enter the Task Manager shortcut: ctrl + shift + delete

Start Task Manager

Find the process

Find mysqld.exe process - "End Process (to ensure mysql server has finished running)

Input command mysqld --skip-grant-tables the transport, then skip the mysql user authentication. (Note Enter this command after the command line can not operate, and then you can then open a new command line.)

4, open a new Task Manager

Enter the path to the folder,

 Mysql input

 

 5. Enter show databases; you can see all the database description successful landing. (Note that the command has a semicolon final, or is error)

 

6, the input use mysql; select mysql database.

7, show tables to see all the tables, you will find a user table, where the store is a user name, password, permissions, and so account information.

 

8, input select user, host, authentication_string as password from user; to view account information.

 

 

 

 

 9, change the root password, input update user set authentication_string = password ( '123456') where user = 'root' and host = 'localhost'; (semicolon at the end note)

 

 

 

10、重复8、(8、输入select user,host, authentication_string as password from user;  来查看账户信息。)////此时Navicat新建的连接就可以设置不同密码了

(1)user(用户名):root;host(主机名/IP地址):localhost;password:123456

 (2)user(用户名):root;host(主机名/IP地址):127.0.0.1;password:123456

 (3)user(用户名):root;host(主机名/IP地址):127.0.0.1::1;password:123456

 (4)user(用户名):;host(主机名/IP地址):localhost;password:(这一项,用户名和密码是空)

11、退出命令行,重启数据库,输入mysql -u root -p

然后需要你输入密码123456

出现下面就是对的

 

 

五、navicat for mysql下载,安装,测试连接

1、下载

建议去官方下载,但是PatchNavicat没有破解,就会只有14天时间试用期

我给出一个百度云的链接

http://pan.baidu.com/s/1hsFdP5a

提取码:zgi5

2、安装

下载完之后,安装(点击那个exe就行)

然后用个破解工具PatchNavicat.exe(很容易使用,点击exe就行)

弹出下图就是成功破解

弹出下图就是失败,(一般在你安装完软件之后之后运行破解工具,就行)

 3、测试

(1)进入主页面,新建mysql链接

(2)填属性

连接名:自己取

“主机名/IP地址”以及“用户名”和“密码”:按照你电脑的内容(见上面“”四,10内容“”)

(1)user(用户名):root;host(主机名/IP地址):localhost;password:123456

 (2)user(用户名):root;host(主机名/IP地址):127.0.0.1;password:123456

 (3)user(用户名):root;host(主机名/IP地址):127.0.0.1::1;password:123456

 (4)user(用户名):;host(主机名/IP地址):localhost;password:(这一项,用户名和密码是空)

然后点击测试连接,这个必须点这个测试连接,这样才知道你的数据库与这个可视化工具navicat for sql是否正常链接到数据库。

下面是显示成功:

然后点击确定,就可以了

4、新建一个表,如下图所示。

Guess you like

Origin www.cnblogs.com/fanblogs/p/12082933.html