笨笨还天狼、

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

操作1:"apt install mysql-server"

操作2: ”systemctl status mysql.service“     状态正常进行操作3

操作3:   "vim /etc/mysql/mysql.conf.d/mysqld.cnf"  修改值为 "bind-address=0.0.0.0"

操作4:”mysql -u root -p“   默认无密码直接登录

操作5:

         "create user 'root'@'%' identified by '123456';"

         "grant all privileges on *.* to 'root'@'%';"

         "alter user 'root'@'%' identified with mysql_native_password by '123456';"

         "alter user 'root'@'localhost' identified with mysql_native_password by '123456';"

         "FLUSH PRIVILEGES;"

操作6:返回操作4  使用新密码登录  成功即可以使用

 

posted on 2022-01-13 19:11  笨笨还天狼、  阅读(195)  评论(0)    收藏  举报