Hi,  Renaming of the database is on the TODO list.  Some comments
follow.

1) Renaming of the directory will work for table types of MyISAM and
BDB (with exceptions).  This won't work for InnoDB types.

2) When renaming a directory make sure to shutdown the server and that
you have no pending transactions on BDB table types.  Then shutdown
the server, rename the directory and restart the server.

3) Another method which works well  if you only have a couple of
tables in the DB. 1: create the new DB.  2: use RENAME TABLE
oldbd.table1 TO newdb.table1, olddb.table2 TO newdb.table2 3: done!

Hopefully we will have rename DB soon or a wildcard on the rename
tables!

Ken
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 9:38 AM
Subject: use of RENAME???


> [mysql]
>
> is this how to change the the name of an existing populated db?
>
>
> RENAME DATABASE old_name TO new_name;
>
> TR
>
> --------------------------------------------------------------------
-
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to