Feng, ----- Alkuperäinen viesti ----- Lähettäjä: "Wang Feng" <[EMAIL PROTECTED]> Vastaanottaja: "Heikki Tuuri" <[EMAIL PROTECTED]> Lähetetty: Wednesday, October 01, 2003 11:26 AM Aihe: Re: can NOT drop the database
> > > > BTW, how can I rename a database? > > > > if you only have MyISAM tables, you can shut down mysqld and rename the > > directory. > > Works!! :-) > > > >But that does not work for InnoDB tables. For them, the only way > > is to use the command RENAME to raname each table individually. > > Heikki, what do you mean 'rename each table individually'? I want to rename > the Database, not the tables. > > Assume I have 2 tables, one is called table_1 (MyISAM type), the other is > table_2 (InnoDB type). They are all stored in the database called db1, Now I > want to change the database name to db1_new. How can I achieve that by > 'renaming' the table_2 individually? > > Please help me to explainn. http://www.mysql.com/doc/en/RENAME_TABLE.html " As long as two databases are on the same disk you can also rename from one database to another: RENAME TABLE current_db.tbl_name TO other_db.tbl_name; " Best regards, Heikki Innobase Oy http://www.innodb.com InnoDB - transactions, row level locking, and foreign keys for MySQL InnoDB Hot Backup - a hot backup tool for MySQL Order MySQL support from http://www.mysql.com/support/index.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]