10

I've set up my Remote Database Access Host, on my web hosting cpanel, enabling my home computer IP address to access the online database.

To the best of my knowledge it should be working, but I'm not 100% sure.

Is there a quick way I can connect to the database from command prompt to make sure its allowing access from my IP address?

Community
  • 1
  • 1
Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225

1 Answers1

26

use mysql client, if you have it installed it's quite easy to access a remote host

mysql -hyour_ddbb_server_ip -uyour_user -pyour_password your_database_name

or

mysql -h your_ddbb_server_ip -u your_user -p  your_database_name

* note that in the first option there are no blank spaces between parameter option and its value

* your_database_name is optional

Packet Tracer
  • 3,884
  • 4
  • 26
  • 36
  • 4
    Though it's considered safer to leave the -p value off, so the client will prompt you for the password. This way, the password isn't stored in your shell history and doesn't appear on screen for those standing over your shoulder. – Marcus Adams Jun 05 '12 at 17:07