JJ Johnson

Member
Jun 28, 2018
5
1
3
US
cPanel Access Level
Website Owner
I'm an end-user/site owner trying to use MySQL for the first time on my cPanel administered web server. I'll tell you what I've done, then I have a few questions:

  • I created a MySQL database, the name is constructed from my username (domain name), underscore (these were already filled in, then one word. For example: "mydomaincom_mydb".
  • I created a MySQL user, similar to the above, named "mydomaincom_admin".

What I'm now trying to do is connect remotely using SQLyog, so I can create and manage the database. With no luck.

Questions:
  • Should I be using the default MySQL port 3306?
  • I read something in the documentation about underscores needing to be doubled. Is this true for a) usernames, b) database names? What about within passwords?

I haven't tried accessing the database yet from an application running on my web site. I need to be able to manage the db remotely first. Anything else I need to know?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,912
2,241
363
Hello @JJ Johnson,

1. Ensure you add the IP address of the workstation you are connecting remotely from using cPanel >> Remote MySQL. The default MySQL port is 3306. As an end-user, you may also have to contact your hosting provider to request a whitelisting of your IP address is your provider blocks traffic to 3306 by default.

2. Ensure the database user was added to the database: Add A User To The Database

You should not have to alter the database name or username in your remote MySQL application.

Thank you.