Use powerdesigner to draw the physical model to generate sql files, ODBC data source to connect to MySQL driver mode, use of powerdesigner

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

  1. 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)
    My mysql-connector-odbc-8.0.16-winx64.msipath:C:\ProgramData\MySQL\MySQL Installer for Windows\Product Cache

Insert picture description here
2. Enter after agreeing to accept, and select Typical installation in the
Insert picture description here
installation interface. The installation is successful:
Insert picture description here

Add MySQL driver to ODBC data source

  1. Go to Control Panel -> System and Security -> Open Management Tool
    Insert picture description here

  2. Choose ODBC data source according to your operating system
    Insert picture description here

  3. Double-click the ODBC data source, click Add, select the MySQL driver, and double-click to open it.
    Insert picture description here

  4. 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
    Insert picture description here

  5. 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).
    Insert picture description here
    The data source is successfully created:
    Insert picture description here

powerdesigner connects to data sources, draws physical model diagrams of user permissions, and generates SQL files

  1. Go to powerdesigner to create a new Physical Data physical model diagram (drawing user permissions diagram)
    Insert picture description here
  2. Draw a physical data model diagram of user permissions (I draw the following diagram)

Insert picture description here
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
Insert picture description here
open it and find that the configured data source UserAuth already exists, because it is automatically recognized.
Insert picture description here
Here you can also create a data source through the Add Data Source of Configure Data Connections.
Insert picture description here

  1. powerdesigner connects to the data source
    Database -> Connect...
    Insert picture description here
    Select to connect to the data source just configured
    Insert picture description here

  2. Generate database through Generate DateBase
    Insert picture description here
    Select parameters
    Insert picture description here

  3. Successfully generated
    Insert picture description here
    Insert picture description here
    database:
    Insert picture description here

Insert picture description here

Configure the data source directly with powerdesigner

Add a data source in Database -> Configure Data Connection
Insert picture description here
Select the type of data source
Insert picture description here
to configure Select the driver to configure
Insert picture description here
Select the data source storage path and name

Insert picture description here
Click Finish:
Insert picture description here
Connect to the database
Insert picture description here

Data source increased successfully
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_40542534/article/details/109258288