PDA

View Full Version : Need Help Understanding DB Error..


shibby2
02-18-2020, 10:11 PM
Hey guys, I was wondering if you could help me out..

I'm moving one of my forums (VB 3.8.4) from one server to another. I exported the DB via phpmyadmin (about 500mb), and tried to import (also via phpmyadmin) to the new database on the new server.

I get this message in phpmyadmin after about a half hour of importing:


Error
Static analysis:

2 errors were found during analysis.

Variable name was expected. (near "<" at position 54)
Unrecognized statement type. (near "div" at position 1)
SQL query:

<div class="error"><h1>Error</h1><p><strong>SQL query:</strong> <a href="db_sql.php?sql_query=SET+SQL_QUOTE_SHOW_CREATE+%3D +1&amp;show_query=1&amp;db=screamin_demo"><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" />&nbsp

MySQL said: Documentation

#1064 - 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 '<div class="error"><h1>Error</h1><p><strong>SQL query:</strong>
<a href="db_sql.' at line 1


Can anyone tell me specifically what the problem here is? I really don't know much about databases and such, so I'm clueless. I've searched and searched, without any real answers.

Any help is greatly appreciated, thanks! :)

Dave
02-18-2020, 10:58 PM
I wouldn't use PHPMyAdmin for exporting/importing large databases but use mysql/mysqldump to import and export databases. If you upload the .sql file to the server then your host should be able to import it properly if you don't know how to do it.

shibby2
02-19-2020, 01:01 AM
How would I go about downloading a copy of the .sql file?

Thanks!

Dave
02-19-2020, 01:46 AM
You could ask your host to dump your database on the old server -> download from old server -> upload to new server -> ask host to import the database dump.

shibby2
02-19-2020, 05:36 AM
Ok thanks! So that's the best way? I kind of didn't want to involve the hosts at all, since they're kind of worthless. lol

lange
02-19-2020, 09:59 AM
How would I go about downloading a copy of the .sql file?

Thanks!
You can try to compress your sql.

1) Backup your 500MB .sql into .sql.gz via the Backup option in cPanel and restore your .sql.gz via your new cPanel.

2) An alternative: export your .sql via PHPMyAdmin, compress the sql in zip with winrar for example, rename the extension to .sql.zip and import with PhpMyAdmin via your new cPanel.

In Omnibus
02-19-2020, 12:05 PM
Ok thanks! So that's the best way? I kind of didn't want to involve the hosts at all, since they're kind of worthless. lol

Use the Command Line Interface if you have one or PuTTy if you don't.

https://www.fastwebhost.in/blog/putty-30-useful-putty-commands-for-beginners/

shibby2
02-20-2020, 08:42 PM
Thanks for all the help guys!

I ended up exporting it in phpmyadmin but ticked the 'use compression (.gz)' option this time, and it seems to have imported without a problem! :)

Thanks again guys! :)

Hostboard
03-05-2020, 10:18 AM
I would use Adminer before PHPMyAdmin. I've had to many issues with it...