Re: Renaming a table that has a trigger, then attempting to drop that trigger results in 'table doesn't exist' error.

2016-01-18 Thread shawn l.green
Hello Michael, On 1/6/2016 12:51 PM, Michael Vaughan wrote: If you execute the script below, you will get the following error: 'Error Code: 1146. Table 'testschema.TestRenamed' doesn't exist" delimiter // CREATE TABLE Test( id int not null primary key auto_increment, name varchar(255) )

RE: Renaming a database?

2011-05-24 Thread Daevid Vincent
> -Original Message- > On Tue, May 24, 2011 at 4:19 PM, Jerry Schwartz wrote: > > > It looks like there’s no way to rename a database. Is that true? I know. Retarded right? Version 5.1.x and still what would seem the most basic of tasks is still impossible. Maybe Oracle can fix what M

RE: Renaming a database?

2011-05-24 Thread Jerry Schwartz
From: Andrew Moore [mailto:eroomy...@gmail.com] Sent: Tuesday, May 24, 2011 2:56 PM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: Renaming a database? Could you try restoring the other db with another name and changing the connection string in the app? [JS] I could, but it

Re: Renaming a database?

2011-05-24 Thread Andrew Moore
Could you try restoring the other db with another name and changing the connection string in the app? On 24 May 2011 16:20, "Jerry Schwartz" wrote: > It looks like there’s no way to rename a database. Is that true? > > > > I have two reasons for wanting to do this: > > > > - I want to get a curren

RE: Renaming a database?

2011-05-24 Thread Jerry Schwartz
>-Original Message- >From: Andrew Moore [mailto:eroomy...@gmail.com] >Sent: Tuesday, May 24, 2011 11:31 AM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Renaming a database? > >Instead of renaming it, revoke permissions to it. If it's be

RE: Renaming a database?

2011-05-24 Thread Jerry Schwartz
>-Original Message- >From: Johan De Meersman [mailto:vegiv...@tuxera.be] >Sent: Tuesday, May 24, 2011 11:52 AM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Renaming a database? > >- Original Message - >> From: "Jerry Schwartz"

Re: Renaming a database?

2011-05-24 Thread Johan De Meersman
- Original Message - > From: "Jerry Schwartz" > > It looks like there’s no way to rename a database. Is that true? Yes. Silly oversight, although there's probably complexity reasons behind it. > - I want to get a current version of a database out of the way so > that I can load in an old

Re: Renaming a database?

2011-05-24 Thread Andrew Moore
Instead of renaming it, revoke permissions to it. If it's being used you should see some problems in the application due to access denied. Andy On Tue, May 24, 2011 at 4:19 PM, Jerry Schwartz wrote: > It looks like there’s no way to rename a database. Is that true? > > > > I have two reasons fo

Re: Renaming a Database

2009-08-19 Thread Matt Neimeyer
t; New York, NY 10013 > 212-625-5307 (Work) > 201-660-3221 (Cell) > AIM & Skype : RolandoLogicWorx > redwa...@logicworks.net > > -Original Message- > From: Matt Neimeyer [mailto:m...@neimeyer.org] > Sent: Wednesday, August 19, 2009 9:27 AM > To: Paul DuB

RE: Renaming a Database

2009-08-19 Thread Rolando Edwards
mp; Skype : RolandoLogicWorx redwa...@logicworks.net -Original Message- From: Matt Neimeyer [mailto:m...@neimeyer.org] Sent: Wednesday, August 19, 2009 9:27 AM To: Paul DuBois Cc: mysql@lists.mysql.com Subject: Re: Renaming a Database >> That said... Is there anything "wrong" (da

Re: Renaming a Database

2009-08-19 Thread Matt Neimeyer
>> That said... Is there anything "wrong" (dangerous, disasterous, etc) >> with stopping the MySQL service and renaming the folder in the MySQL >> data folder? By my logic (if I'm right) this should preserve any >> permissions on the folder and since the service is stopped it should >> simply find

Re: Renaming a Database

2009-08-17 Thread Paul DuBois
On Aug 17, 2009, at 4:22 PM, Matt Neimeyer wrote: I know the "best" way to rename a database is to use mysqldump, extract the database and then reload to the new database. (At least based on what I can find in the "12.1.32. RENAME DATABASE Syntax" section of the documentation) That said... Is

Re: renaming database

2007-04-14 Thread Gabriel PREDA
Or if "RENAME DATABASE" is not implemented yet: CREATE newDatabase; then for each table in the oldDatabase issue: ALTER TABLE oldDatabase.tblX RENAME TO newDatabase.tblX After all is done: DROP oldDatabase -- -- -- -- -- -- -- -- -- -- -- -- -- -- Gabriel PREDA Senior Web Developer -- MySQL

Re: renaming database

2007-04-12 Thread Micah Stevens
Yeah, in SQL: RENAME DATABASE start_name TO new_name; -Micah On 04/12/2007 01:34 AM, Octavian Rasnita wrote: Hi, How can I rename a database if it contains InnoDB tables? I have tried renaming the directory where it is located, but it doesn't work this way. Is there a method that works fa

Re: Renaming the root user - problems.

2006-12-07 Thread Jonathan Mangin
- Original Message - From: "Daniel da Veiga" <[EMAIL PROTECTED]> To: Sent: Thursday, December 07, 2006 9:48 AM Subject: Re: Renaming the root user - problems. > On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > > > my

Re: Renaming the root user - problems.

2006-12-07 Thread Daniel da Veiga
On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello, my question refers to the user "root" in MySQL 5.0.22. Is the standard MySQL root user really required with the name "root" or can I rename the root user for example to "myroot"? No, it isn't required, you can rename it or simpl

Re: Renaming the root user - problems.

2006-12-07 Thread Dominik Klein
[EMAIL PROTECTED] schrieb: Hello, my question refers to the user "root" in MySQL 5.0.22. Is the standard MySQL root user really required with the name "root" or can I rename the root user for example to "myroot"? Our software vendor affirms that MySQL need the User "root" always but I argue

Re: Renaming the root user - problems.

2006-12-07 Thread Visolve DB Team
Hi No. MySQL doesn't insist on any 'root' user. If necessary you can rename it. If you have the supervisor privileges, you can edit the same. Make sure to Grant Permissions. For instance: mysql> grant all on *.* to 'myroot'@localhost identified by 'myroot'; Thanks ViSolve DB Team. -

Re: renaming the database

2005-10-17 Thread Peter Brawley
Errm, needed to take the grants table updates out of the repat loop: CREATE PROCEDURE RenameDatabase (IN oldname CHAR(64), IN newname CHAR(64)) BEGIN DECLARE sname CHAR(64) DEFAULT NULL; DECLARE rows INT DEFAULT 1; DECLARE total INT DEFAULT 0; CREATE DATABASE IF NOT EXISTS newname; REPEAT

Re: renaming the database

2005-10-17 Thread Peter Brawley
Shawn wrote >I have a 2.1GB database with all InnoDB tables in it that I wanted to >change the name of. It took me longer to write my RENAME TABLE >script than it did to actually move the data. It's easier & less error-prone to do it in an sproc which prepares & executes the rename cmds. On

Re: renaming the database

2005-10-17 Thread Gleb Paharenko
Hello. This is a frequently asked question. See: http://lists.mysql.com/mysql/188094 For more solutions search in the archives at: http://lists.mysql.com Octavian Rasnita wrote: > Hi, > > Is there a command for renaming a MySQL database? > > Thank you. > > Teddy >

Re: renaming the database

2005-10-17 Thread SGreen
Robert L Cochran <[EMAIL PROTECTED]> wrote on 10/17/2005 11:00:33 AM: > And, of course, you need to grant permissions for the new database name. > > Bob > > [EMAIL PROTECTED] wrote: > > >Robert L Cochran <[EMAIL PROTECTED]> wrote on 10/17/2005 07:37:26 AM: > > > > > > > >>I think you can just

Re: renaming the database

2005-10-17 Thread Robert L Cochran
And, of course, you need to grant permissions for the new database name. Bob [EMAIL PROTECTED] wrote: Robert L Cochran <[EMAIL PROTECTED]> wrote on 10/17/2005 07:37:26 AM: I think you can just rename the directory that that database lives in. If you read the documentation for CREATE DATAB

Re: renaming the database

2005-10-17 Thread SGreen
Robert L Cochran <[EMAIL PROTECTED]> wrote on 10/17/2005 07:37:26 AM: > I think you can just rename the directory that that database lives in. > If you read the documentation for CREATE DATABASE in dev.mysql.com, > you'll see they discuss renaming the directory (although it does not > directly

Re: renaming the database

2005-10-17 Thread Robert L Cochran
I think you can just rename the directory that that database lives in. If you read the documentation for CREATE DATABASE in dev.mysql.com, you'll see they discuss renaming the directory (although it does not directly say this can be done to rename the database, but it comes really close to that

Re: renaming the database

2005-10-17 Thread Jigal van Hemert
C.R. Vegelin wrote: What about renaming the folder indicating the database name. I work with Windows XP and renaming a folder works well. Cor, Have you tried it with InnoDB tables or anything other than MyISAM tables? InnoDB uses a single tablespace per server (unless specified that it shoul

Re: renaming the database

2005-10-17 Thread C.R. Vegelin
onday, October 17, 2005 12:11 PM Subject: Re: renaming the database Octavian Rasnita wrote: Is there a command for renaming a MySQL database? Sorry, there is no command for that. For small databases you can use administration tools like phpMyAdmin, etc. which will do it for you by duplicating

Re: renaming the database

2005-10-17 Thread Octavian Rasnita
vian Rasnita" <[EMAIL PROTECTED]> Cc: Sent: Monday, October 17, 2005 12:11 PM Subject: Re: renaming the database > Octavian Rasnita wrote: > > Is there a command for renaming a MySQL database? > > Sorry, there is no command for that. For small databases you can use >

Re: renaming the database

2005-10-17 Thread Jigal van Hemert
Octavian Rasnita wrote: Is there a command for renaming a MySQL database? Sorry, there is no command for that. For small databases you can use administration tools like phpMyAdmin, etc. which will do it for you by duplicating the database structure and data, and then drop the 'old' database.

Re: renaming indexes

2005-09-06 Thread Jason Pyeron
I do not want to change any details about a field. I only want to rename an index. The index is not involved in a PRIMARY key, albeit the index in question is a UNIQUE key. On Tue, 6 Sep 2005, m i l e s wrote: Jason, The only way that I can think to do this is the change its status as a pr

Re: renaming indexes

2005-09-06 Thread m i l e s
Jason, The only way that I can think to do this is the change its status as a primary key field... Once you do that, you can rename the field, and then reinitiate it as a primary keyfield. M i l e s. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubsc

Re: renaming a database

2005-08-22 Thread Gleb Paharenko
Hello. One possible solution is to create a new database, and then RENAME TABLE each table from the original database into the new database. Then drop the original database. "Octavian Rasnita" <[EMAIL PROTECTED]> wrote: > Hi, > > Please tell me how to rename a database. I couldn't fin

Re: renaming a database

2005-08-21 Thread Peter Brawley
Octavian >Please tell me how to rename a database. As you already found, there are database features that don't survive renaming its directory. Best method I know is to mysqldump it and recreate it from the dump under the desired name. PB http://www.artfulsoftware.com - Octavian Rasni

RE: Renaming a database

2005-07-18 Thread Gordon Bruce
A database in MySQL is simply a directory.   So just rename the directory with appropriate tool for your platform. On my test box this becomes   mysql> show databases; ++ | Database   | ++ | information_schema | | lois 

Re: Renaming a database

2005-07-18 Thread SGreen
Scott Hamm <[EMAIL PROTECTED]> wrote on 07/18/2005 12:01:49 PM: > How do I rename a database? The help online is pretty ambigous. > > -- > Power to people, Linux is here. I wouldn't say "ambiguous". I would rather say "indirect". Renaming a database is nearly the same thing as moving tables t

Re: Renaming an index

2004-04-02 Thread Egor Egorov
"Chad Attermann" <[EMAIL PROTECTED]> wrote: > Hello, > > Through some strange quirk in my MySQL console application (an older version of > PHPMyAdmin), 4 indexes that I created on different columns of a table all resulted > in indexes with the same keyname, that of the first column that was index

Re: renaming

2003-03-08 Thread Paul DuBois
At 19:09 +0100 3/8/03, PaT! wrote: Hi, I need to change a column name. I wonder if there's any faster and simpler way to do it than: ALTER TABLE table_name CHANGE old_column_name new_column_name create_clause; No, that's how you do it. Thanks for the support. Patrizio Pino Roma - Italia sql

re: RE: renaming temporary table

2003-02-18 Thread Egor Egorov
On Monday 17 February 2003 18:47, Arne dot Muller at aventis dot com wrote: > I've tried to rename a temporary table, and I got an error > > ERROR 1017: Can't find file: './GOdevel/xgp.frm'). > > I guess it does not make too much sense to rename a temp table ... . > However, > I thought this might

RE: renaming temporary table

2003-02-17 Thread Arne . Muller
Hello, I've tried to rename a temporary table, and I got an error ERROR 1017: Can't find file: './GOdevel/xgp.frm'). I guess it does not make too much sense to rename a temp table ... . However, I thought this might be worth mentioning. regards, Arne not to be bounced: sql,

Re: Renaming database

2002-04-19 Thread Victoria Reznichenko
MH, Thursday, April 18, 2002, 11:50:12 PM, you wrote: M> Is there a "sanctioned" way to rename a MySQL 3.23.x database, consisting M> of MyISAM tables? 1. Take down the MySQL server. 2. Rename dir, that contains tables(files) of your database. 3. Start the MySQL server. 4. Don't forget to corr

Re: renaming

2002-04-04 Thread Katharina Daskalaki Aikaterini
[EMAIL PROTECTED] wrote: > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > sql,query > > If you just reply to this message, and include the entire text o

Re: renaming a database

2002-01-30 Thread Nathan
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 tab

Re: renaming a database

2002-01-30 Thread Paul DuBois
At 11:10 -0800 1/30/02, JC wrote: >-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 >Lo

RE: renaming a database

2001-11-11 Thread Heikki Tuuri
Hi! >> Can you rename a database? If so, how does it handle all the >> tables inside it? > >By shutting down the server, renaming the directory >of that database and restarting the server. > >The server will be able to handle the change just fine. Sorry, but InnoDB tables do not get renamed

RE: renaming a database

2001-11-10 Thread Carsten H. Pedersen
> Can you rename a database? If so, how does it handle all the > tables inside it? By shutting down the server, renaming the directory of that database and restarting the server. The server will be able to handle the change just fine. / Carsten -- Carsten H. Pedersen keeper and maintainer o

Re: Renaming Columns...

2001-09-12 Thread Paul DuBois
>How??? ALTER TABLE table1 RENAME ??? >Tried it, dont work. That renames the table itself. ALTER TABLE tbl_name CHANGE old_name new_name column_definition where column_definition is how you defined the column when you created it. For example if you have a table CREATE TABLE xyz ( c CHAR(

Re: Renaming and/or copying a database

2001-03-20 Thread Fred van Engen
On Tue, Mar 20, 2001 at 10:03:34AM +0100, Fred van Engen wrote: > Third: > > RENAME TABLE tbl_name TO new_table_name; > > (see http://www.mysql.com/doc/R/E/RENAME_TABLE.html ) > > Fourth: > > ALTER TABLE tbl_name RENAME [TO] new_table_name; > > (see http://www.mysql.com/doc/A/L/ALTER_TABLE.ht

Re: Renaming and/or copying a database

2001-03-20 Thread Fred van Engen
On Tue, Mar 20, 2001 at 08:27:39AM +0100, René Tegel wrote: > copying tables between databases: > > create table db2.table2 select * from db1.table1; > > however, you'll loose meta data (indexes) on this table, so you'd have to > create them again. > > second method: > use the explorer or a dos

Re: Renaming and/or copying a database

2001-03-19 Thread René Tegel
copying tables between databases: create table db2.table2 select * from db1.table1; however, you'll loose meta data (indexes) on this table, so you'd have to create them again. second method: use the explorer or a dos shell to rename any table or db as shown in the \mysql\bin directory. From wi