Goodspeed

导航

远程链接mysql

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;

posted on 2010-03-29 13:26  Goodspeed  阅读(196)  评论(0编辑  收藏  举报