不同数据库之间若不能导入导出,那么将是一件可怕的事情,所幸的是一般情况下通过不同的方法和途径,都可以实现,方法有多种,本人提供其中的一个,提供一个自己的处理思路,意在抛砖引玉,
第一步:首先将access数据库利用自身的导出功能,自定义一种容易对其操作的格式的txt文本文档,这也是关系到下一步操作的关键。
第二步:先在mysql中建立一个同样结构的表(当然,这步可以在第三步中用程序实现,由于时间仓促,我未能完成,抱歉)
第三步:也就是自己编程了,想办法把导出的文件用程序把每条记录读出并写入到Mysql数据表当中,
$row = file("ipadress.txt"); //读出文件中内容到一个数组当中
$num=count($row);//统计表中的记录总数
mysql_connect("localhost","root","");//连接数据库
mysql_select_db("cht");
for ($i=0;$i {
$fields=explode(",",$row[$i]);
//echo $fields[0];
//echo $fields[1];
//echo $fields[2];
mysql_query("insert into ipaddress (area_h,area_f,address) values('$fields[0]','$fields[1]','$fields[2]')");
}
echo "导入成功!共有 $num 条记录导入,";
以上操作我是针对从网上下的一个ip地址对照表进行的操作,感兴趣的可以试一试,

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools