1.查看ubuntu下装了什么软件:
dpkg -l
2.删除mariadb:
apt-get autoremove --purge mariadb-server-10.0
apt-get remove mariadb-server
apt-get autoremove mariadb-server
apt-get remove mysql-common
3.安装mysql
apt-get install mysql-server
4.更新密码
update user set password=password(‘new_password‘) where user=‘root‘
flush privileges;
5.启动mysql
sudo /etc/init.d/mysql restart
6.外部连接:
grant all on *.* to [email protected]"%" identified by "root";
flush privileges;
时间: 2025-01-02 00:28:50