but was found to be dangerous
and
was removed in MySQL 5.1.23...However, use of this statement could
result in loss of database contents, which is why it was removed. Do not
use RENAME DATABASE in earlier versions in which it is present.
Seriously? Please explain why a simple rename
in MySQL 5.1.23...However, use of this statement could
result in loss of database contents, which is why it was removed. Do
not use RENAME DATABASE in earlier versions in which it is present.
Seriously? Please explain why a simple rename of a database is such a
daunting task to mySQL/Sun
On Fri, Dec 11, 2009 at 1:56 PM, Ken D'Ambrosio k...@jots.org wrote:
rename table oldschema.table to newschema.table;
Just to be 100% clear -- I assume you have to first create the destination
database, and then do this for all the tables in the source database?
Yep. Easily scriptable,
If you want to move the database atomically, a RENAME TABLE statement
may have multiple clauses.
RENAME TABLE
olddb.foo to newdb.foo,
olddb.bar to newdb.bar;
Here, I hot-swap a new lookup table 'active.geo' into a live system
confident that, at any given point, some version of this
Can you use that syntax if the databases are on different file systems? If
you can, and the original table is big, the command would take a while as it
moved data from one file system to another.
On Fri, Dec 11, 2009 at 7:58 AM, Johan De Meersman vegiv...@tuxera.bewrote:
On Fri, Dec 11, 2009
According to MySQL docs, it should still work atomically. Granted, I
have only used this particular trick when they are on the same
filesystem. Copying across filesystems, I imagine it should still be
atomic, but your system may be locked for awhile.
Obviously, a dedicated RENAME DATABASE
it simply changing pointers or is it a full on
copy/rm? (Assume same filesystem/directory)
-Original Message-
From: Michael Dykman [mailto:mdyk...@gmail.com]
Sent: Friday, December 11, 2009 6:08 AM
To: MySql
Subject: Re: Are you serious? mySQL 5.0 does NOT have a
RENAME DATABASE?
If you
5.0 does NOT have a
RENAME DATABASE?
If you want to move the database atomically, a RENAME TABLE statement
may have multiple clauses.
RENAME TABLE
olddb.foo to newdb.foo,
olddb.bar to newdb.bar;
Here, I hot-swap a new lookup table 'active.geo' into a live system
confident
On Fri, Dec 11, 2009 at 10:40 PM, Daevid Vincent dae...@daevid.com wrote:
Will this work in 5.0?
Yes.
If I'm reading this right, it seems like this is some kind of trick or
loophole then right? If it works and solves my dilemna, I'm fine with that,
but I'm just curious.
Not really, this
if you have myisam alone tables you can rename the folder of the database. That
can work like rename database. If you have innodb table you have to move one by
one table because details of those tables will be stored in innodb shared table
space. Moving folder cannot work.
Thanks,
Saravanan
: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?
if you have myisam alone tables you can rename the folder of the database. That
can work like rename database. If you have innodb table you have to move one by
one table because details of those tables will be stored in innodb shared
a
RENAME DATABASE?
Don't forget triggers, stored routines, views, database/table
specific user permissions, and replication/binlog options!
Regards,
Gavin Towey
-Original Message-
From: Saravanan [mailto:suzuki_b...@yahoo.com]
Sent: Friday, December 11, 2009 2:02 PM
To: MySql
5.1.23...However, use of this statement could result
in loss of database contents, which is why it was removed. Do not use
RENAME DATABASE in earlier versions in which it is present.
Seriously? Please explain why a simple rename of a database is such a
daunting task to mySQL/Sun that all their brilliant
contents, which is why it was removed. Do not
use RENAME DATABASE in earlier versions in which it is present.
Seriously? Please explain why a simple rename of a database is such a
daunting task to mySQL/Sun that all their brilliant minds can't figure
this one out?
Why isn't there even a bug
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
I used a simple procedure to rename my MySQL 4.1.22 database, which has
only My-ISAM tables:
1. Stopped MySQL
2. Renamed the database directory from olddbname to newdbname
3. Started mysql
At this point, I grepped for 'olddbname' and found that many of the old
.MYI files still had references
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
Nanni Claudio wrote:
You can try to dump-to-sql the whole DB,
Create a new DB and import the sql-dump in the new DB.
Aloha!
Claudio
-Messaggio originale-
Da: Thomas Raso [mailto:[EMAIL PROTECTED]
Inviato: martedì 12 febbraio 2008 17.20
A: mysql@lists.mysql.com
Oggetto: rename
You can try to dump-to-sql the whole DB,
Create a new DB and import the sql-dump in the new DB.
Aloha!
Claudio
-Messaggio originale-
Da: Thomas Raso [mailto:[EMAIL PROTECTED]
Inviato: martedì 12 febbraio 2008 17.20
A: mysql@lists.mysql.com
Oggetto: rename database in 4.1
hi list
hi list,
how can I rename a database with full innodb tables ?
The version is 4.1
Thnaks all
Team.
- Original Message -
From: jagdish gunjal [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, December 08, 2006 10:25 AM
Subject: How to rename database name
Hi all,
Does any know command to rename the database name in Mysql db.
-
Find out
1. 'mysqldump' the current database, drop it and create a new database.
Move the dumped data into the new database.
This should work with any engine.
2. Stop mysqld. Rename the database folder in the datadirectory. Start
the server and grant access permissions
This does imho only work
Hi all,
Does any know command to rename the database name in Mysql db.
-
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it
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
to be changed, but I don't know where those are. Could someone point me
to be changed, but I don't know where those are. Could someone point me
in
the right direction?
Thanks,
Jesse
There is no command to RENAME DATABASE in MySQL. However you can create a
new, empty database and populate it with data 2 ways:
A) rename all of the table so that their name
Hi, Is there a way I can rename a database? or at least copy an old database
with existing tables into
a new one?
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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
encountered yet?
Thanks
Bartis, Robert M (Bob) [EMAIL PROTECTED] 5/20/04 1:37:20 PM
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
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
Experts:
Is it possible to rename existing database ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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
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:
hi Joffrey,
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 staff512 Sep 28 19:58 mysql
William,
Tuesday, October 02, 2001, 11:18:48 AM, you wrote:
I am curious how to rename a database in MySQL 4.0 running on win2k
server.
If your database contains only ISAM/MyISAM tables you can do it like
- shutdown MySQL server
- rename database dir
- restart MySQL server
--
For technical
[FILTER:sql, query, database, MySQL]
- Original Message -
From: William Martell [EMAIL PROTECTED]
To: win32 MySQL List [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 1:27 AM
Subject: Rename Database
Hello All,
I am curious how to rename a database in MySQL 4.0 running on win2k
Exists any way to rename a database ?
Thanks Jorge
sql
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread,
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
Is it possible to rename a database?
-
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]
Hi Brandon,
It is possible if you are you are using myisam or DBD table types,
but you have to rename the directory from the Unix shell prompt.
There is not yet a RENAME DATABASE command (althought it is on the
todo list) and no way that I know of (short of renaming each table if
you only have
Is it possible to rename a database?
I would assume that the only way to do is is to
shut down the server, then rename the directory
of the database.
/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq
; [EMAIL PROTECTED]
Subject: RE: Is it possible to Rename Database
Is it possible to rename a database?
I would assume that the only way to do is is to
shut down the server, then rename the directory
of the database.
/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL
; [EMAIL PROTECTED]
Subject: RE: Is it possible to Rename Database
Or, use mysqldump to dump the entire database, edit the CREATE
DATABASE line
at the top to the new name and pipe it all back into mysql, then drop the
old one?
-ravi
-Original Message-
From: Carsten H. Pedersen
56 matches
Mail list logo