Created
November 13, 2012 13:32
-
-
Save caok/4065776 to your computer and use it in GitHub Desktop.
mysql配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
配置外部访问帐号密码 | |
本地登录mysql | |
mysql -u root -p | |
执行 | |
grant all on *.* to rails@'client_ip' identified by 'password' with grant option; | |
例子:所有局域网客户端都可访问 | |
grant all on *.* to root@'192.168.0.%' identified by 'root' with grant option; | |
例子:为boyu数据库设置用户boyu | |
grant all on boyu.* to boyu@'192.168.0.%' identified by 'p4ssword'; | |
app_server_id为APP应用服务器的IP | |
设置mysql外部能访问 | |
/etc/mysql/my.cnf | |
注释到下面这行 | |
bind-address = 127.0.0.1 | |
重启mysql-server | |
sudo service mysql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment