Powered By Blogger

Sep 20, 2014

Share database across computers on the same network


In order to allow remote access to your mysql server, first you need to change the "bind-address". By default it only allows connections from localhost therefore to allow connections from all networks just comment the line "bind-address = 127.0.0.1" in /etc/mysql/my.cnf

Let's assume that you want to grant permission to a database called 'testDB', you can easily grant permission using below command


grant all privileges on testDB.* to '<uname>'@'%' IDENTIFIED BY '<password>';


Then the other machine on the network can access this database by using the command

mysql -u<uname> -p<password> -h<IP>

No comments:

Post a Comment