0
点赞
收藏
分享

微信扫一扫

[1688]jsp工资投放管理系统Myeclipse开发mysql数据库web结构java编程计算机网页项目

冶炼厂小练 2024-04-30 阅读 7

参考:

ubuntu18.04 首次登录mysql未设置密码或忘记密码解决方法_ubuntu中mysql设置密码-CSDN博客

1. use mysql; #连接到mysql数据库
2. update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost'; #修改密码123456是密码
3. update user set plugin='mysql_native_password';
4. flush privileges;
5. quit;

执行到2步报错:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(‘123456’) where user=‘root’ and Host =‘localhost’' at line 1
替换为:

mysql> SET PASSWORD = '123456';

又报错:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

解决:

ERROR 1819 (HY000) Your password does not satisfy the current policy requirements-阿里云开发者社区 (aliyun.com)

正确的完整流程如下:

上述步骤执行成功后,执行

service mysql start # 启动
sudo mysql -u root -p # 登录

报错: ERROR 1045 (28000): Access denied for user ‘debian-sys-maint‘@‘localhost‘ 

参考:【问题解决记录】Ubuntu mysql修改密码错误 ERROR 1045 (28000): Access denied for user ‘debian-sys-maint‘@‘localhost‘_error 1045 (28000): access denied for user 'debian-CSDN博客

举报

相关推荐

0 条评论