PDA

View Full Version : importing DB problem from ssh


badboyz
07-28-2007, 03:10 AM
ERROR 1064 (42000) at line 1: 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 '
?ǰZ G[E}????2?QdU??!SS z???/?????w@VW`?8%?J?k??&?K' at line 1

im getting this error why?

Marco van Herwaarden
07-28-2007, 06:42 AM
How was the backup created?
How was the backup file transfered to the new server (assuming you are moving)?
What is the MySQL version for both source and target server?

badboyz
07-28-2007, 11:16 PM
i created backup from phpmyadmin

im trying to transfer by using ssh(putty)

I dunt know abut MySQL version

Marco van Herwaarden
07-29-2007, 06:57 AM
I would start by creating the backup also from SSH.

Eikinskjaldi
07-29-2007, 09:10 AM
You need to make sure binary strings are dumped as hexadecimal using the --hex-blob flag. I assume there is something for this in phhpmyadmin, but it would be a guess as I have never used it.

badboyz
07-30-2007, 01:15 AM
I would start by creating the backup also from SSH.

how do i backup from ssh?

Kirk Y
07-30-2007, 03:26 AM
See here: http://www.vbulletin.com/docs/html/maintenance_ssh_backup

badboyz
07-30-2007, 12:57 PM
See here: http://www.vbulletin.com/docs/html/maintenance_ssh_backup

but i dunt have the access to ssh on that hosting i was on.now im using a dedicated server for my forums and trying to use the same database

Marco van Herwaarden
07-30-2007, 01:16 PM
The only reliable method of backing up and restoring a database is with shell access via telnet or ssh. This is because backing up with a PHP script like that in the Admin CP or phpMyAdmin can result in PHP timeouts errors and an incomplete backup file. Please see the instructions here:

Backup:
http://www.vbulletin.com/docs/html/maintenance_ssh_backup

Restore:
http://www.vbulletin.com/docs/html/maintenance_ssh_restore

P.S. If you don't have shell access, some people have also reported success with these scripts:

MySQLDumper:
http://www.mysqldumper.de/en/index.php

MySQLHotxcopy:
http://www.vbulletin.com/forum/showthread.php?t=134821&highlight=mysqlhotcopy

Bigdump:
http://www.ozerov.de/bigdump.php

badboyz
07-30-2007, 01:55 PM
The only reliable method of backing up and restoring a database is with shell access via telnet or ssh. This is because backing up with a PHP script like that in the Admin CP or phpMyAdmin can result in PHP timeouts errors and an incomplete backup file. Please see the instructions here:

Backup:
http://www.vbulletin.com/docs/html/maintenance_ssh_backup

Restore:
http://www.vbulletin.com/docs/html/maintenance_ssh_restore

P.S. If you don't have shell access, some people have also reported success with these scripts:

MySQLDumper:
http://www.mysqldumper.de/en/index.php

MySQLHotxcopy:
http://www.vbulletin.com/forum/showthread.php?t=134821&highlight=mysqlhotcopy

Bigdump:
http://www.ozerov.de/bigdump.php

since i dunt have the shell access i downloaded the database from phpmyadmin and tried to import by using ssh and bigdum.php.both methods gave me errors.

Kirk Y
07-30-2007, 06:07 PM
Request shell access; I see little reason why your host would not grant you at least 24 hours access to it.

Marco van Herwaarden
07-31-2007, 07:42 AM
Or ask if they can make the backup for you.

Brendan Lennon
08-22-2007, 06:43 PM
Had the same error with a compressed (tar.gz) file, I extracted the sql file to the same directory and it imported ok.

eg;
tar -xvf dbname.tar.gz dbname.sql