How to connect mysql database remotely

Command-line

 


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

If you are connecting to database from outside computer.
you have to allow your ip address for mysql remote access.

Please see your ip here:- https://www.whatismyip.com/

note down that ip address.

Login to your cPanel.
Locate the Databases section.
Under Databases section locate Remote MySQL option and 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.

 

  • 4 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...

Powered by WHMCompleteSolution