Menu Close

How to Create a Database and MySQL Users ?

When you install your WordPress website manually, move your WordPress website manually, or develop a php code to run your programming. You need a database and MYSQL User. One database can have unlimited MYSQL Users.

One MYSQL User can manage Unlimited Database. What I am showing you is to create one database and one MYSQL user to manage the database. The example control panel is Cpanel. All other control panel may have the same steps.

You can go to your cpanel, and click MYSQL Database Wizard.

Step 1: Create a Database

In New Database line, you can type the name you want. I type the database as yourdatabase and then click “Next Step”. It will be shown:

 

You have created your databasename “yourdatabase”.

Step 2: Create MYSQL User.

Then you can create Database Users. I use yourusername, password yourpassword. click “Create User”. Go to following page:

You have successfully created a MySQL user named “yourusername”. and check all ALL PRIVILEGES.

Step 3: Add user to the database.

click “Next Step” of above image. You will assign the MYSQL user “yourusername” to manage the mysql database “yourdatabase”.

Now you get your database and your MYSQL username to use for your php application.

Your database name: yourdatabase

Your username: yourusername

Your password: yourpassword

MYSQL Hostname: localhost

(if your MYSQL Hostname is not local host, the web hosting provider will provide you hostname. eg mysqlhost.secureserverphp.net )