如何在 Microsoft SQL Report Builder 3.0 中为 MySQL 数据库设置数据源?

问题描述:

我使用的是 Microsoft SQL Server 报表生成器 3.0.我有远程 Linux 服务器(具有某些 IP),其中包含 MySQL 数据库.我想从 Report Builder(在我的 PC 中)连接这个 MySQL 数据库,以便我可以创建一些关于它的报告.我怎样才能做到这一点?请帮助和谢谢.

I am using Microsoft SQL Server Report Builder 3.0. And I have remote Linux Server(with certain IP) that have MySQL database. I want connect this MySQL database from Report Builder (in my PC), So that I can create some reports about it. How can i do that? Please help and Thanks.

首先,您需要下载并安装(32 位或 64 位)合适的 MySQL 连接器.

First, you need to download and install (32-bit or 64-bit) appropriate MySQL connector.

MySQL ODBC 连接器

安装后,需要通过这种方式创建ODBC数据源名称(DSN):

After installation, you need to create ODBC Data Source Name (DSN) on this way:

  1. 打开控制面板 -> 管理工具 -> ODBC 数据源(32 位或 64 位,取决于安装的连接器)
  2. 选择系统 DSN 标签并点击添加
  3. 在对话窗口中,选择已安装的 MySQL 连接器
  4. 在新的对话窗口中,使用描述性名称填充数据源名称字段,填写 MySQL 服务器地址和端口(IP 地址或服务器网络名称),并填写对 MySQL 服务器具有足够权限的凭据.目录 字段是可选字段.测试连接.
  5. 打开 Microsoft Report Builder 3.0,并创建新报告.创建数据集时,需要选择数据源.单击新建数据源(或仅新建),然后在连接类型的对话框窗口中,选择ODBC,然后在连接字符串选择构建选项.
  6. 在新的对话窗口中,在数据源规范部分选择您在第 2、3 和 4 阶段创建的 DSN 并测试连接.
  7. 瞧:)
  1. Open Control Panel -> Administrative Tools -> ODBC Data Sources (32-bit or 64-bit, depending of installed connector)
  2. Choose System DSN tab and click on Add
  3. In dialog window, choose installed connector for MySQL
  4. In new dialog window populate Data source name field with descriptive name, fill MySQL server address and port (IP address or server network name) and fill credentials that have enough permissions to MySQL server. Catalog field is optional field. Test the connection.
  5. Open Microsoft Report Builder 3.0, and create new report. While creating dataset, you need to choose data source. Click New Data Source (or just New) and in the dialog window for Connection type, choose ODBC and in the Connection string choose Build option.
  6. In new dialog window, in Data source specification section choose your DSN that you created in stages 2, 3 and 4 and test connection.
  7. Voila :)