ubuntu16.04 mysql
安装
sudo apt install mysql-server
sudo apt install mysql-client
sudo apt install libmysqlclient-dev
启动
sudo /etc/init.d/mysql start
默认密码
$ sudo cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = vD1ljVDCbCo6nkP5
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = vD1ljVDCbCo6nkP5
socket = /var/run/mysqld/mysqld.sock
卸载
sudo /etc/init.d/mysql stop
sudo apt remove mysql
sudo apt remove mysqld
sudo apt remove mysqldsudo apt-get autoremove --purge mysql-server-5.7
sudo rm /var/lib/mysql/ -R
sudo rm /etc/mysql/ -R
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor
网友评论