This may already be implemented, but the MySQL Technical Reference for Version 3.23.41 
states:

1.6.2 Things that must be done in the real near future:
- Implement RENAME DATABASE. To make this safe for all table handlers, it should work 
as follows:
  - Create the new database.
  - For every table do a rename of the table to another database, as we do with the 
RENAME command.
  - Drop the old database.


Of course, you should be able to simply rename the folder that contains your 
tables.... you could
script it if you had to, either in Perl or a Win32 batch file, depending on your 
system.

# Nathan


----- Original Message -----
From: "JC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 12:10 PM
Subject: renaming a database


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm kind of interested to find if there is a way to rename a database
with something like the alter command.
Looking in the index of the New Riders MySQL book I don't see
anything other than renaming tables
Looking through the Manual for  version 3 Nothing shows up
Looking at the mailing list archieve I don't see anything either

I'm running 3.23.46-nt running on windows 2000 advanced server as a
service.

I'm thinking that the only way around this would be to do a mysqldump
for that database and then creating a new database with the desired
name and importing the contents of the dump file.

I'd like to be able to just rename the database from the command line
just like you would a table.

Thanks in advance,

JC

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPFhE+XX+hJvt5DtWEQLSDQCgozPP+RqD56w4BQa8V+d/EviLH3EAnjN0
1TJ0ZkSsYXT0wiGWDarMwNRb
=zrmt
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
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