Enable My SQL remote access on Ubuntu Server 12.04

By default mysql on ubuntu server can pnly accessed from localhost ( if we need to access it from another computer on the network, we must do the following step :

Edit My SQL Configuration

$sudo vim /etc/mysql/my.cnf

#comment out this line (add # in front of the line)

#bind-address                 =

Restart the Server

$sudo service mysql restart

Then we need to add user info to the database

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 77
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> grant all on [database_name].* to [user]@[ip_address] identified by ‘[password]

Query OK, 0 rows affected (0.00 sec)

mysql> exit

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s