Client Login

How do I connect to and use MySQL?

Please login to your control panel and follow these steps below to create the database, database user, and its password.

Once you login into your control panel, please click on "MySQL Databases" under the "Database" section and then:

a) Use the option "Create MySQL database" to create the database, say "dbname". The database name will have your Cpanel username as its prefix username_ i.e. username_dbname.

b) Create a database user from the same interface and note down the username and password, say _dbuser. Again, the database user will have your Cpanel username as its prefix username_ i.e. username_dbuser.

c) Grant ALL privileges to this user on the database created using the option "Grant permissions on a MySQL database to a MySQL user".

Now you have following ready:

Database: username_dbname
DB user: username_dbuser
DB user passwd: XXXXXX (this is what you setup in step b)
host: localhost

You can use these values in your php or perl script to connect it to the database.

To browse your database, you can click on phpMyAdmin in your control panel.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
What is MySQL? (Views: 3378)