RE: Newbie Q - Re: Copying databases
Yes I had thought I should use tools to copy, but I have had problems with mysqldump. I successfully created a dump file, but when I execute this file on an empty database I got: C:\xampp\xampp\mysql\bin>mysql -uroot db2 < test1.txtERROR 1064 at line 54: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'on date NOT NULL default '-00-00', PRIMARY KEY (staff,shrefering I presume to CREATE TABLE shift ( staff char(20) NOT NULL default '', shift char(1) NOT NULL default '', client char(20) default NULL, role char(1) default NULL, on date NOT NULL default '-00-00', PRIMARY KEY (staff,shift,on),... etc Could it be that the version of mysqldump that has been installed is not in step with the server or are there some issues with SQL generated by mysqldump. I have MySQL 4.0.18 and the mysqldump is : mysqldump Ver 9.10 Distrib 4.0.17, for Win95/Win98 (i32)By Igor Romanenko, Monty, Jani & Sinisa This is not an installation I have control over. Soryy to be a pain, any ideas? Andrew H
RE: Newbie Q - Re: Copying databases
http://dev.mysql.com/doc/mysql/en/backup.html It's better to backup with tools. You will be sure that tables are FULL-locked. Best Regards Mathias FATENE Hope that helps *This not an official mysql support answer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: samedi 30 avril 2005 00:30 To: mysql@lists.mysql.com Subject: Newbie Q - Re: Copying databases I am having to operating MySQL 4.0.18, I had heared that I could copy a db folder out of the mysql/data folder to the same folder on a different machine running its own local host server and that server would have a copy of the database. HOWEVER, o some occasions this seemed to work Ok, and on others I could use db, show tables etc, but on select I got a failure (which unfortunately I have not copied sorry) something to do with finding?.innodb. Now as far as I know both servers were at the same version and both had innodb enabled and I THNK I quit both clients before copying. Is this a valid way to copy a db or only sometimes. Should I really always use mysqldump. Although I am suspecting given the amount of data this may make for a v large sql file? Can some-one advise this newbie, thanks, Andrew H -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]