View Single Post

  #2 (permalink)  
Old 01-25-2007, 04:22 AM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

open /etc/mysql/my.cnf file
Code:
sudo vi /etc/mysql/my.cnf
Make sure bind-address set to your server IP address (not to 127.0.0.1)
Code:
bind-address = 192.158.5.1
Also make sure line skip-networking is removed or commented out
Code:
# skip-networking
Save and close the file; Restart mysql
Code:
sudo /etc/init.d/mysql restart
Let us assume that you are always making connection from remote IP called 202.54.10.20 for database called webdb for user webadmin then you need to grant access to this IP address. At mysql> prompt type following command for existing database:
Code:
update db set Host='202.54.10.20' where Db='webdb';
update user set Host='202.54.10.20' where user='webadmin';
See My tip How Do I Enable remote access to MySQL database server?
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote