Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: alangnw on August 22, 2019, 09:28:17 AM

Title: SQL error on migration
Post by: alangnw on August 22, 2019, 09:28:17 AM
I'm trying to mighrate my forum to another server and get the following error on importing the sql file. Can anyone offer any help/suggetions?

ERROR 1064 (42000) at line 472101: 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

I have to admit I'm not very technical so please take it easy on me :)
Title: Re: SQL error on migration
Post by: Illori on August 22, 2019, 09:39:53 AM
how do you backup the database?
Title: Re: SQL error on migration
Post by: alangnw on August 22, 2019, 10:12:00 AM
The back-up is exported from phpmyadmin
Title: Re: SQL error on migration
Post by: Illori on August 22, 2019, 10:25:56 AM
if you open it with a text editor, what is on the last line and first line of the file?

do NOT attach that file to your next reply.
Title: Re: SQL error on migration
Post by: alangnw on August 22, 2019, 02:35:31 PM
Here¡s the opening lines of the file.

-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 19, 2019 at 08:40 AM
-- Server version: 5.6.41-84.1
-- PHP Version: 7.2.7

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


...and the last couple of lines.

<code class="sql"><pre>
SET SQL_QUOTE_SHOW_CREATE = 1
</pre></code>
</p>
<p>
    <strong>MySQL said: </strong><a href="./url.php?url=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.6%2Fen%2Ferror-messages-server.html" target="mysql_doc"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>
</p>
<code>#2006 - MySQL server has gone away</code><br/></div>

Thank you so much for the help. I've been tearing my hair out!  :)
Title: Re: SQL error on migration
Post by: vbgamer45 on August 22, 2019, 02:39:10 PM
It looks like it did not perform a full backup. That's my guess since it is end of the file. says MySQL server has gone away
Title: Re: SQL error on migration
Post by: Illori on August 22, 2019, 02:39:19 PM
try to do the backup again, it looks like the dump is not complete. if you cannot get a complete dump/backup you may need to ask your host to do it.
Title: Re: SQL error on migration
Post by: alangnw on August 22, 2019, 03:09:22 PM
I've had a look and I seem to have another on that closes...

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2019-08-18 19:34:27

Does this look better? Should this one work do you think.

Thanks again for the help!
Title: Re: SQL error on migration
Post by: Illori on August 22, 2019, 03:21:52 PM
do you have any posts or messages since that date? if so they will not be included in that dump.
Title: Re: SQL error on migration
Post by: alangnw on August 22, 2019, 03:37:50 PM
If there are I can afford to lose them. It used to be a very busy forum, very littl happens there these days.
Title: Re: SQL error on migration
Post by: alangnw on August 23, 2019, 06:46:11 AM
Illori - Different version uploaded fine. So, think I've got it now subject to propogation.

Thank you very much for your help.