Are you serious? mySQL 5.0 does NOT have 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: Sarava
t: Re: 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 s
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
On Fri, Dec 11, 2009 at 10:40 PM, Daevid Vincent 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 is by desig
; 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 want to move the database atomically, a RENAME TABLE statement
>> may have multiple clauses.
>>
>> RENA
mv' command where 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? mySQ
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
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 wrote:
> On Fri, Dec 11, 2009 at 1:56 PM, Ken D'A
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 t
On Fri, Dec 11, 2009 at 1:56 PM, Ken D'Ambrosio 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, though :-)
week to do (3 days each way and that doesn't
>>> even begin to touch on the fact the server would be down)! WTF!?
>>>
>>> We're running Ubuntu LTS 8.04 w/ Ver 14.12 Distrib 5.0.51a, for
>>> debian-linux-gnu (i486) using readline 5.2
>>>
>>> Ev
nning Ubuntu LTS 8.04 w/ Ver 14.12 Distrib 5.0.51a, for
> > debian-linux-gnu (i486) using readline 5.2
> >
> > Even the manual for 5.1 says this can lose data:
> > http://dev.mysql.com/doc/refman/5.1/en/rename-database.html
> > "This statement was added in MySQL
7 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 ex
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 of a database is such a
d
On Mon, Nov 23, 2009 at 7:37 AM, Johan De Meersman wrote:
> 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 database before moving
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 wrote:
> >RENAME TABLE
> > olddb.table1 TO newdb.table1,
> > olddb.table2 TO newdb.table2
>
> >put the whole list in here, the whole statement
Does this work if any of the tables are InnoDB?
On Mon, Nov 23, 2009 at 8:17 AM, Robinson, Eric wrote:
> >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 dat
>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
m
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 who
On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric wrote:
> > 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
> 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
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 wrote:
> I used a simple procedure to rename my MySQL 4.1.22 database, which has
> only My-ISAM tables:
>
> 1. Stopped MySQL
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 to
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
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 for
ViSolve DB Team.
- Original Message -
From: "jagdish gunjal" <[EMAIL PROTECTED]>
To:
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.
--
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
re are probably several places that
need
> 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
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 in
ECTED]
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 makin
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 problem
y 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
with existing tables into
a new one?
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://list
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
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]
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,
27;;
'''[EMAIL PROTECTED]' ' '
Sent: 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]&
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:
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 wr
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 renam
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.
-Orig
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
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]
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-- 2staff512 Sep 28 19:58 m
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://
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 serv
[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
27, 2002 11:57 AM
Subject: rename database
> Exists any way to rename a database ?
>
> Thanks Jorge
>
> sql
>
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php (the man
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 t
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, e
en; Brandon Lewis; [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?
>
>
It's the only way with InnoDB short of renaming each table in the
format:
RENAME TABLE olddb.table1 TO newdb.table1
Ken
>
> That's sort of taking the long way around the barn, isn't it?
>
> Will
>
-
Before posting, please check
ginal Message-
> From: Ravi Raman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 03, 2001 6:04 PM
> To: Carsten H. Pedersen; Brandon Lewis; [EMAIL PROTECTED]
> Subject: RE: Is it possible to Rename Database
>
>
> Or, use mysqldump to dump the entire database, edit the
; [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
> 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
-
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?
-
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]>
58 matches
Mail list logo