Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

PowerDesigner connects to MySQL database

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment: Windows 7excel 10, PowerDesigner 16

Use ODBC to connect

1. Preparatory work

PowerDesigner itself is a 32-bit program (marked here, especially important), so it is necessary to install 32-bit MySQLConnector / ODBC in either 32-bit or 64-bit operating systems.

Download address: http://dev.mysql.com/downloads/connector/odbc/

two。 Start the connection

1) after installing ODBC, open PowerDesigner and create a new Model

Select Database- > Update Model from Database in the toolbar, as shown in the figure

Open the configuration dialog box, select [Usinga data source], and click the icon after the input box.

Configure ODBC data sources

Description: two character set versions of Driver, ANSI and Unicode, are provided here. Unicode provides a richer character set, which is generally recommended

Click finish to configure connection information

Description:

Data Source Name: specify the name of the currently configured ODBC data source, which can be entered at will

Description: specify the description information of the ODBC data source, which can be entered at will according to the purpose

TCP/IP Server: connect to the server using TCP/IP protocol. Enter localhost or 127.0.0.1 (depending on the actual MySQL user) locally, and enter the corresponding IP address if it is a remote server.

Port: default is 3306, which is filled in according to the port setting of the actual MySQL

Named Pipe: named pipe connection, which is only applicable to local connections under widows. The connection performance is higher and more secure than the TCP/IP method. Please fill in the value specified by the socket parameter in MySQL's configuration file my.ini. If it is not set, it defaults to MySQL (but so far I have not successfully tested this method)

User, Password, Database, I'm not going to repeat it.

After entering the information, you can select Test to test whether the configuration is correct. Click OK to end the configuration.

After connecting to the database, there are many things you can do, such as reverse-generating the PDM model, which I will not cover in this article.

Second, configure the connection using JDBC

Preparatory work

Again, as mentioned earlier, PowerDesigner is a 32-bit program.

The JDBC connection will involve the driver jar package of the MySQL connection, so we need to configure the JDK environment of the system (this step must be configured, otherwise report "connection test failed"). JDK needs to use 32-bit.

The JDK configuration of the system environment will not be introduced in this article. You can refer to http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html.

If PowerDesigner has been opened before the configuration, please restart the program so that the configuration takes effect.

two。 Start the connection

1) Open the configuration page

Description:

The name of the Connection profile name:JDBC profile, which can be filled in at will

Directory: configuration file save path

Description: profile description, which can be filled in according to the actual use

Connection type: connection method. Here we choose JDBC.

DBMS type: database type, which provides most mainstream database choices. We choose MySQL.

User name: the user name that logs in to the database

JDBC driver class: specifies the driver class, using the default com.mysql.jdbc.Driver

JDBC connection URL: connect URL, format jdbc:mysql://ServerIP/Hostname:port/database

JDBC driver jar files: specifies the path of the jar package for the connection

The configuration is shown in the figure:

To test whether it is successful, click OK to complete the configuration.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report