1、创建一个新用户
GRANT ALL on *.* to 'username' identified by "xuys1234";

2 修改配置
sudo vim /etc/mysql/my.cnf
bind-address           = 127.0.0.1 这一行要注释

3 重启mysql
sudo /etc/init.d/mysql restart

如果需要改密码,通过下面的语句
UPDATE user SET password=PASSWORD("new password") WHERE user='name'; FLUSH PRIVILEGES;

相关文章:

  • 2021-12-26
  • 2021-06-21
  • 2021-07-01
  • 2021-07-19
  • 2021-12-02
  • 2022-02-23
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2021-06-03
  • 2021-06-25
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-05-07
相关资源
相似解决方案