opened image

    To add, create or perform operations on a MySQL database, you need to open the MySQL Databases link in the Databases section of cPanel.



    How to create a new database.



    Each database must be unique and have its own name - the name of the database. To add or create a database, in the "Create a new database" section, specify the name of the database, and click the "Create database" button.


    When adding a database, cPanel will automatically add a prefix to the database name you enter. Each user has its own prefix_DBname before the database name. When connecting a database in the site/CMS configs, you must specify the full name of the database with the specified prefix for the correct connection and use of the database by the site.




    How to add a database user



    To use the database, there must still be a user. To add a database user, see at the bottom of the window there is "MySQL Users". There is a list of existing MySQL users. Below them, in the "Add a new user" section, specify the required parameters - the database user name. It is better to generate a password through the password generator button. And complete the creation of the database user by clicking the "Create User" button.



    After you need to add a user to access the database. The user must have the necessary rights (editing, adding tables, the right to execute queries, etc.) to manage this database. In the new window, check the "All privileges" checkbox and apply the changes by clicking the "Make changes" button. You can return to the previous menu by pressing the "Back" button.




    Checking and fixing the database.


    Sometimes when databases are working, or when importing a database is unsuccessful, errors may occur in its operation. In this case, the site, pictures, articles or news will not be displayed correctly, not all or part of it will be displayed. But such errors in work can be corrected using the additional item "Change databases" of the "MySQL databases" section, you can check and correct errors in the database. Why are there lines for selecting a database and buttons "Check database" and "Fix database".