1, update my.cnf to make it liston to ip address, not localhost
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
bind-address = 6.31.83.19
2, Save the file and Restart the mysql server, enter:
# /etc/init.d/mysql restart
3, Update your mysql database user privileges
A: If you want to update existed account, you may do:
mysql> update user set Host='%' where user='greg';
mysql> flush privileges ;
Host='%' means allow user greg access this mysql server from any IP address.
If you want a specified IP, you can do
mysql> use mysql
mysql> update user set Host='6.6.6.6' where user='greg';
mysql> flush privileges ;
B, Or you can use grant
mysql> CREATE DATABASE foo;
mysql> GRANT ALL ON foo.* TO greg@'6.6.6.6' IDENTIFIED BY 'PASSWORD';
mysql> flush privileges ;
You don't need to restart mysql for step 3
Subscribe to:
Post Comments (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
I used 7z to zip this file under Windows, try to unzip it under linux [ang@walker temp]$ gunzip 2011.sdf.zip gunzip: 2011.sdf.zip: unkno...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...
No comments:
Post a Comment