Forum Moderators: open
For reference, here's an error phpMyAdmin gives:
"Your PHP MySQL library version 5.0.26 differs from your MySQL server version 3.22.32. This may cause unpredictable behavior."
What I'm trying to do is write my own script to dump the structure and data using php 5.1.6, but I'm having trouble getting the right functionality with this old MySQL version.
So far I've been able to dump the data into sql insert statements, but I have no idea how to dump the structure. I am trying to use something like "SHOW CREATE TABLE table;", but MySQL 3.22.32 says:
"You have an error in your SQL syntax near 'CREATE TABLE table' at line 1"
I assume this is because that command is not supported by this MySQL version. Is there an equivalent sql statement that will give me the structure for MySQL 3.22.32? Are there any other ways to get the structure into a dumped sql form?
Thanks.
mysqldump --user=my_user --host=my_host --password --all-databases --opt --quote-names --allow-keywords --complete-insert > databases.sql
It returned with this error:
mysqldump: Couldn't execute '/*!40100 SET @@SQL_MODE='' */': Query was empty (1065)
Using different options produces the same result. Any suggestions? Thanks.
Edit: on WinXP, mysqldump version is "Ver 10.13 Distrib 5.1.30, for Win32 (ia32)"
And I got access to a linux version that produces the same error with version "Ver 10.10 Distrib 5.0.16, for pc-linux-gnu (i386)"
Would getting an older version help?