deepin mysql5.7卸载与安装
deepin mysql卸载
- sudo apt purge mysql-*
- sudo rm -rf /etc/mysql/ /var/lib/mysql
- sudo apt autoremove
- mysql -u root -p 测试
1:安装mysql 5.7: sudo apt-get install -y mysql-server mysql-client
2:打开终端输入以下命令: sudo mysql -uroot -p
3:进行mysql密码修改:
1. update mysql.user set plugin="mysql_native_password" where user="root";
2. grant all on *.* to root@"localhost";
3. update mysql.user set authentication_string=password('123456') where user='root'and Host = 'localhost';
4. flush privileges;
5. 测试:mysql -uroot -p