How to Connect to MySQL Database

Follow the below steps to connect to MySQL database.

There are two ways to connect to MySQL database:

  1. Script
    This process requires a configuration file to connect your script to the database.List of configuration files is available on our website. Talk to our representative for information on this, if you are unable to find this.Database driven scripts usually have default configuration files that let you provide appropriate information. For example:

    • Host Name = localhost
      Enter your localhost name
    • Database Name = cpanelUsername_databaseName
      Enter your database name.
    • Database Username = cpanelUsername_databaseName
      Enter your database username.
    • Database Password = whatever you selected
      Enter your database password
  2. Remote connection
    • Access Control Panel.
    • Select Databases>Remote MySQL.
    • Enter the IP address, and click Add Host.
    • Click Add.

Resetting Database Password

  1. Access Control Panel.
  2. Select MySQL Databases from the Databases section.
  3. The Current Users section is displayed. Click Set Password for the appropriate database user.
  4. The Set MySQL User Password screen is displayed. The Username is displayed by default. Enter your password in the Password and Re-enter Password fields, and click Change Password.
  5. A message is displayed stating that your password is changed successfully.

Connect to MySQL Database Remotely

  1. Access Control Panel
  2. Select Databases>Remote MySQL.
  3. Enter the IP address, and click Add Host.
  4. Click Add.
  5. A message is displayed stating the host IP address is added to the access list.

Creating MySQL Database and User

Creating MySQL Database
  1. Access Control Panel.
  2. Select Databases> MySQL Databases.
  3. In the New Database field, enter the database name, and click Create Database.
  4. You will be able to see this database name in the Current Databases list.
Deleting MySQL Database
  1. Go to MySQL Databases> Current Databases.
  2. Go to Actions column of the database that you want to delete, and select Delete Database.
Creating Database User
  1. Select Databases>MySQL Databases.
  2. In the Add New Users section, enter your database username and password. Re-enter your password in Re-enter Password field.
  3. Click Create User.
Deleting a Database User
  1. Go to MySQL Databases> Current Users.
  2. In the Delete column, click the ‘X’ icon next to the user you want to delete.

We will be happy to hear your thoughts

Leave a reply

Serverbasket Help
Logo
Compare items
  • Total (0)
Compare