Support

Site Restoration

#14176 MySQL query failed with error 1064

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

gpatchen

Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.22?
PHP version: (4.3.10)
MySQL version: (5.2 I think)
Host: (HostGator)
Akeeba Backup version which took the backup: Not Sure, Probably 6 months old
Kickstart version used to extract the backup: No, Zip File so simple extract

Description of my issue:

My site got hacked so when I went to a backup from about May, I go thru the normal proceedure of uploading and extracting to the same exact location as backup.  Clicking next I get the following error.

Error at the line 0: CREATE TABLE `LinkBuildingURL` ( `LinkBuildingID` int(11) NOT NULL AUTO_INCREMENT, `LinkBuildingURL` varchar(100) NOT NULL, PRIMARY KEY (`LinkBuildingID`) ) TYPE=MyISAM AUTO_INCREMENT=3 ... MySQL: MySQL query failed with error 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 'TYPE=MyISAM AUTO_INCREMENT=3' at line 1). The query was:CREATE TABLE `LinkBuildingURL` ( `LinkBuildingID` int(11) NOT NULL AUTO_INCREMENT, `LinkBuildingURL` varchar(100) NOT NULL, PRIMARY KEY (`LinkBuildingID`) ) TYPE=MyISAM AUTO_INCREMENT=3

 

I have tried the solution you recommended before about doing a manual restore and doing a find/replace in this post: https://www.akeebabackup.com/support/site-restoration/13544-mysql-query-failed-with-error-1064.html

That gave me an error about Session Variables so I found a post Here, about fixing the Session Table problem, but then I got to more errors.

 

There has to be an easier fix...

nicholas
Akeeba Staff
Manager

The solution you found is the only possible solution. FYI, you are using an Akeeba Backup version which is over 1 year old, not just six months as you said. Moreover, please note that Akeeba Backup will not run on PHP 4.3. Maybe you have the ancient JoomlaPack component from 3+ years ago?

Sorry, there's not much I can do here to help. Following the manual restoration is what you have to do. Any errors you get after that is probably due to the disparity between the minimum PHP / MySQL version your components require and what you have installed on your server. Why I am sure about that? If you were restoring on the exact same server, with the exact same PHP version and the exact same MySQL version you wouldn't be posting here. The backup would have been restored without a problem. Between the time you took the backup and today something has changed on your server (upgrades most likely) or you are restoring on a different server. Well, you have to work out thrugh each issue. There's no magic solution here :(

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

gpatchen

I was a little suprised when I saw the PHP was 4.3 in the first backup installation screen.  Do you think part of the problem might be that it is not seeing PHP v5?

I tried to force it to use v5 in the HTACCESS file to see if it made a difference but it didn't work?  Do you think that will help?

g

nicholas
Akeeba Staff
Manager

I was a little suprised when I saw the PHP was 4.3 in the first backup installation screen.  Do you think part of the problem might be that it is not seeing PHP v5?

Absolutely certain. Joomla! 1.5 shouldn't even run on PHP 4.3.x.

I tried to force it to use v5 in the HTACCESS file to see if it made a difference but it didn't work?  Do you think that will help?

Every time you launch Kickstart the .htaccess is renamed to htaccess.old and stops being taken into account. Pelase ask your host to make PHP 5 the default PHP version for your site. It's very simple for them, just a small (one line!) change in the vhost configuration for your site.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

gpatchen

I had hostgator default to the v5.2 but it still shows as v4.3 in the install package

nicholas
Akeeba Staff
Manager

The installation script uses PHP's phpversion() to get the current PHP version. If it says it's PHP 4.3 then PHP 4.3 it is. Just make sure that you're looking at the PHP version row, yes?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!

Summer vacations: Our support will be closed for replies and new tickets from August 6th to August 21st, 2022 due to summer vacations.