Step 1. Create read only user

Log into MySQL as admin. Replace the parts in bold below and type the following commands into a MySQL shell. 54.245.93.65 is the public IP of Ubiq and $database_name, $user, and $password are database user details.

CREATE USER '$user'@'54.245.93.65' IDENTIFIED BY '$password';

GRANT SELECT, SHOW VIEW ON $database_name.* TO $user@'54.245.93.65' IDENTIFIED BY '$password';

FLUSH PRIVILEGES;


Step 2. Allow remote access

Linux: Open the file my.conf located at /etc/mysql/my.cnf and comment the line bind-address=127.0.0.1 by adding '#' before it. Save & close the file. If you don't find this line in file, leave it unchanged.


Windows: Open my.ini located at C:\Program Files\MySQL\MySQL Server 5.x\ (where 5.x is mysql version) and comment the line bind-address=127.0.0.1 by adding '#' before it. Save & close the file. If you don't find this line in file, leave it unchanged.


Update firewall permissions for MySQL port(3306) to allow access to Ubiq's IP(54.245.93.65)

.

Step 3. Restart MySQL server

On Linux (Debian/Ubuntu) : enter this command in shell (keyword sudo is optional)

[sudo] /etc/init.d/mysql restart

On Linux (RHEL/Fedora/CentOS) : enter this command in shell (keyword sudo is optional)

[sudo] /etc/init.d/mysqld restart

On Windows : Open command prompt in administrator mode (search for cmd.exe file, right click on file icon and select "Run as administrator") & enter these commands in command prompt

net stop mysql
net start mysql

Step 4. Create connection

The connection form has the following fields:

  • Host IP or URL - the host name or IP address of the server your database is hosted on
  • Database name - the name of the database you're connecting
  • User name - the name of a read-only user to your database
  • Password - the password for the read-only user
  • Port Number - the port that the database is listening to (default: 3306). You can locate it in my.conf(linux) or my.ini(windows) under the line [client]

Please ensure the database details are entered correctly before you click Connect.


Please don't hesitate to mail us at contact@ubiq.co if you face any issues. We surely reply within a day.