You can manually rename the directory that contains the file for the database you want to rename. Make sure to do this while mysqld is off. So if we wanted to rename database "foo":
% cd /usr/local/mysql/data % ls -l
drwx------ 2 <your uid> staff 512 Sep 28 19:58 mysql/
drwx------ 2 <your uid> staff 1.0K Nov 24 14:45 foo/
-rw-rw---- 1 <your uid> staff 2.7K Nov 24 14:45 <your server>.err
-rw-rw---- 1 <your uid> staff 5 Nov 24 14:45 <your server>.pid
drwx------ 2 <your uid> staff 512 Sep 28 19:58 test/
% mv foo newfoo
When you bring mysqld back up, it should use the new name.
cheers,
- Jared
On Dec 2, 2003, at 7:48 PM, joffrey leevy wrote:
I am ashamed to ask this but I really did not see this in the manual or elsewhere.
What is the command to rename a database?
__________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]