Intro to Cpanel MySQL Databases
Each database you use on your account needs to have a distinct name. Each database you connect to needs a database username assigned to the database to your scripts/website can connect to it.
For this document, we'll assume you have the domain name
example.com, and your Cpanel Login / Username is
example.
Create a New Database
Login to Cpanel using the URL
http://example.com/cpanel∞
Click on
MySQL Databases
On the next screen, scroll to
Current Databases.
Under that, look for
New Database
Type in the Database Name (let's call it
mydb) and click Create Database
Your database name will automatically be prefixed with your Cpanel Username. So anytime you need to reference the database, it will look like this:
example_mydb
Create a Database User
Each Database needs a username to allow connections.
In Cpanel ->
MySQL Databases, scroll down to
Current Users
Look for Username and Password fields.
Type in a username and password. We'll assume you are using
dbuser with password
user123
Click Create User
Your database user name will automatically be prefixed with your Cpanel Username, so be sure to reference the full username in your scripts:
User: example_dpuser
Pass: user123
Add User to Database
Finally, you need to associate the new username with the database
Scroll down to
Add Users to Your Databases.
Select the example_dbuser from the drop-down menu on the left and the database "example_mydb" from the drop-down menu on the right.
Then, click the button,
Add User to Database
Final
That's it. You've created a database, a database user and connected the two together. Here's the information you will use for your scripts (such as Wordpress or vBulletin):
server: localhost
database: example_mydb
database user: example_dbuser
database password: user123
Back to New User Documentation
There are no comments on this page. [Add comment]