Weird mysql problem
I am trying to take a backup of a mysql database used by WO app from a live server and restoring onto my laptop so I can test the migration code in the new version with a live data set. I've created a sql script from the live database using backup feature of mysqlworkbench. However when I try to import this into mysql running on the laptop I get the following error: Error Code: 1050 Table 'eo_pk_table' already exists but the table doesn't exist as far as I can tell, the sql for creating the table is: DROP TABLE IF EXISTS `EO_PK_TABLE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `EO_PK_TABLE` ( `NAME` char(40) default NULL, `PK` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; And this happens even if I drop the database before trying the import. Any ideas as I can't see why this is happening... Thanks Mark ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Weird mysql problem
What is the case insensitivity on MySQL set to? Paul On Sep 5, 2010, at 9:21 AM, Mark Woollard wrote: I am trying to take a backup of a mysql database used by WO app from a live server and restoring onto my laptop so I can test the migration code in the new version with a live data set. I've created a sql script from the live database using backup feature of mysqlworkbench. However when I try to import this into mysql running on the laptop I get the following error: Error Code: 1050 Table 'eo_pk_table' already exists but the table doesn't exist as far as I can tell, the sql for creating the table is: DROP TABLE IF EXISTS `EO_PK_TABLE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `EO_PK_TABLE` ( `NAME` char(40) default NULL, `PK` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; And this happens even if I drop the database before trying the import. Any ideas as I can't see why this is happening... Thanks Mark ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Weird mysql problem
I've got a similar problem once. Didn't try to solve it. I dropped the database, create a new one and do the restore into it. Just my 2 cts. David B. Le 5 sept. 10 à 13:31, Paul D Yu a écrit : What is the case insensitivity on MySQL set to? Paul On Sep 5, 2010, at 9:21 AM, Mark Woollard wrote: I am trying to take a backup of a mysql database used by WO app from a live server and restoring onto my laptop so I can test the migration code in the new version with a live data set. I've created a sql script from the live database using backup feature of mysqlworkbench. However when I try to import this into mysql running on the laptop I get the following error: Error Code: 1050 Table 'eo_pk_table' already exists but the table doesn't exist as far as I can tell, the sql for creating the table is: DROP TABLE IF EXISTS `EO_PK_TABLE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `EO_PK_TABLE` ( `NAME` char(40) default NULL, `PK` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; And this happens even if I drop the database before trying the import. Any ideas as I can't see why this is happening... Thanks Mark ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/bon_d%40mac.com This email sent to bo...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Weird mysql problem
Restart of mysqld seems to have fixed whatever the issue was! Mark On 5 Sep 2010, at 10:11, David BON wrote: I've got a similar problem once. Didn't try to solve it. I dropped the database, create a new one and do the restore into it. Just my 2 cts. David B. Le 5 sept. 10 à 13:31, Paul D Yu a écrit : What is the case insensitivity on MySQL set to? Paul On Sep 5, 2010, at 9:21 AM, Mark Woollard wrote: I am trying to take a backup of a mysql database used by WO app from a live server and restoring onto my laptop so I can test the migration code in the new version with a live data set. I've created a sql script from the live database using backup feature of mysqlworkbench. However when I try to import this into mysql running on the laptop I get the following error: Error Code: 1050 Table 'eo_pk_table' already exists but the table doesn't exist as far as I can tell, the sql for creating the table is: DROP TABLE IF EXISTS `EO_PK_TABLE`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `EO_PK_TABLE` ( `NAME` char(40) default NULL, `PK` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; And this happens even if I drop the database before trying the import. Any ideas as I can't see why this is happening... Thanks Mark ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com This email sent to p...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/bon_d%40mac.com This email sent to bo...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Weird mysql problem
On Sep 5, 2010, at 6:31 AM, Paul D Yu wrote: What is the case insensitivity on MySQL set to? Paul On Sep 5, 2010, at 9:21 AM, Mark Woollard wrote: I am trying to take a backup of a mysql database used by WO app from a live server and restoring onto my laptop so I can test the migration code in the new version with a live data set. I've created a sql script from the live database using backup feature of mysqlworkbench. However when I try to import this into mysql running on the laptop I get the following error: [...] I had a similar problem. I also could not drop certain tables so maybe this helps: I now have this in my /etc/my.cnf: lower_case_table_names = 1 MySQL says this: 1: Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases. (http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html) I also changed all my table names to lowercase in the EOModel to make sure. kib Success is not final, failure is not fatal: it is the courage to continue that counts. Winston Churchill Klaus Berkling Web Application Dev. Systems Administrator DynEd International, Inc. www.dyned.com | www.eskimo.com/~kiberkli ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Weird mysql problem
My take is setting to lower case table is no.1 item to avoid issues later. Workbench sometimes couldn't generate values properly in my cases, view and edit my.cnf whenever necessary. I now have this in my /etc/my.cnf: lower_case_table_names = 1 MySQL says this: 1: Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases. (http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com