Fatal Mysql error issues
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
The only processes making any bother are myqld
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
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
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
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.
$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
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
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.
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!)
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
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…
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.