Navigation
- FAQ Home
- All categories
- About Webyog support and about this FAQ
- About the SQLyog program

- Connection issues

- Using the GUI
- Managing your MySQL Database Systems
- Database Schema Synchronization
- MySQL DATA synchronization
- SQL Scheduler and Reporting Tool
- Importing external data
- Backup/Restore
- SQLyog Job Agent (SJA)

- Working with Views, Stored Procedures and Triggers
- Character Set and Localization Issues
- MySQL bugs that affect SQLyog
- Questions on Open Source and Compiling
- Sitemap
Most popular FAQs 
- I get error 1130 "Host is not allowed to ... (169311 views)
- Error no. 2003: Can't connect... (86266 views)
- SQLyog Version History (63946 views)
- Error no. 1045: "Connection denied..." (61345 views)
- Error no. 1251: "Client does not support authentication..." (58316 views)
- Error No. 2005: Unknown MySQL server host... (50191 views)
- What is HTTP-tunneling? (42280 views)
- What Is SSH and SSH-tunneling? (38070 views)
- Can I use SQLyog with the WINE Windows emulator ... (34942 views)
- Why are Stored Procedures not created when I import ... (34267 views)
Latest FAQs 
- SQLyog Version History (2012-01-26 08:20)
- SQLyog is a client for the MySQL server - ... (2011-11-04 04:48)
- I get error 1130 "Host is not allowed to ... (2011-11-01 05:21)
- Problems on Ubuntu 11.x (2011-10-29 13:02)
- Problems creating a functional DSN on 64 bit Windows. ... (2011-09-15 14:34)
Sticky FAQs
Managing your MySQL Database Systems » Manipulating data.
Can I rename a database?
NO... and yes!
Directly changing database names is not possible! It is not a restriction with SQLyog, but with MySQL itself. The reason is that the database names exist not only in MySQL tables but as filenames in the filesystem as well. Changing both system tables and filenames is not without problems (not secure) in case of a server crash in between. You may be left with nothing then! So for security reasons a 'rename DB' is not available.
However, you can copy your database to a new one with a new name in different ways with SQLyog:
1) make a backup with SQLyog and change the 'use' SQL-statement in the dump-file to new DB-name before importing.
2) create a new empty database and "copy DB to other host" using SQLyog. Don't be confused - it works with two DBs on the same host as well! When it is done you can drop the old one.
But no matter how you do it involves copying all data, and it will take a lot of time with big DBs. And if you have ONE DB ONLY at a webhost (typical 'personal' subscription plan) you will need to backup, drop current DB, change 'use'-stmt and import. Be sure to use a 'Bulk Insert' setting that you know works with the server configuration. Probably it is safest NOT to use BULK INSERTS at all! Though that would increment the time for restore.
However 'rename database' is implemented in MySQL in the 5.1 tree. We not support it and have not decided if we will ever do. The problem is that only DATA are kept with this command. Stored Procedures, Views, Triggers will be lost when using this command. There is a pending bug report on this and we will need to wait for the final implementation in MySQL, before we decide what we will do!
Tags: -
Related entries:
- Do I need PHP to use SQLyog with MySQL?
- SQLyog Version History
- What kind of ODBC databases are supported by SQLyog Import External Data Tool?
- What is and what is not imported by the SQLyog Import External Data Tool?
- Can I perform "incremental import" with the SQLyog Import External Data Tool?
Last update: 2006-02-13 09:53
Author: Peter Laursen
Revision: 1.0
You cannot comment on this entry