RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the whole list in here, the whole statement will be applied to the
system atomically
The database has 1200+ tables, so your approach seems like more work to
me. As it is, all I'm doing is:
service mysql stop
mv
Does this work if any of the tables are InnoDB?
On Mon, Nov 23, 2009 at 8:17 AM, Robinson, Eric eric.robin...@psmnv.comwrote:
RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the whole list in here, the whole statement will be applied to the
system
You don't even need to stop the server afaik. As mentioned previously,
though, works for MyISAM only.
On Mon, Nov 23, 2009 at 3:17 PM, Robinson, Eric eric.robin...@psmnv.comwrote:
RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the whole list in here, the
On Mon, Nov 23, 2009 at 7:37 AM, Johan De Meersman vegiv...@tuxera.bewrote:
You don't even need to stop the server afaik. As mentioned previously,
though, works for MyISAM only.
While this is strictly true there are some big caveats (flushing tables,
etc). It is safer to shut down the
On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric eric.robin...@psmnv.comwrote:
DB engines that have their own data dictionary (Innodb, etc) in
addition to
what is in the .frm could easily be messed up.
Like I said, there are only MyISAM tables in the database, so would there
be any risks
Safer and much less work:
since you have the luxury of stopping the server, stop it, restarting
with skip-networking and log in from a local console which should
guarantee that you are alone on the system.
RENAME TABLE
olddb.table1 TO newdb.table1,
olddb.table2 TO newdb.table2
put the
DB engines that have their own data dictionary (Innodb, etc) in addition to
what is in the .frm could easily be messed up.
On Sat, Nov 21, 2009 at 10:38 AM, Robinson, Eric eric.robin...@psmnv.comwrote:
I used a simple procedure to rename my MySQL 4.1.22 database, which has
only My-ISAM tables:
DB engines that have their own data dictionary (Innodb, etc) in
addition to
what is in the .frm could easily be messed up.
Like I said, there are only MyISAM tables in the database, so would
there be any risks associated with my simple approach?
(Also there are no stored procedures because
Jesse Castleberry [EMAIL PROTECTED] wrote on 11/07/2005 01:31:54 PM:
How can I rename a database in MySQL 5? I've tried renaming he folder,
and
that just causes other problems. Some one sent me a stored procedure to
try, but it will not execute. There are probably several places that
need
http://dev.mysql.com/doc/mysql/en/RENAME_TABLE.html
-Original Message-
From: Ngim Ngau - Kzresults [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 4:50 PM
To: [EMAIL PROTECTED]
Subject: Rename database
Hi, Is there a way I can rename a database? or at least copy an old database
Is there anything wrong with just stopping the server and renaming the
database's directory in the DATA directory? I've used that method
without any problems. It also works very well for making a copy of the
database to a new differently named database. Are there any pitfalls
that I haven't
innodb and dbd
-Original Message-
From: Ed Reed
To: [EMAIL PROTECTED]
Sent: 5/20/04 3:52 PM
Subject: RE: Rename database
Is there anything wrong with just stopping the server and renaming the
database's directory in the DATA directory? I've used that method
without any problems. It also
]
Sent: Thursday, May 20, 2004 2:53 PM
To: [EMAIL PROTECTED]
Subject: RE: Rename database
Is there anything wrong with just stopping the server and renaming the
database's directory in the DATA directory? I've used that method
without any problems. It also works very well for making a copy
You can rename it at the filesystem level.
-Original Message-
From: Chen, Jenny
To: '[EMAIL PROTECTED]'
Sent: 4/16/04 10:18 AM
Subject: rename database
Experts:
Is it possible to rename existing database ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Thanks that's easy.
-Original Message-
From: Victor Pendleton [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 10:28 AM
To: 'Chen, Jenny '; ''[EMAIL PROTECTED]' '
Subject: RE: rename database
You can rename it at the filesystem level.
-Original Message-
From: Chen, Jenny
At 10:28 -0500 4/16/04, Victor Pendleton wrote:
You can rename it at the filesystem level.
What if you have InnoDB or BDB tables?
-Original Message-
From: Chen, Jenny
To: '[EMAIL PROTECTED]'
Sent: 4/16/04 10:18 AM
Subject: rename database
Experts:
Is it possible to rename existing
Oversight on my part. This will not work for those table types.
-Original Message-
From: Paul DuBois
To: Victor Pendleton; 'Chen, Jenny '; ''[EMAIL PROTECTED]' '
Sent: 4/16/04 10:43 AM
Subject: RE: rename database
At 10:28 -0500 4/16/04, Victor Pendleton wrote:
You can rename
Paul,
Do you know if there will be an
ALTER DATABASE RENAME curName TO newName
implementation?
-Original Message-
From: Victor Pendleton
To: 'Paul DuBois '; Victor Pendleton; ''Chen, Jenny ' ';
'''[EMAIL PROTECTED]' ' '
Sent: 4/16/04 10:55 AM
Subject: RE: rename database
Oversight
: 4/16/04 10:55 AM
Subject: RE: rename database
Oversight on my part. This will not work for those table types.
-Original Message-
From: Paul DuBois
To: Victor Pendleton; 'Chen, Jenny '; ''[EMAIL PROTECTED]' '
Sent: 4/16/04 10:43 AM
Subject: RE: rename database
At 10:28 -0500 4/16/04, Victor
Thanks for the information.
-Original Message-
From: Paul DuBois
To: Victor Pendleton; '''Chen, Jenny ' ' '; [EMAIL PROTECTED]' ' ' '
Sent: 4/16/04 11:18 AM
Subject: RE: rename database
At 11:03 -0500 4/16/04, Victor Pendleton wrote:
Paul,
Do you know if there will be an
ALTER
On Friday, September 27, 2002, at 07:57 AM, Jorge Martinez wrote:
Exists any way to rename a database ?
Thanks Jorge
sql
You can create a new database and then:
Rename Table old_database.table_name to new_database.table_name.
You would have to do this for every table. You could then
From what I heard, yes.
If you stop MySQL, then rename the
dir/database.
It may work. Worked for me (did it
about 3 months ago).
HTH,
Ricardo.
- Original Message -
From: Jorge Martinez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 11:57 AM
Subject: rename
22 matches
Mail list logo