当前位置: 首页 > 图文教程 > 网络编程 > PHP > mysql5的sql文件导入到mysql4的方法

PHP
用PHP与XML联手进行网站编程代码实例
使用PHP批量生成随机用户名
功能齐全的PHP发送邮件类代码附详细说明
php 防止单引号,双引号在接受页面转义
php表单提交程序的安全使用方法
兼容PHP5的PHP目录管理函数库
php下实现一个阿拉伯数字转中文数字的函数
php header()函数使用说明
PHP入门学习的几个不错的实例代码
php下intval()和(int)转换使用与区别
PHP令牌 Token改进版
Discuz 模板引擎的封装类代码
PHP批量生成缩略图的代码
php正则校验用户名介绍
php minixml详解
高级php注入方法集锦
php socket方式提交的post详解
用php过滤危险html代码的函数
php array_merge下进行数组合并的代码
PHP版自动生成文章摘要

PHP 中的 mysql5的sql文件导入到mysql4的方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 89 ::
收藏到网摘: n/a

有时候用到将高版本的数据库转移到低版本的数据库中,下面是mysql5数据转到mysql4的方法 1、将mysql5里导出的sql文件导入到mysql5中。
2、用mysqldump -uroot -p1234 --opt --compatible=mysql40 -A -re:\localhost.sql
--compatible=name参数描述如下:
--compatible=name Change the dump to be compatible with a given mode. By
default tables are dumped in a format optimized for
MySQL. Legal modes are: ansi, mysql323, mysql40,
postgresql, oracle, mssql, db2, maxdb, no_key_options,
no_table_options, no_field_options. One can use several
modes separated by commas. Note: Requires MySQL server
version 4.1.0 or higher. This option is ignored with
earlier server versions.
3、将e:\localhost.sql导入mysql4,如mysql命令行中
source e:\localhost.sql