Before you can use a MySQL database you need to create a MySQL database and a MySQL user to access it. You can do this from cPanel. In cPanel all MySQL databases and users are prefixed with your cPanel username to avoid possible clashes with other accounts on the same server.
Follow the steps below, replacing "cpanel" with your cPanel username.
- Login to cPanel
- Click on "MySQL Databases"
- Next to "Db:" enter a database name (e.g. "db") and click "Add Db".
- Return to the "MySQL Databases" page.
- Under "Users" enter a username (e.g. "me") and a password and click "Add User".
- Return to the "MySQL Databases" page.
- Select the newly created user (e.g. "cpanel_me") and the newly created database (e.g. "cpanel_db") and click "Add User to Db"
Now use the following details to connect to the database:
Server: localhost
User: cpanel_me
Database: cpanel_db
Password: The password you entered when you created cpanel_me
You can view a flash tutorial showing how to create a MySQL database at:
http://www.z-host.com/tutorial.php?tut=mysql-create-database
|