Loading

🔨Deepin 安装 MySQL

🔨Deepin 安装 MySQL

参考文章:https://blog.csdn.net/sinat_37064286/article/details/82224562

1. 检查是否安装过 MySQL

mysql -V

如果有的话就删除

sudo apt autoremove mysql-server mysql-client

2. 安装 MySQL

sudo apt autoremove mysql-server mysql-client

3. 进入 MySQL

进入MySQL

mysql -u root -p

提示输入密码时直接回车,不输入密码,安装完成后默认是无密码的

如果进不去: 
首先查看 sudo cat /etc/mysql/debian.cnf 
这个文件中包含有密码

或者直接删了再重装一遍

4. 更改密码

mysql> use mysql;
mysql> select host,user,plugin,authentication_string from user;  
mysql> update user set plugin="mysql_native_password",authentication_string=password('新密码') where user="root";
mysql> FLUSH PRIVILEGES;

5. 最后

推荐一个免费的数据库管理软件: Dbeaver 社区版 
下载地址 DBeaver Community

posted @ 2020-07-22 12:44  Rubrum  阅读(258)  评论(0)    收藏  举报