mysql安装及修改密码

MySQL5.7更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'field list'

C:\Users\Administrator>mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

解决:修改密码

安装

mysqld install

启动

net start mysql

 

https://blog.csdn.net/u010603691/article/details/50379282

1.

net stop mysql

2.

D:\soft\mysql-5.7.14-winx64>mysqld -console --skip-grant-tables --shared-memory

mysqld --skip-grant-tables 回车

1. 关闭正在运行的MySQL服务。 2. 打开DOS窗口,转到mysql\bin目录 3. 输入mysqld --skip-grant-tables 回车 --skip-grant-tables 的意思是启动MySQL服务的时候跳过权限表认证。 4. 再开一个DOS窗口(因为刚才那个DOS窗口已经不能动了),转到mysql\bin目录。 5. 输入mysql回车,如果成功,将出现MySQL提示符 >。 6. 连接权限数据库: use mysql; (别忘了最后加分号) 。 7. 改密码:update user set password=password("123") where user="root"; (别忘了最后加分号) 。 如果修改密码出现 **mysql修改密码错误 ERROR 1054 (42S22)** 则使用 mysql>update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';

3.

mysql> update mysql.user set authentication_string=password('root') where user='root';

所以更改语句替换为update mysql.user set authentication_string=password('root') where user='root' ;即可

4.

use mysql;

5.更新权限

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

6.

mysql> quit

7.

D:\soft\mysql-5.7.14-winx64>mysql -uroot -p

 

 

 

【MySQL】Navicat连接mysql出现1862错误

 

管理员权限运行命令:mysqladmin -uroot -p password,

enter password : root

new password : 123

 

posted @ 2022-01-08 19:32  小墨di  阅读(213)  评论(0编辑  收藏  举报