1查看默认的用户以及密码:

sudo vi /etc/mysql/debian.cnf

2记录用户名以及密码(可以用该账号登录不用重新设置)

以下步骤为设置账户和密码:

 3 mysql -u debian-sys-maint -p

     Enter password 输入记录下来的密码

4进入到mysql

ubuntu安装mysql没有密码提示解决

5设置用户密码(假设为123456)

更改密码,然后出现一个警告

ubuntu安装mysql没有密码提示解决

6解决警告:

ubuntu安装mysql没有密码提示解决

7更改所有权退出关闭打开

ubuntu安装mysql没有密码提示解决

 

 

完毕

注意:注意符号必须是英文符号

卸载:

sudo apt-get autoremove --purge mysql-server-5.7

sudo apt-get remove mysql-server

sudo apt-get autoremove mysql-server

sudo apt-get remove mysql-common

残余清理

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

 

相关文章:

  • 2021-12-03
  • 2022-01-20
  • 2021-12-04
  • 2021-11-21
  • 2022-01-25
  • 2021-12-29
  • 2021-09-30
  • 2021-05-11
猜你喜欢
  • 2021-11-16
  • 2021-03-30
  • 2021-07-29
  • 2022-12-23
  • 2021-08-24
  • 2021-12-29
相关资源
相似解决方案