6월, 2017의 게시물 표시

How to change ip address of mysql server

Changing and access the ip address of mysql server needs some of steps, usually it could be thought as just changing bind IP address in my.cnf file. (The default ip address of mysql server may be 127.0.0.1.) Steps, 1. Open my.cnf file The primary my.cnf is located in /etc/my.cnf. (Mysql server searches my.cnf files from multiple directories from /etc/my.cnf, /etc/mysql/my.cnf, $MYSQL_HOME/my.cnf, [datadir]/my.cnf, ~/my.cnf, etc. It could be different depend on the OS.) 2. Change bind-address field to IP address you want to set. For example, [mysqld] ... #bind-address = 127.0.0.1 bind-address = 62.168.0.100 (example ip address) And save the file. 3. Restart mysql process. The command could be different depend on  your OS. $ /etc/init.d/mysqld restart or $ service mysql restart or  $ sudo /usr/local/mysql/support-files/mysql.server restart   4. Grant the account access rights to connect the mysql server with the IP address remotely. Connect mysql locally first,