Create a New Database
- Log in to cPanel using the URL: http://example.com/cpanel.
Note: if you forgot your logins, let us know and we'll fix ya up. - Click MySQL Databases in the Databases section.
- On the next screen navigate to the Create New Database section.
- Type in a database name (let's call it 'mydb') in the empty text field and click Create Database.
Create a Database User
Each database needs a username to allow connections. To create a database user:- Log in to your cPanel account.
- Click MySQL Databases and scroll down to the MySQL Users section.
- In the Add New User section type in a new database username and password.
Note: we'll assume you are using 'dbuser' with password 'user123'. - Click Create User.
User: example_dpuser
Pass: user123
Add User to Database
Finally, you need to associate the new username with the database. To do so:- Scroll down to the Add Users to Your Databases section.
- Select 'example_dbuser' from the dropdown menu on the left and the database 'example_mydb' from the dropdown menu on the right.
Note: you're just selecting the user you want to move to another database, and then selecting the database you want to move that user to. - Click Add.
server: localhost
database: example_mydb
database user: example_dbuser
database password: user123<