Linux安装mysql
1.安装
sudo apt-get install mysql-server mysql-client
2.改密码登录(默认root没有密码)
sudo mysql -v
use mysql;
select host,user,plugin,authentication_string from user;
--设置密码
update user
set plugin="mysql_native_password",authentication_string=password('123456')
where user="root";
--应用修改
FLUSH PRIVILEGES;
3.离开
quit;
4.重新登入