如果mysqld进程在了,你就看看/var/lib/mysql/mysql.sock是否存在
1、update修改password应该是hash值的MySQL>update user set password=password(‘123456’) where user=’root’
2、set修改mysql的Hash密码
MySQL>SET PASSWORD FOR ‘root′@’localhost’ = PASSWORD('123456’)
3、用mysqladmin命令修改密码
Shell>mysqladmin -uroot -poldpassword password 123456
4、用grant修改或create user时设置密码
MySQL>grant all privileges on db01.* to user01@”localhost” Identified by “newpassword”
MySQL>CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'newpass'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)