Results 1 to 6 of 6
Thread: Error while restoring mySQL
-
08-23-2008, 08:42 AM #1New Member
- Join Date
- Aug 2008
- Posts
- 2
Error while restoring mySQL
hi all and thanks in advance
i have trouble with mySQL
i have copied a back up for my vbulletin from my old server and restored it to the new one
but a face a problem and i think the old mySQL is difference from the new one
i tride the shell command and thats what came :
mysql -uUSER -pPASS dbname < vbulletin.sql
ERROR 1064 (42000) at line 1882: 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 ''PK\0\0\\0D��6ءGإ\r\0\0S\0\0 \0\0\0Sql/1.jpggTسًئ�!�& EB\'�\"�\' at line 1
so any one have any idea how to restore mySQL
plz hellp
-
08-23-2008, 09:07 AM #2Aspiring Evangelist
- Join Date
- May 2007
- Location
- italy
- Posts
- 393
happened to me couple years ago on a very big board...some large fields with special character inside for an encoding mismatch were difficult to export in the usual way.
I don't remember exactly what I did to solve, but it was a matter of charset and stuff like that. Simply export your database downloading it via phpmyadmin (it sets charsets and all those stuff automatically without you trying different settings on the dump command line) rather than using mysqldump and match your previous encoding with the --default-character-set=xxx switch when importing on the new server (on some old mysql version iso-8859-1 was the default, now is utf8).
bye"I want" never gets ...
-
08-23-2008, 09:35 AM #3Web Hosting Master
- Join Date
- Aug 2007
- Posts
- 6,884
Are you trying to restore from a 4.0 to higher version? Then you will need to add additional options while taking the dump file. Otherwise restore will not go fine.
iHubNet Ltd - Premium Hosting Solutions 4 ALL
• Solid Support • Solid Equipment • Solid Network
Shared Hosting / Reseller Hosting / Managed Server
Matt A.
-
08-23-2008, 09:11 PM #4New Member
- Join Date
- Aug 2008
- Posts
- 2
thank you johnny-l but i want a clear description plz
iHubNet-Matt
do you mean the script file (dump)
plz describe more
i have now MySQL 4.1.22-standard the new one
thank you guys
-
08-23-2008, 09:23 PM #5Junior Guru
- Join Date
- Aug 2008
- Posts
- 176
What was the default character set of the old one, and what is the character set of the new one?
I had to do a bunch of conversions a couple of years ago, used iconv in linux.
Although some of them failed with the GNU one, and I resorted to an old Solaris one that worked perfectly. Meh.
-
08-24-2008, 12:59 PM #6New Member
- Join Date
- Aug 2008
- Posts
- 1
Hi
use the following command to take the dump:
select * into outfile '/path' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from table <tablename>;
import the table using the following commands:
load data infile '/path' into table <tablename> fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' ;
-chandru