How do I create a MySQL database? Print

  • 0

Login to your site's control panel (e.g.: and then follow the steps below to create the database.
  1. Click on "Site Services" from the menu on the left-hand side of the page. When the menu expands, click on MySQL and then Databases.
    Select Databases from the left menu
  2. The Database Management screen will appear. Type a name for the database in the field titled "Database Name", then click Add.
    Add a MySQL Database
    Your newly created database will appear in the list of Existing Databases.
  3. Next, you must give a MySQL User rights to access the database.
    1. If you already have a MySQL User set up that you would like to use, simply click on "Manage Users" which appears just to the left of the database name. Proceed to Step 4.
    2. If you have not created a MySQL User or if you need to create another user to access this particular database, select Users from the MySQL menu on the left side of the page.
      Create MySQL User
      Add the new user by entering a name in the Username field and then enter the password that you would like to assign to this user into the Password and Confirm Password fields. Click on Add to save this MySQL User.
      Add a MySQL User
      Now you're ready to assign this user to the database so go back to the menu on the left and then select Databases. Click on "Manage Users" to the left of the database name that you created in Step 2 above and then proceed to Step 4.
  4. Select the MySQL User who should have access to this database from the drop-down list in the User column and then assign the appropriate permissions by clicking on the boxes under Permissions. Normally the program that you are creating the database for will give you a list of permissions that the MySQL User must have so you can refer to their documentation to find the settings.

    Add User and Give Permissions to Database

    When you're finished assigning permissions, click on Add to assign this MySQL User to the database.
  5. You're done. You can now assign this database and its user (database username) to your program's configuration file.

    (Note: The control panel adds a prefix to the database name and the username. The database name and the MySQL username are prefixed by your site's truncated name followed by an underscore, "sitename_", so the full database name and its username should be used in your program's configuration file (e.g. sitename_mydatabase and sitename_mysqlusername respectively).

Was this answer helpful?

« Back