![]() Select the database user that used to be associated with this database from the list.ħ. Scroll down to the Add User To Database section of the page.Ĥ. You can return to the cPanel home screen to continue.ģ. Enter the name of the new database and click Proceed button: You will need this information in the next steps.ĥ. It is important to remember the database user assigned to the database. Find the database that you want to rename and click Rename button. Scroll down to the Current Databasessection.Ĥ. When changing the name of a database, it’s important also change user permissions and any scripts pointed to this database.ģ. The -R flag is also important and tells mysqldump to copy stored procedures and functions along with the normal data from the database.By using the most recent version of phpMyAdmin you will be able to change the database name. Be sure to leave the surrounding quotations because passwords with uniqueĬharacters may otherwise cause execution issues. We’re using the -p flag immediately followed by our password to connect to the database (with no space between) and avoid password entry prompts when issuing these commands. $ mysqldump -u username -p "password" -R oldDbName > oldDbName.sql Mysqldump is used to create physical backups of a database, so we can use this copy to import the data back into a new database. When working with a relatively small database, the fastest method is typically to use the mysqldump shell command to create a dumped copy of the entire database, then import all the data into the newly created database with the proper name.īegin by issuing the following mysqldump command from your shell prompt, replacing the appropriate username, password, and oldDbName values. Instead, we’ll briefly explore a handful of optional methods that can be used to quickly and safely rename your MySQL database. While there used to exist a simple RENAME DATABASE command in older versions of MySQL which was intended to perform this task, RENAME DATABASE has since been removed from all newer versions to avoid security risks. In some cases it may be desirable to quickly alter the name of a MySQL database. Nama database yang baru saja anda ubah akan muncul pada deretan database
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |