Re: mysqldump not escaping single quotes in field data
mysqldump --databases test --tables ananda > test.dmp mysql> show create table ananda\G; *** 1. row *** Table: ananda Create Table: CREATE TABLE `ananda` ( `id` int(11) DEFAULT NULL, `name` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) On Sat, Jun 16, 2012 at 3:36 AM, Rick James wrote: > Are you using an abnormal CHARACTER SET or COLLATION? > SHOW CREATE TABLE > Show us the args to mysqldump. > > > -Original Message- > > From: James W. McNeely [mailto:j...@newcenturydata.com] > > Sent: Friday, June 15, 2012 10:19 AM > > To: mysql@lists.mysql.com > > Subject: mysqldump not escaping single quotes in field data > > > > My backups from a mysqldump process are useless, because the dump files > > are not escaping single quotes in the data in the fields. > > > > So, O'Brien kills it - instead of spitting out 'O\'Brien' > > it spits out > > 'O'Brien' > > > > I don't see anywhere in the documentation about mysqldump where you can > > tweak this kind of thing. > > > > We're using MySQL 5.0.70 enterprise on Ubuntu 8.04.1. > > > > I tried to enter this into the Oracle support center but all of the > > navigational and SR tabs are gone. Maybe our accounting dept. forgot to > > pay the bill or something. > > > > Thanks, > > > > Jim McNeely > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe:http://lists.mysql.com/mysql > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql > >
RE: mysqldump not escaping single quotes in field data
Are you using an abnormal CHARACTER SET or COLLATION? SHOW CREATE TABLE Show us the args to mysqldump. > -Original Message- > From: James W. McNeely [mailto:j...@newcenturydata.com] > Sent: Friday, June 15, 2012 10:19 AM > To: mysql@lists.mysql.com > Subject: mysqldump not escaping single quotes in field data > > My backups from a mysqldump process are useless, because the dump files > are not escaping single quotes in the data in the fields. > > So, O'Brien kills it - instead of spitting out 'O\'Brien' > it spits out > 'O'Brien' > > I don't see anywhere in the documentation about mysqldump where you can > tweak this kind of thing. > > We're using MySQL 5.0.70 enterprise on Ubuntu 8.04.1. > > I tried to enter this into the Oracle support center but all of the > navigational and SR tabs are gone. Maybe our accounting dept. forgot to > pay the bill or something. > > Thanks, > > Jim McNeely > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: mysqldump not escaping single quotes in field data
I have mysql 5.5. I am able to use mysqldump to export data with quotes and the dump had escape character as seen below LOCK TABLES `ananda` WRITE; /*!4 ALTER TABLE `ananda` DISABLE KEYS */; INSERT INTO `ananda` VALUES (1,'ananda'),(2,'aditi'),(3,'thims'),(2,'aditi'),(3,'thims'),(2,'aditi'),(3,'thims'),(2,'aditi'),(3,'thims'),(2,'aditi'),(3,'thims'),(5,'O\'Brien'); /*!4 ALTER TABLE `ananda` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; Import it back to database Database changed mysql> drop table ananda; Query OK, 0 rows affected (0.00 sec) mysql --database test < test.dmp mysql> select * from ananda; +--+-+ | id | name| +--+-+ |1 | ananda | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |5 | O'Brien | +--+-+ May be u want to upgrade you database On Fri, Jun 15, 2012 at 10:48 PM, James W. McNeely wrote: > My backups from a mysqldump process are useless, because the dump files > are not escaping single quotes in the data in the fields. > > So, O'Brien kills it - instead of spitting out > 'O\'Brien' > it spits out > 'O'Brien' > > I don't see anywhere in the documentation about mysqldump where you can > tweak this kind of thing. > > We're using MySQL 5.0.70 enterprise on Ubuntu 8.04.1. > > I tried to enter this into the Oracle support center but all of the > navigational and SR tabs are gone. Maybe our accounting dept. forgot to pay > the bill or something. > > Thanks, > > Jim McNeely > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql > >
mysqldump not escaping single quotes in field data
My backups from a mysqldump process are useless, because the dump files are not escaping single quotes in the data in the fields. So, O'Brien kills it - instead of spitting out 'O\'Brien' it spits out 'O'Brien' I don't see anywhere in the documentation about mysqldump where you can tweak this kind of thing. We're using MySQL 5.0.70 enterprise on Ubuntu 8.04.1. I tried to enter this into the Oracle support center but all of the navigational and SR tabs are gone. Maybe our accounting dept. forgot to pay the bill or something. Thanks, Jim McNeely -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql