Can I change the name of a MySQL database?

The name of a MySQL database consists of a prefix, which is your cPanel username, followed by a "_" sign and the actual database name.

For example, if your cPanel username is user and you create a database  db, the database name will be user_db.

If you wish to rename the database called user_db to user_joom, you should first create the new database, thenimport the old database in it and finally add the user to the new database. You can create the new database and assign a database username to it through the cPanel -> MySQL databases tool. After that you can use the cPanel -> phpMyAdmin tool to import the corresponding database.

If you wish to change the whole name of a database user_db, two changes should be made – the cPanel username and the database name.

In order for a cPanel username to be changed, we have to terminate the account and recreate it anew with the new username. This means you will lose all the data stored on the hosting account, like files, email addresses, MySQL databases, forwarders, etc.

Bear in mind that the new cPanel username should not exist and it should be maximum 8 characters long. This also means you will lose all the data stored on the hosting account, like files, email addresses, MySQL databases, forwarders, etc. This is why it is not recommended to change your cPanel username.

If you experience any problems on your end you can contact the SiteGround Support Team for further assistance.

cPanel is easy to work with when you have the right host to support you. If you need a reliable partner to help you manage your website with cPanel, check out our cPanel hosting services!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to export/import a MySQL database via SSH

In this article we will show you how to export and import a MySQL database via SSH. Managing your...

Error about legacy type authentication (old-style) when connecting remotely to MySQL

This particular error can occur in some MySQL clients. The reason for it is that our servers...

How to change the password of a Mysql user in cPanel?

If you have already created a MySQL user through the cPanel -> Mysql Databases tool you may...

How to reset the password for a MySQL database?

You may need to change the password of your database in order to improve the security of your...

I cannot create views in MySQL

Regular MySQL users do not have privileges to create views in MySQL. If you try to execute CREATE...

Powered by WHMCompleteSolution