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

yipeiwu_com6年前Mysql基础
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

相关文章

php+mysqli实现将数据库中一张表信息打印到表格里的方法

本文实例讲述了php+mysqli实现将数据库中一张表信息(包括表头)打印到表格里的方法。分享给大家供大家参考。具体如下: 这段代码将就看吧。需要学习基础知识。代码如下: 复制代码 代码...

支持php4、php5的mysql数据库操作类

前端一直使用PHP5,的确使用起来特别的爽,现在为了能在俺的虚拟主机上跑,不得不改成PHP4的。这几个库类我以前发在PHPCHIAN,地址是http://www.phpchina.com...

php实现可用于mysql,mssql,pg数据库操作类

本文实例讲述了可用mysql,mssql,pg三种数据库的数据库操作类,你只要作任何修改就可以方便的改变你数据库的类型.分享给大家供大家参考。具体分析如下: 函数清单,索引: Open:...

php随机取mysql记录方法小结

本文实例总结了php随机取mysql记录方法。分享给大家供大家参考。具体分析如下: 在php中要随机取mysql记录我们可以直接使用mysql_query来执行mysql中的select...

php中转义mysql语句的实现代码

你总不可能对每一个这样的特殊字符都人工进行转义,何况你通常处理的都是表单自动提交的内容。 所以,应该使用mysql_real_escape_string函数: mysql_real_es...