将mysql数据库导出到Microsoft Access (.mdb)

时间:2022-12-21 15:38:47

I'm looking for some tips on how to export a mysql database into a .mdb file that is readable by Microsoft Access 2007+ (and editable too!). It needs to be a script that can run on a Linux server (maybe using PHP?).

我正在寻找一些技巧,如何将mysql数据库导出到一个.mdb文件中,该文件可被Microsoft Access 2007+(以及可编辑!)它需要是可以在Linux服务器上运行的脚本(可能使用PHP?)

I can't seem to find out anything anywhere. Any ideas?

我哪儿都找不到。什么好主意吗?

Cheers!

干杯!

4 个解决方案

#1


2  

Thanks for your tips :)

谢谢你的建议。

I have since found out we're already using this product elsewhere: http://dbconvert.com/convert-access-to-mysql-pro.php?DB=1 It's running under Wine on our server, although I don't think it supports the latest versions of Access.

我发现我们已经在其他地方使用了这个产品:http://dbconvert.com/convert- accessto mysql-pro.php?DB=1它在Wine下运行在我们的服务器上,尽管我认为它不支持最新版本的访问。

#2


2  

  1. Install the ODBC driver from MySQL.
  2. 从MySQL安装ODBC驱动程序。
  3. Create the ODBC system DSN entry.
  4. 创建ODBC系统DSN条目。
  5. On Access, execute a query like this:
  6. 在访问时,执行如下查询:

SELECT * INTO AccessTable FROM [ODBC;DATABASE=Database_Name;DSN=DSN_Name;OPTION=2059;PWD=MySQL_Password;PORT=0;UID=MySQL_User].MySQLTable

从[ODBC;DATABASE=Database_Name;DSN=DSN_Name;OPTION=2059;PWD=MySQL_Password;PORT=0;UID=MySQL_User].MySQLTable

(Replace accordingly: AccessTable, MySQLTable, Database_Name, DSN_Name, MySQL_Password, MySQL_User)

(相应替换:AccessTable, MySQLTable, Database_Name, DSN_Name, MySQL_Password, MySQL_User)

#3


1  

You could create a a CSV file from MySql and then import that into Access. You can use OLEDB or ODBC connection to access and should be able to do the inserts that way.

您可以从MySql创建一个CSV文件,然后将其导入到Access中。您可以使用OLEDB或ODBC连接来访问,并且应该能够以这种方式进行插入。

Are you also trying to create the mdb file on the fly? I'm assuming that you have one built already and just want to export the data from mysql and import into access.

您是否还试图动态创建mdb文件?我假设您已经构建了一个,并只想从mysql导出数据并导入到access中。

#4


0  

I have not tried this.

我还没试过。

The unixODBC Project goals are to develop and promote unixODBC to be the definitive standard for ODBC on non MS Windows platforms. This is to include GUI support for both KDE and GNOME.

unixODBC项目的目标是开发并推动unixODBC成为非MS Windows平台上ODBC的最终标准。这包括对KDE和GNOME的GUI支持。

-- http://www.unixodbc.org/

——http://www.unixodbc.org/

#1


2  

Thanks for your tips :)

谢谢你的建议。

I have since found out we're already using this product elsewhere: http://dbconvert.com/convert-access-to-mysql-pro.php?DB=1 It's running under Wine on our server, although I don't think it supports the latest versions of Access.

我发现我们已经在其他地方使用了这个产品:http://dbconvert.com/convert- accessto mysql-pro.php?DB=1它在Wine下运行在我们的服务器上,尽管我认为它不支持最新版本的访问。

#2


2  

  1. Install the ODBC driver from MySQL.
  2. 从MySQL安装ODBC驱动程序。
  3. Create the ODBC system DSN entry.
  4. 创建ODBC系统DSN条目。
  5. On Access, execute a query like this:
  6. 在访问时,执行如下查询:

SELECT * INTO AccessTable FROM [ODBC;DATABASE=Database_Name;DSN=DSN_Name;OPTION=2059;PWD=MySQL_Password;PORT=0;UID=MySQL_User].MySQLTable

从[ODBC;DATABASE=Database_Name;DSN=DSN_Name;OPTION=2059;PWD=MySQL_Password;PORT=0;UID=MySQL_User].MySQLTable

(Replace accordingly: AccessTable, MySQLTable, Database_Name, DSN_Name, MySQL_Password, MySQL_User)

(相应替换:AccessTable, MySQLTable, Database_Name, DSN_Name, MySQL_Password, MySQL_User)

#3


1  

You could create a a CSV file from MySql and then import that into Access. You can use OLEDB or ODBC connection to access and should be able to do the inserts that way.

您可以从MySql创建一个CSV文件,然后将其导入到Access中。您可以使用OLEDB或ODBC连接来访问,并且应该能够以这种方式进行插入。

Are you also trying to create the mdb file on the fly? I'm assuming that you have one built already and just want to export the data from mysql and import into access.

您是否还试图动态创建mdb文件?我假设您已经构建了一个,并只想从mysql导出数据并导入到access中。

#4


0  

I have not tried this.

我还没试过。

The unixODBC Project goals are to develop and promote unixODBC to be the definitive standard for ODBC on non MS Windows platforms. This is to include GUI support for both KDE and GNOME.

unixODBC项目的目标是开发并推动unixODBC成为非MS Windows平台上ODBC的最终标准。这包括对KDE和GNOME的GUI支持。

-- http://www.unixodbc.org/

——http://www.unixodbc.org/