sudo apt-get install mysql-server mysql-client
中途需要输入密码或按Y确认
查看是否存在文件,存在说明安装完成
cat /etc/mysql/my.cnf
使用sudo进入MySQL 修改密码
sudo mysql -u root -p
一次运行以下命令 修改密码,下面的 password 替换你的密码
update mysql.user set plugin="mysql_native_password" where user="root";
grant all on *.* to root@"localhost";
update mysql.user set authentication_string=password('这里是你的密码') where user='root'and Host = 'localhost';
flush privileges;
之后用普通用户登录一下看看
mysql -u root -p
![](https://img.haomeiwen.com/i5286870/79b63e19cbb60ba4.png)
Navicat安装
替换/usr/share/navicat/Navicat下的Navicat.exe
网友评论