October 15, 2018, 08:00:04 PM
collapse

* Site Menu

Creating a MySQL Database using cPanel

 We'll be creating a database in cPanel using MySQL. Please, keep in mind that your screens may appear different if you are using a different version of cPanel or are using a different cPanel theme. However, you should be able to find the same things on your server regardless. This tutorial uses the x3 theme. 
 For testing purposes, we'll be using "test" as the server name, "user" as the username, and "pass" as the password. Anything with a "_" (underscore) directly after it like this: "test_" is called a prefix and will usually come before something like "test_user". This is very important when creating your database and entering information during the creation phase of your SMF forum. Please, use your own information when actually trying this on your server. 
  • 1. You can usually go to your cPanel by typing: "http: //www.your_site.com:2082" or "http: //www.your_site.com/cpanel" in any browser. This may be different on some servers. Type in your server login information when prompted.

    2. Choose "MySQL Databases" which is usually found under the "Databases" section. This may be shown as an icon or a text link. You could also use "MySQL Database Wizard" to make this process easier. But this tutorial will focus on "MySQL Databases" for those who do not have the wizard.


    3. On the next screen, you can create the database and will also see a listing of your current databases, if any are already created.

     Enter a meaningful name for your new database. This can be anything but should be something that you'll remember and will mean something to you. Making it meaningful will be especially useful if you plan on having multiple databases. You'll want to be able to easily match a database to the website you are working on to avoid confusion. Trust me, it's not pretty if you confuse them. For now, give your database a name under the "Create New Database" section.

     It is important to remember the following. When you create your SMF forum you'll be asked what is the name of the database. It will be "test_databasename". "test_", again, is your server username prefix and "databasename" is what you just named your database. Some newer versions of cPanel will already give you the server-name prefix and will only need to enter the new database name.


    4. Go to bottom of the screen and look for "Add New User". Enter a User Name and Password. Please note the maximum length of the User Name. It is usually 7 characters but your server may vary. You will need to enter the password twice. You can also choose to have the server create one for you. Click on the "Generate Password" button to do this. After you have entered your information click the "Create User" button.

     Please, keep in mind that the higher the password strength is the more secure your password will be. This is important because it will make it harder for hackers to guess it. Save this information elsewhere and keep it safe. You will need it when you create you forum, blog, or anything that uses your MySQL database.


    5. Next, you must assign yourself to the database so you have permission to add, delete or modify it. Other permissions will also be available to be given to the user(s) that you want to have access to it. You should ALWAYS give yourself "ALL PRIVILEGES"!
  • Choose the user and the database you want them to have access to and then click the "Add" button.


    6. Give others as much or as little privileges as you see fit. You should ALWAYS give yourself "ALL PRIVILEGES". When you check that option you will not have to check any of the rest of them. When you are finished click "Make Changes".


     Your new database is all set to be used how you see fit.

 
Updated Jan. 28, 2012
 
Enjoy!!! 
 
Courtesy of:
 
Page created in 0.031 seconds with 12 queries.