Vimzaa Knowledgebase
  • Getting Started
  • Virtual Private Servers
    • What is Virtual Private Server
    • Getting Started With Linux
      • An Introduction to the Linux Terminal
      • Basic Linux Navigation and File Management
      • An Introduction to Linux Permissions
      • An Introduction to Linux I/O Redirection
      • Linux Permissions Basics and How to Use Umask on a VPS
    • Connect with SSH
      • How to Add SSH Keys to VPS
      • SSH Essentials: Working with SSH Servers, Clients, and Keys
    • How To Edit the Sudoers File on Ubuntu and CentOS
    • Introduction to Nginx and LEMP on Ubuntu
      • Initial Server Setup with Ubuntu
      • Installing LEMP Stack on Ubuntu 14.04
      • Installing LEMP Stack on Ubuntu 16.04
    • Anti-Spam Best Practices
  • cPanel Hosting
    • Cloudflare
    • cPanel - Advanced
      • How to add and manage cron jobs / scheduled tasks in cPanel
      • How to track DNS using cPanel
      • How to create custom ‘error pages’ in cPanel
      • How to flush your local machines DNS Cache
      • How to use the Google Public DNS for faster DNS lookups
      • How to check if your domain has ‘propagated’ following DNS changes
      • Install Wildcard SSL Certificates using LetsEncrypt with cPanel
      • Correct SPF Records
      • Check processes or users with high iowait (99.99%) from Cloudlinux Logs
      • How to tune MySQL on a cPanel server with MySQLTuner
      • Clear disk space on cPanel Server by removing backups, trash etc
      • Add monitoring script to server for monitoring top, iostat etc
      • Testing your site before ‘go-live’ by editing your hosts file
    • cPanel - Domains
      • How to use the Site Publisher in cPanel
      • Managing addon domains in cPanel
      • What is the difference between addon domains and ‘alias’ domains?
      • Managing subdomains in cPanel
      • Managing domain aliases in cPanel
      • Managing domain redirects using cPanel
      • How to use the Simple Zone Editor in cPanel for managing your DNS Records
      • How to use the Zone Editor within cPanel to manage your DNS records
      • How to redirect all domain ‘alias’ to the main domain using cPanel
      • How to enable Cloudflare on your cPanel account
      • How to check what nameservers a domain is using
      • How to create Custom Nameservers / Vanity Nameservers
      • How do I transfer a domain name to Vimzaa?
    • cPanel - Managing Databases
      • Managing a MySQL Database in cPanel with phpMyAdmin
      • Manage MySQL Database in cPanel
      • Simplified database creation with the cPanel MySQL Wizard
      • Managing MySQL databases remotely using ‘Remote MySQL’ in cPanel
    • cPanel - Managing Email Accounts
      • Managing email accounts with cPanel
      • How to create and manage email forwarders using cPanel
      • Managing email routing with cPanel
      • Change Your E-Mail Account Password
      • Improving mail deliverability (SPF & DKIM)
    • cPanel - Managing Files
    • cPanel - Metrics
    • cPanel - Software and Applications
    • cPanel - Security
    • SiteBuilder Pro
    • Enable or disable PHP modules
    • How can I migrate my cPanels to Vimzaa Website Hosting?
    • SSH Access to cPanel Servers
    • How do I add another domain to my Hosting Account?
    • How do I access WHM (Web Host Manager)?
  • Plesk Hosting
    • An Introduction to Plesk
    • Getting Started with Plesk
      • How to login to Plesk for the first time
      • The Plesk User Interface Explained
      • Understanding Subscriptions in Plesk
      • How to upload content with Plesk
      • How to manage mailboxes / mail accounts with Plesk
      • Managing Web ApplicationsManaging Web Applications
    • Plesk Tutorials
      • A basic getting started guide to creating your first site with Plesk
      • How to manage DNS and nameservers using Plesk
    • Plesk Funtionality - Explained
      • Managing your User Account in Plesk
      • Managing your Web Hosting with Plesk
  • Game Servers
    • Setup Teamspeak 3 Server on Linux
    • Installing SteamCMD for Steam Game Servers
  • SSL Certificates
  • Domains
    • Can I register or transfer my domain to Vimzaa
    • Can I buy a domain name together with a web hosting plan
    • Default nameservers for shared webhosting
Powered by GitBook
On this page
  • Overview
  • Create a database
  • Modify Databases
  • Check a database
  • Repair a database
  • Current Databases
  • Rename a database
  • Delete a database
  • Add a MySQL user
  • Add a user to a database
  • Current Users
  1. cPanel Hosting
  2. cPanel - Managing Databases

Manage MySQL Database in cPanel

PreviousManaging a MySQL Database in cPanel with phpMyAdminNextSimplified database creation with the cPanel MySQL Wizard

Last updated 6 years ago

Overview

Use this interface to create, manage, and delete MySQL® databases and database users.

Notes:

  • We recommend that you use the interface (cPanel >> Home >> Databases >> MySQL Database Wizard) to create your firstdatabase and user.

  • The maximum length of the database name is 64 characters.

    • Due to the method that cPanel & WHM uses to store MySQL database names, each underscore character requires two characters of that limit.

    • If you enable database prefixing, the maximum length of the database name is 63 characters, which includes the database prefix and the underscore character. Each additional underscore requires another two characters of that limit.

  • To enter information in an existing database, use the phpMyAdmin interface (cPanel >> Home >> Databases >> phpMyAdmin).

Important:

Do not use phpMyAdmin to create databases or database users.

Create a database

To create a database, perform the following steps:

  1. In the New Database text box, enter a name for the database.

    Note:

    If your hosting provider has enabled database prefixing, up to the first eight characters of your cPanel account username and an underscore character (_) will precede the New Database text box. The system automatically prepends the database name that you enter with this prefix.

  2. Click Create Database. A new interface will appear.

  3. Click Go Back. The new database appears in the Current Databases table.

Modify Databases

If you experience problems with a database, check your databases for errors.

Check a database

To check a database for errors, perform the following steps:

  1. In the Check Database menu, select the database that you wish to check.

  2. Click Check Database. A new interface will appear, and the system will check whether the database functions correctly.

    • If the system detects a problem in the database, it displays the name of the corrupt table.

    • If the Check Complete message displays, the database functions correctly.

  3. Click Go Back to return to the main interface.

Repair a database

If one of your databases is corrupt, you can attempt to repair it.

To repair a database, perform the following steps:

  1. In the Repair Database menu, select the database that you wish to repair.

  2. Click Repair Database. A new interface will appear, and the system will attempt to automatically repair the database.

    1. If the system cannot repair the database, it will attempt to determine the source of the corrupt data.

    2. If the Repair Complete message displays, the system successfully repaired the database.

  3. Click Go Back to return to the main interface.

Current Databases

The Current Databases table lists the following information for each database in your account:

  • Database — The name of the database.

  • Size — The size of the database.

  • Privileged Users — The users who can manipulate the database.

    Note:

    When you modify database users, make certain that you modify the user’s access to the correct database. Users may have access to more than one database.

  • Actions — The available actions for this database. Click the appropriate icon in this column to rename or delete a database.

Rename a database

Warning:

  • It is potentially dangerous to rename a MySQL database. We strongly recommend that you perform a backup of the MySQL database before you attempt to rename it.

  • When you rename a database, the system terminates all active connections to the database.

  • You must manually update configuration files and applications to use the new database name.

  • The system requires more time to rename larger and more complex databases.

To rename a database, perform the following steps:

  1. In the Current Databases table, click Rename for the desired database.

  2. Enter the new database name in the New name text box.

  3. Click Proceed.

MySQL does not allow you to rename a database. When cPanel & WHM “renames” a database, the system performs the following steps:

  1. The system creates a new database.

  2. The system moves data from the old database to the new database.

  3. The system recreates grants and stored code in the new database.

  4. The system deletes the old database and its grants.

Warning:

  • If any of the first three steps fail, the system returns an error and attempts to restore the database’s original state. If the restoration process fails, the API function’s error response describes these additional failures.

  • In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants.

Delete a database

To delete a database, perform the following steps:

  1. In the Current Databases table, click Delete for the desired database.

  2. To permanently delete the database, click Delete Database.

  3. Click Go Back to return to the main interface.

Add a MySQL user

After you create a database, add users to the database and configure their privileges.

Notes:

  • You must create MySQL user accounts separately from mail and web administrator accounts.

  • You must create a user before you can add the user to an existing database.

To create a new user account, perform the following steps:

  1. Enter a username in the Username text box.

    Important:

    To learn more about database username limits, click your database type: MySQL MariaDB

  2. Enter and confirm the new password in the appropriate text boxes.

    Notes:

    • The system evaluates the password that you enter on a scale of 100 points. 0 indicates a weak password, while 100 indicates a very secure password.

    • Some web hosts require a minimum password strength. A green password Strength meter indicates that the password is equal to or greater than the required password strength.

  3. Click Create User.

  4. Click Go Back to return to the main interface.

Add a user to a database

To add a user to a database, perform the following steps:

  1. In the Add User To Database section of the interface, select the desired user and database from the menus.

  2. Click Add. The MySQL Account Maintenance interface will appear.

  3. Select the checkboxes that correspond to the privileges that you wish to grant to the user.

    Note:

    To grant all of the available privileges to the user, select the ALL PRIVILEGES checkbox.

  4. Click Make Changes.

  5. Click Go Back to return to the main interface.

Current Users

The Current Users table lists all of your MySQL database users, and allows you to perform the following actions:

  • Change Password — Click to modify a database user’s password. Enter and confirm the desired password, and then click Change Password.

  • Rename — Click to rename a database user. Enter the desired username, and then click Change Username.

  • Delete — Click to permanently delete a database user, and then click Delete User to continue.

To remove a user from a database, click the trashcan icon () for the desired user, and then click Revoke User Privileges from Database.

To modify a user’s , click the desired username, select and deselect checkboxes to configure the desired privileges, and then click Make Changes.

Click Password Generator to generate a strong password. For more information, read our documentation.

For more information about user privileges, read the .

MySQL Database Wizard
privileges for a specific database
Password & Security
MySQL documentation