ubuntu下安装mysql问题汇总
apt安装完mysql后,用mysql_secure_installation设置总是提示Securing the MySQL server deployment.Enter password for user root:Error: Access denied for user 'root'@'localhost'mysql5.7以后,增加的安全机制,默认有个root的密码,但是apt直接安装的
·
- apt安装完mysql后,用mysql_secure_installation设置总是提示
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost'
mysql5.7以后,增加的安全机制,默认有个root的密码,但是apt直接安装的,并不清楚这个东西
解决方法,直接
sudo mysql_secure_installation
或者在root账户下也行
- mysql安装后只能sudo登陆,解决方法如下:
sudo vim /etc/mysql/my.cnf
添加:
[mysqld]
skip-grant-tables
然后重启mysql服务
sudo systemctl restart mysql
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)