briefly in the distribution management system MySQL database included SQL-command to rename the database.Therefore, if you are a lucky user of one of the versions of MySQL, starting and ending with 5.1.7 5.1.22, you can use the RENAME.Since version 5.1.23, this command has been removed, as potentially dangerous.To rename base data in other versions have to use a set of commands to create a new database, copying the old table into it.
- access the application phpMyAdmin
Use application phpMyAdmin, if you want to rename all the necessary database automatically guidelines were formulated and sent to the SQL-server.This application is provided by most hosting companies as the standard means of database MySQL.If you use the SQL-server locally, then set it to my computer - to find in the Internet completely Russified version is not difficult, and new releases available for free on the official website http://phpmyadmin.net .
authorize in phpMyAdmin application and d
atabase list of your account, placed at the left frame of the interface, click the base , you want to rename.The program will load the page with the list of tables selected database, the information related to them and a set menu control.
Select "Options" menu, placed in the top of the right frame, and phpMyAdmin loads in this frame a new page.It placed the three sets of golf operations, including the renaming of the database.
Enter the new database name in the section titled "Rename base data" and click "OK" in this section.The program will make the necessary set of commands to create a new database with the name you specified, copy it tables the current database and then delete the current.Since the list of SQL-commands and has a delete operation, the phpMyAdmin requires you to confirm - click "OK".
If your version of SQL-server understands the direct command syntax to rename a database, you can use a SQL-command: RENAME old_name TO new_name; you old_name - old name, new_name - new.The advantage of this variant in a significant reduction in the time of the operation.