How do I add a mysql database in Cpanel?

To create a MySQL database:

  • Go to 'Manage Mysql' under the database header in Cpanel
  • In the DB text field, type the name you wish to give your database
  • Click the Add DB button
  • At the bottom of MySQL Manager under 'Users' type a database user name and password
  • Click the Add User buttonNow for the important part that everyone misses:
  • You should now see your new user listed in the dropdown menu after "User:" and your new database listed in the "DB:" dropdown menu. (if you don't try refreshing the page in your browser) then, select BOTH the username AND the DATABASE NAME and click the Add User to DB button to add your user to your database and you're done.

Now that you have created a database as well as a database user and have granted that user access to the database your mysql database is fully ready to use.

  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

What is the default mysql port?

3306 is the default mysql port.

How to connect to PostgreSQL from PHP?

For connecting to a PostgreSQL database from PHP you can use the standard pg_Connect() function.

How to import an .sql file into a Postgre database?

Log in to your cPanel and open the phpPgAdmin tool. Then click on the PostgreSQL link at the left...

How to create a Postgre user?

In order to create a PostgreSQL user you should go to your cPanel -> PostgreSQL Databases...

How to create a Postgre database?

Creating a PostgreSQL database is a straight-forward process. All you need to do is log in to...