1.安装

sudo apt-get install mysql-server mysql-client

2.改密码登录(默认root没有密码)

sudo mysql -v

Linux安装mysql

use mysql;
select host,user,plugin,authentication_string from user; 

Linux安装mysql

--设置密码
update user 
set plugin="mysql_native_password",authentication_string=password('123456') 
where user="root";

--应用修改
FLUSH PRIVILEGES;

Linux安装mysql

3.离开

quit;

4.重新登入

Linux安装mysql

相关文章:

  • 2021-09-17
  • 2021-05-09
  • 2021-10-13
  • 2021-07-12
  • 2021-07-17
  • 2021-07-23
猜你喜欢
  • 2022-03-10
  • 2021-06-26
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-12-23
  • 2021-12-07
相关资源
相似解决方案