Forum Moderators: open

Message Too Old, No Replies

Export MySQL 3.22.32 database

how to do it

         

wiglaf

4:02 am on Dec 3, 2008 (gmt 0)

10+ Year Member



I am trying to export a database from a MySQL 3.22.32 server. I don't seem to have a copy of mysqldump available, and I installed SQLBuddy and phpMyAdmin 2.11.9.3, but neither can access any data.

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.

physics

4:58 pm on Dec 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you root on this box?

wiglaf

9:17 pm on Dec 3, 2008 (gmt 0)

10+ Year Member



My MySQL user name happens to be root, but I do not have root access to this box.

wiglaf

10:39 pm on Dec 3, 2008 (gmt 0)

10+ Year Member



I installed mysqldump on my WinXP machine and ran the command:

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?