1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Access denied for user ‘root‘@‘localhost‘ (using password: YES)

时间:2022-04-03 07:02:21

相关推荐

Access denied for user ‘root‘@‘localhost‘ (using password: YES)

ubuntu mysql密码不对

sudo gedit /etc/mysql/mysql.conf.d/f

[mysqld]

下一行添加用来跳过密码验证

skip-grant-tables

重启mysql

/etc/init.d/mysql restart

然后终端输入mysql

mysql>usemysql;

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

mysql>flushprivileges;

mysql>quit

此时新密码为123456

然后再去/etc/mysql/mysql.conf.d/f

去掉skip-grant-tables

然后输入

mysql -u root -p

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。