PDA

View Full Version : reverting a database with --compatible=mysql40


izan
6-24-05, 10:42 PM
I need to generate a database backup using the switch "--compatible=mysql40" to revert it from MySQL 4.1.9-logged to MySQL 4.0.22-standard.

I'm not sure how to do this. Can some tell me where I put this switch when doing a backup?

Or how/where can I modify the backup file posted here to revert the database:

http://forum.powweb.com/showthread.php?t=20022&highlight=backup

Thanks!

mitchind
6-25-05, 12:39 AM
I don't know about Halfabee's script - you'd have to find the command line parameter you need for that function.

If you can use phpMyAdmin, then you can Backup using the Export option, select all tables and data, SQL option and set the "SQL export compatibility" combo box to MySQL40

RTH10260
6-25-05, 01:04 PM
I need to generate a database backup using the switch "--compatible=mysql40" to revert it from MySQL 4.1.9-logged to MySQL 4.0.22-standard.

I'm not sure how to do this. Can some tell me where I put this switch when doing a backup?

Or how/where can I modify the backup file posted here to revert the database:

http://forum.powweb.com/showthread.php?t=20022&highlight=backup

Thanks!First, you cannot revert a backup file - it's fixed in it's form. But if you have a free database (sign up for another one when you haven't used all five yet), then import the content into this empty database, and re-export with the compatibility option set (see below).

How to add the compatibility option: when using the script mentioned in the thread, look for the command line starting with '/usr/local/bin/mysqldump', then add your option in addition to the others in the string.

If you are using phpmyadmin, then the compatibility option is right there on the export page in a dropdown to choose from (I learnt this the hard way).

izan
6-26-05, 07:51 PM
Thank you for the suggestions. Here's whats happening now;
Some FYI: The forum and classifieds for this database is fully functional now, so I assume the code is fine. My database is 3.78 mb, the transfer max allowed is 5.1mb, so that's okay. It's one database with 120 tables.

If I export the database to local machine from phpadmin with the option set to MYSQL40 (as gzip), and then import it to a new empty database on the other server using MySQL 4.0.22-standard I get this error:

There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:


----BEGIN CUT----
eNolU3sw2+kaNr3Rnx10V7fu+XVoOSuJXCViTOooWo1b4p51zo ZoJCJBJEKUbne3qkTGKVpWU6VF
W+syEqFpqlvF2i1qq0JCXdI9p0pjGRFdbE/D98/3zfs83/M87zvzBpLJ4WQCGIAEA1AgKTCMACJB
FIhEY3wAStQnAAIAATEUAuh2lk4AeZnsDFoWLyULzmYmwTNSM6 ACEAVH4UAUAoHxQiK9EFgQgSBg
Continued bunch of jibberish...........
----END CUT----
----BEGIN RAW----

ERROR: C1 C2 LEN: 1 2 1349
STR: 

CVS: $Id: sqlparser.lib.php,v 2.27 2004/11/05 00:41:55 lem9 Exp $
MySQL: 4.0.22-standard
USR OS, AGENT, VER: Win MOZILLA 5.0
PMA: 2.6.1-pl2
PHP VER,OS: 4.3.11 Linux
LANG: en-iso-8859-1
SQL:
Bunch of jibberish
------------------------------------------------

If I export the database to local machine using phpmyadmin with the option set to NONE, and then import it to a new empty database on the other server (to convert later to MySQL 4.0.22-standard at export) I get this error:

ERROR 1064 at line 13: 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 'DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci' at line
-----------------------------------------

If I use Powwebs backup and try to import as MySQL 4.1.9-logged and then export and convert to MySQL 4.0.22-standard, I get this error on initial import:
SQL-query:
--
-- Table structure for table `AMC_admingroups`
--
DROP TABLE IF EXISTS `AMC_admingroups`

MySQL said: Documentation
#1046 - No Database Selected
-----------------------------------------------
Any ideas or suggestions on what to try next would be greatly appreciated.
Thank you.