stuartc1
asked on
Downgrade MySQL Data from V5 to V3
Hello,
The answer to this must be easy, but Im not having any luck finding it.
I need to extract a database from MySQL 5.0 using mysqldump command - then laod this dump into MySQL 3.2.3.
The problem is I get some commands at the top of the dump which MySQL3 cannot understand. These are somrthing like:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT= @@CHARACTE R_SET_CLIE NT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS =@@CHARACT ER_SET_RES ULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION= @@COLLATIO N_CONNECTI ON */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQU E_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@ FOREIGN_KE Y_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON _ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES , SQL_NOTES=0 */;
I need to find a option to use which will stop mysqldump from creating this data.
So far I have tried:
--skip-opt
--skip-comments
--compatible=mysql323
--skip-triggers
Although the above does reduce some extra info I dont need, it does not remove the section I mentioned above.
Any ideas on how to do a very absoluted basic dump?
I only need to DROP IF EXISTS/CREATE/INSERT
Thanks
The answer to this must be easy, but Im not having any luck finding it.
I need to extract a database from MySQL 5.0 using mysqldump command - then laod this dump into MySQL 3.2.3.
The problem is I get some commands at the top of the dump which MySQL3 cannot understand. These are somrthing like:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=
/*!40101 SET @OLD_CHARACTER_SET_RESULTS
/*!40101 SET @OLD_COLLATION_CONNECTION=
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQU
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES
I need to find a option to use which will stop mysqldump from creating this data.
So far I have tried:
--skip-opt
--skip-comments
--compatible=mysql323
--skip-triggers
Although the above does reduce some extra info I dont need, it does not remove the section I mentioned above.
Any ideas on how to do a very absoluted basic dump?
I only need to DROP IF EXISTS/CREATE/INSERT
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mysqldump -uroot --compact --compatible=mysql323 --add-drop-table mydb > dump.sql
The order is important as is the --compact flag!!
Please Close this, thanks.