Articles

Setup MySQL Databases

This article is filed under: Articles, Database, How To

This article demonstrates how to setup MySQL databases with your hosting account.

  1. Login to the control panel and click on the “MySQL Databases” link in the “Databases” section.Setup MySQL Database - Step 1
  2. Use the form (shown below) to create a new database. Type in the name of the database that you’d like to create. Please note that the name that you input will be appended to the end of your username. For example, if you type in contacts, the database will end up being named yourusername_contacts.

    Setup MySQL Database - Step 2

  3. Next you will need to create a user that has permissions to read and write to the database. Use the form (shown below) to create this user by typing in a username and password. Again, the username you input will be appended to the end of your control panel username. For example, if you type in “contacts” for the username, the username will end up being yourusername_contacts.

    Setup MySQL Database - Step 3

  4. Once you have created both the database and the user, you now have to link the user to the database. In other words, you have to let the server know that the user has permission to read and write to the database that you created. Use the dropdown options in the “Add Users to Your Databases” section to assign the new user to the new database.

    Setup MySQL Database - Step 4

You have now created a database, a user and you have assigned the user to the database. You can now use that information to connect to the database using a web application or a script in your hosting account.

When setting this up, the host should be “localhost” unless you’re connecting to the database from outside of your hosting space with OK Public.

One Response to “Setup MySQL Databases”

  1. OK|Public Web Hosting » Archive » How to Move Your Site Over to OK Public Says:

    [...] database/s, you then need to create a new MySQL database and user at OK Public. You can follow this tutorial to do [...]

Leave a Reply

Feel free to add any additional thoughts or bring up any questions.