Article Directory
Use powerdesigner to generate a permission table, ODBC to configure the MySQL driver, and powerdesigner to connect to the database
ODBC (Open Database Connectivity, Open Database Connectivity ) is an integral part of the database in Microsoft's Open Services Architecture (WOSA, Windows Open Services Architecture).
Enable ODBC data source to connect to MySQL
- Double-click to run the mysql driver (select 32/64 bit according to your computer), double-click to enter the installation interface (mysql-connector-odbc-8.0.16-winx64.msi)
Mymysql-connector-odbc-8.0.16-winx64.msi
path:C:\ProgramData\MySQL\MySQL Installer for Windows\Product Cache
2. Enter after agreeing to accept, and select Typical installation in the
installation interface. The installation is successful:
Add MySQL driver to ODBC data source
-
Go to Control Panel -> System and Security -> Open Management Tool
-
Choose ODBC data source according to your operating system
-
Double-click the ODBC data source, click Add, select the MySQL driver, and double-click to open it.
-
Because we need to connect to a database, we first go to mysql to create a database, the name of the database I created is powerdesigner_auth
-
ODBC data source to connect to MySQL, enter the data source name and description, enter the user name and password, select which database to connect to (the powerdesigner_auth just created).
The data source is successfully created:
powerdesigner connects to data sources, draws physical model diagrams of user permissions, and generates SQL files
- Go to powerdesigner to create a new Physical Data physical model diagram (drawing user permissions diagram)
- Draw a physical data model diagram of user permissions (I draw the following diagram)
10. Connect the UserAuth data source just configured in powerdesigner (it has been configured before, you can view it directly here)
Select DataBase, click Configure Connections to
open it and find that the configured data source UserAuth already exists, because it is automatically recognized.
Here you can also create a data source through the Add Data Source of Configure Data Connections.
-
powerdesigner connects to the data source
Database -> Connect...
Select to connect to the data source just configured
-
Generate database through Generate DateBase
Select parameters
-
Successfully generated
database:
Configure the data source directly with powerdesigner
Add a data source in Database -> Configure Data Connection
Select the type of data source
to configure Select the driver to configure
Select the data source storage path and name
Click Finish:
Connect to the database
Data source increased successfully