Search Our Database

How To Allow Access To Remote MySQL Database Using SSH

Last updated on |
by

If your web server does not have phpMyAdmin installed, you may add remote host for your database by first accessing your web server via SSH.

Step 1 – Login into MySQL server.

Step 2 – If you wish to allow database user “ips1” to access database “myDatabase” at IP address “192.168.1.1“, execute the following command.

GRANT ALL PRIVILEGES ON myDatabase.* TO ips1@'192.168.1.1' IDENTIFIED BY 'ips1DbUserPassword' with grant option;
flush privileges;

Step 3 – If you wish to revoke database user “ips1” from accessing “myDatabase” at IP address “192.168.1.1“, execute the following command.

DELETE FROM mysql.user WHERE User = 'ips1' AND Host = '192.168.1.1';
flush privileges;

 

Malaysia’s Top Web Hosting Company

Visit http://www.ipserverone.com/.
Contact us @ +603-2026-1688 or email @ sales@ipserverone.com