How to connect mysql database remotely


mysql> GRANT ALL ON yourDatabase.* TO User@'%' IDENTIFIED BY 'my_password';

If you are connecting to a database from an outside computer.
you have to allow your IP address for MySQL remote access.

Please see your IP here:-

note down that IP address.

Login to your cPanel.
Locate the Databases section.
Under the Databases section locate the Remote MySQL option and click on it.

In the next screen, enter the hostname or IP address that you want to grant remote MySQL access to and click the Save button.
If your IP address changes regularly, you can use wildcard by using the % symbol.


  • 116 Users Found This Useful
Was this answer helpful?

Related Articles

Filezilla Error: Failed to retrieve directory listing

If you are having trouble to connect via ftp using filezilla. here is the quick solution.Connect...

Server: Rescue system

PawnHost Server Rescue System To start a server in the Rescue System, it needs to be activated...

Add DNS in Ubuntu 18

Install the resolvconf package.  sudo apt install resolvconf   Edit...

how X-Content-Type-Options works for a particular web request.

What is X-Content-Type-Options?# Web-based security risks are quite prevalent in today’s...

Changing Window Password on your first login

Changing the Windows password during the first login If you get the following error message the...