网站建设知识
mac安装mysqlodbc驱动
2025-07-22 10:02  点击:0

这段时间研究 Excel VB编程,公司windows电脑链接 oracle/mysql 数据库很容易,回家使用mac 发现数据库驱动配置跟windows还是很不一样的。

刚开始弄的也挺曲折的,还没成功!后面发现,excel 中新建数据库查询的时候,会提示安装 odbc 管理器,然后尝试看了下链接官网,如下:

https://support.office/zh-cn/article/与-Excel-for-Mac-兼容的-ODBC-驱动程序-9fa6bc7f-d19e-4f7f-9be4-92e85c77d712?ui=zh-CN&rs=zh-CN&ad=CN

官网显示有两家公司的产品支持

Openlink Software

Actual Technologies

我选择了 actual 。

下载链接: Actual_ODBC_Pack.dmg

安装配置细节如下:

Actual ODBC Driver Pack

The Actual ODBC Drivers provide three core features for connecting an ODBC-readyapplication such as Microsoft Excel and FileMaker Pro to a database:

the setup utility that allows you to specify the connection name and the name oraddress of the server hosting the database

a login screen that authenticates you to the database

the driver itself, which communicates over the network with the database.

Two of the most popular ODBC-enabled applications on the Mac are Microsoft Exceland FileMaker Pro. The steps for connecting from these applications are described here.

Installing the Actual ODBC Pack

Double click on the Actual ODBC Pack.pkg file, then proceed through the installationprocess by reading the instructions and pressing the Continue button as needed toadvance to the next step.

When the installer completes, your drivers are installed. The next step is to configure aconnection to your database.

Configuring a Data Source Name (DSN)

In order to connect to the database from an application such as Microsoft Excel, you mustfirst create a DSN, which specifies the address of the server and the name of the databaseto which you will connect.

Note: In the following instructions, the "Administrator" refers to the application used toconfigure your DSN:

? It is recommended that you use the ODBC Manager installed with the drivers, located in the/Applications/Utilities folder (see notes below).

? You may also use the ODBC Administrator provided by Apple, if it is present, located in the/Applications/Utilities folder (see notes below).

From the Utilities folder in the Applications folder, launch theAdministrator (see note above).

When the Administrator window appears, press the Add button tocreate a new System DSN.

3. Select the driver required for your database from the list and press OK.

After you make your selection, the DSN setup assistant for the driver will appear. TheIntroduction panel will look like this (or slightly different, depending on the driver):

Press the Continue button to advance to the Data Source panel.

Enter the name of the DSN (name it whatever you like – most people just use the

name of the database).

For Access databases, Excel spreadsheets and text files:

6. Press the Choose button to select your file (an Access database should have a ".mdb"or ".accdb" extension, an Excel spreadsheet should end with ".xls" or “.xlsx”, and a textfile should end with ".csv or ".txt")

For SQLite:

6a. Select the "SQLite" radio button and press Continue

6b. Press the Choose button to select your file (for example, /Users/

name>/Library/Mail/Envelope Index)

For all other databases:

6. Enter the IP address of your server. The Actual ODBC Driver remembers the 5most recent server names you enter, so you may also select from the list if you haveconfigured other connections.

For SQL Server and Sybase:

Press the Continue button to advance to the Connection panel.

Click the "Connect to server" checkbox and enter your database login ID and

password.

For all databases:

Press the Continue button to advance to the Database panel.

Select your database from the list or enter its name manually.

Press the Finish button to advance to the Conclusion panel.

To test your connection, press the Test button, and enter your user ID and password

when prompted.

Press Done to save the new DSN.

Press OK to exit the ODBC Administrator application

You are now ready to connect to your database using your application.

Using Microsoft Excel

Microsoft Excel allows you to import data from ODBC data sources. Excel usesMicrosoft Query to help you connect to the database and create a SQL query thatspecifies the information to be imported into your spreadsheet.

When you are ready to import information into Excel from your database, perform thefollowing steps:

1. Select Data -> Get External Data -> New Database Query... (or From Database...)from the Excel menu.

2. When you see the iODBC Data Source Chooser dialog, select the data source youcreated in the previous steps and press the OK button.

3. At the login prompt, enter your database login ID and password and press OK.

4. MS Excel will automatically launch MS Query. Use MS Query to construct a SQLstatement that will be used to return data to your Excel spreadsheet.

For more information on using Excel with ODBC, please visit our Microsoft Officeresource center at actualtech/office.php.

Using FileMaker Pro

FileMaker Pro includes support for “External SQL Sources” (ESS), which allows you towork with a Microsoft SQL Server, Oracle or MySQL database as if it were a FileMakerdatabase. There is more information about this powerful feature at our FileMakerresource center: actualtech/filemaker.php.

FileMaker Pro can also be used to import data from ODBC data sources. You can useFileMaker Pro to create reports generated from database that has been imported into yourFileMaker database. Advanced FileMaker users can also write FileMaker scripts whichadd or update data in your database.

You can import data from database into FileMaker by performing the following steps:

1. In FileMaker Pro, select the following menu item: File -> import Records -> ODBCData Source...

2. Select the name of your data source (created in the above section) from the "SelectODBC Data Source" dialog and press Continue.

3. Enter your database login ID and password and press OK.

4. Use the "SQL Query Builder" dialog to construct a SQL statement that will be used toreturn data to your FileMaker database. When you are finished, press Execute.

5. Use the "import Field Mapping" dialog to map fields in your query to fields returnedby your FileMaker database. You can drag the fields listed for your FileMaker databaseto change the mapping to the corresponding query result fields. When you are finished,press import.

6. When the "import Options" dialog is displayed, press the import button.

NOTES:

1. The default installation of the Actual ODBC Driver provides for an unlimited useevaluation license. Until a license key has been entered, the driver will only returnthe first 3 rows from each record set. If you need an alternate evaluation arrangement,please contact us at orders@actualtech.

once you have purchased a license key (either from our website or through otherarrangements), you must enter the key into the driver. You may do this by pressingthe "Licenses..." button on the Introduction panel of the DSN setup assistant. Copythe 20 digit license key from your e-mail receipt and paste into the License Key fieldand press OK.

2. We will be releasing periodic updates to the driver. These updates will consist of anyrequired bug fixes, in addition to minor feature enhancements. You should check tosee if updates are available by visiting our website at actualtech. You canalso press the Check for Updates button on the Introduction panel of the driver's DSNsetup assistant.

3. Starting with OS X 10.6 Snow Leopard, Apple has discontinued including the ODBCAdministrator with Mac OS X. For this reason, we include the ODBC Manager withour installer. If you prefer, you are free to continue using ODBC Administrator if youhave access to it.

We hope the Actual ODBC Drivers meet your needs, and that you will in the future trysome our other data connectivity products. Our goal is to make the Mac OS X user a firstclass citizen in the IT enterprise.

Sincerely,

The Actual Technologies Teamactualtech