Fatal Mysql error issues

Hi, new here and just added a linode 360 from vpsbible instructions with hardy 8.10, nginx web server and php/mysql.

I am trying to install a php script that was previously installed on a shared host successfully but when installing it on my linode I am getting fatal myql errors when the script attempts to update the database (it manages to get 6 tables in and then bombs out (error detail below).

I also tried importing the old database instead of installing from scratch and still got mysql errors.

A mysqltuner output was as follows:

General recommendations:

Add skip-innodb to MySQL configuration to disable InnoDB

MySQL started within last 24 hours - recommendations may be inaccurate

Reduce your overall MySQL memory footprint for system stability

Enable the slow query log to troubleshoot bad queries

Your applications are not closing MySQL connections properly

Variables to adjust:

querycachelimit (> 1M, or use smaller result sets)

fatal sql error was:

A fatal MySQL error occurred.

Query:

CREATE TABLE IF NOT EXISTS pmdcronlog ( id varchar(55) NOT NULL, date datetime NOT NULL default '0000-00-00 00:00:00', status tinyint(1) NOT NULL default '0', data text NOT NULL, KEY id (id), KEY date (date) ) ENGINE=MyISAM'PMDGL-b2db4fd34ae9''CREATE TABLE IF NOT EXISTS pmdcronlog (\n id varchar(55) NOT NULL,\n date datetime NOT NULL default \'0000-00-00 00:00:00\',\n status tinyint(1) NOT NULL default \'0\',\n data text NOT NULL,\n KEY id (id),\n KEY date (date)\n) ENGINE=MyISAM'Array

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 ''PMDGL-b2db4fd3''CREATE TABLE IF NOT EXISTS pmdcronlog (\n id varchar(55)' at line 8

The script owners response up to now is to upgrade php to 5.1.2 but the version I have is 5.2.4

Any ideas would be grateful for.!

13 Replies

Oh forgot to mention I'm also getting lots of emails from linode informing me that the disk is exceeding its io rate.

The only processes making any bother are myqld

I think the error message tells all. It looks the query is improperly formed; duplicated in fact, with some random garbage in between.

If you can post the script on pastebin or direct us to where it can be viewed/downloaded, I'm fairly confident it would be pretty easy to spot where this was happening.

@mwaterous:

I think the error message tells all. It looks the query is improperly formed; duplicated in fact, with some random garbage in between.

If you can post the script on pastebin or direct us to where it can be viewed/downloaded, I'm fairly confident it would be pretty easy to spot where this was happening.

Sure, the install.php file is here http://pastebin.com/m61bb4b4

But as I said I installed this same version previously on a shared host without these errors occurring so I am not sure why it would fail now.

the mysql and php versions are the latest in the repository (although not the latest rpm versions)

Thanks

It looks like it's reading in some additional files to get those queries:

importSQL('./database_structure.sql',$variables);
importSQL('./database_data.sql',$variables);

If I had to guess, either there's a missing semicolon (quick, simple, and easy), or the files have been through a DOS-based machine and/or FTP and have broken end-of-line markers (visible as ^M when you use vi on the files).

Also, don't sweat the I/O warnings: they're just letting you know something's doing a lot of disk I/O, and that's what you're doing when you're setting up a system :-)

Hi, the Database_structure.sql seems to be the one called that creates the tables this is here: http://pastebin.com/m5db4308a

The thing actually only installed the table up to pmd-cron_log which is only about 6 (out of 68).

I can't see anything amiss easily on the sql doc??

Thanks again for your help.

From the install.php, this line makes me hmm:

$errors['license_format'] = 'The license number entered is not in the correct format. (ex: PMDGL-xxxxxxxxxxxx)';

Given that the flotsam starts with PMDGL- and looks like it would be a license number, I wonder if something in that importSQL() function isn't substituting things weirdly. Huh.

And for what it's worth, install.php checks for php >= 5.2.1, so if that's the author's best advice, it's pretty dodgy ;-)

Hi, yes the pdmgl is the license but it is correct and If I inputted the wrong license it would send that error out on first clicking it.

I did try just importing the database and site and inputting the same database details (which then wouldn't even use these sql import files ) but that also threw out a mysql fatal error (which I didn;t record) So I really feel it is a problem either with PHP or mysql as the script hasn't changed.

Cheers

It's not that the license code is bad, it's that it's appearing there for some unknown reason. That's the spooky part.

When you unpackaged the PHP scripts, what method did you use? I'm wondering if maybe something got corrupted somehow. Maybe try downloading a fresh copy of the application, untar it, and see how that goes… otherwise, if you have a download URL, post it and I'll ruminate on it.

Thinkin I did upload using the auto settings on filezilla maybe If I choose binary for the sql files things may be different.

I have 2 versions, 1 uploaded previously and succesfully installed on a shared host and I downloaded the latest revision to install here, I tried both install files.

I'll try again by just uploading the whole thing as a tar and untarring there rather than ftp'ing the files individually. (quicker that way anyway!)

Hi, did another attempt at install by uploading the files in their zip and unzipping them at the server, again same issue (and same error)

The only thing I can think of doing now is reinstalling the whole Linode from scratch incase their was something I missed or didn;t do quite right.

Otherwise it may be the choice of using nginx web server??

I wish there was a better way.

Cheers

If the creator of the script believes everything's fine, and they support (and have tested with) nginx, then it should work. Or else there's a bug in this particular version of the script with your particular configuration.

The fact that there's a license key and ioncube involved suggests this is commercial software with obfuscated source code. Alas, that means only the company/person who developed it can figure out for sure what's going on…

Hi, after much effort I finally managed to get a correct install of this script but not with my previous setup.

I installed a Lamp stackscript and this config allowed a higher version of php and of mysql (the main problem I suspect).

So as it stands I am ok now although using Apache instead of nginx , hope my memorys ok.

Thanks for all your help.

Cool! Could have been any of a number of issues (nginx, a particular incompatibility with that version of PHP, etc), but the important thing is that it works now. Enjoy! -rt

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct