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

PHP
URL Rewrite的设置方法
php和js交互一例-PHP教程,PHP应用
推荐个功能齐全的发送PHP邮件类
推荐php模板技术[转]
菜鸟学PHP之Smarty入门
Smarty模板快速入门
笑谈配置,使用Smarty技术
SMARTY学习手记
如何隐藏你的.php文件
phpfans留言版用到的数据操作类和分页类
phpfans留言版用到的install.php
用php实现像JSP,ASP里Application那样的全局变量
自动分页的不完整解决方案
FCKeditor的安装(PHP)
mysql5详细安装教程
isset和empty的区别
php5.2时间相差8小时
安装APACHE
PHP has encountered an Access Violation
MYSQL环境变量

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 124 ::
收藏到网摘: 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