There are many examples and tutorials like this on the Internet, Well, Anyway, the main purpose of my writing is to record and grow myself, It would be a good thing to help others by the way. And give it to me. Don't think I wrote too much, It's just a little bit, It's mainly about the number of cut pictures, awkward, Want to be as detailed as possible, It turns out to be a fool.

 
First, There are two ways to connect,ODBC andJDBC, Most of the information I find is of these two kinds, If there's anything else I would like to know.ODBC Need to downloadmysql drive,JDBC Need32 BitJDK, The reason ispowerdesigner Itself is32 Bit program. I beg your pardon. Now it is used in development32 positionJDK Less, Build twoJDK Switch back and forth, Too unfriendly for developers.

 
First kind,ODBC Of, Download two drivers firstmysql-connector-odbc-5.2.7-winx64.msi andmysql-connector-odbc-5.2.7-win32.msi, Paste these two names into Baidu, Then you can go directly to the official website, Double click Install after downloading, First install64 Bit, Reinstall32 Bit. Here's an explanation, In fact, it uses32 Bit, But look at other tutorials, No loading64 No place. So let's pretend.

openpowerdesigner, Create a new model,New Model——Model types——Physical Data Model——Physical
Diagram,

DBMS Choicemysql5.0,Model name Name, It doesn't matter. Then clickOK So we built a model.




After that, we need to connect this model to the database, Top menu barDatabase——Update Model from Database




  A box will pop up later, Following chart, among1 It shows the selected database connection, Choice2 The interface for selecting database connection will pop up



 
Choice2 In the future, The following right interface will pop up,1 Here is a drop-down box to select the connection,2 placeModify You can open an interface to edit the selected connection,3 placeConfigure Pop up interface, You can display all connections and edit and add new connections.



  Take adding as an example, Anyway, the editing and adding interface are the same, Click on theConfigure, The following interface will pop up, click1 place



  The following interface will pop up, Choice“ System data source”



  ChoiceMysql ODBC 5.2 Unicode Driver
( If there is no driver installed before, there is no driver here), Incidentally, Here you areANSI andUnicode Two character set versions ofDriver, useUnicode, Because it provides a richer character set. And then the next step, complete




 
When finished, it will be displayed as follows, The first is a name of its own, at will; The second is the description, More casual,TCP/IP Is the key. Local fillinglocalhost perhaps127.0.0.1, Remote fillingIP, Interfaces are generally default3306;lNamed
Pipe It's another way to connect, Here I Baidu to paste it, I don't really understand: Named pipe connection, Only applicable towidows Local connection under. Connection performance ratioTCP/IP The way is higher. More secure. Please followMySQL Profile formy.ini Mediumsocket Fill in the value specified by the parameter, Default if not setMySQL; Here is the user password library name and so on, No need to say more, Click after inputtest, It usually shows success.( Because I haven't had an unsuccessful situation, If you meet, Check the network,IP, user, Password or something

  complete, You'll find an extra connection, Determine; In the pop-up box below, Check this connection in the drop-down box,Connect;



  This page, Click OK



  The key is coming.!!! I've been trapped for countless times!!

 
By default, all tables under all users are selected, This sumoracle Different databases.1 It's a full election.2 No choice, spot2!!! Then switch to the user you want to create, Just in case, Manually check the table to display. Then clickOK, Default after that, confirm, This will showE-R Graph.

 

  The display effect is as follows, Are you disappointed? No notes, Clam clam, Next time I'll talk about the problem of displaying notes, La La La~



  Fuck, The first method has been written for so long, The second one doesn't want to write, Ah! Make a fool of it~~~

 
Second kinds,JDBC. First installation32 BitJDK, I don't need to tell you where to download it? I usually go to the official website, Attached with a wave of addresshttp://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, Then there is the configuration of environment variables, Not to mention that.

openpowerdesigner,Database——connect, Select in the pop-up boxConnection
profile, ChoiceConfigure, Create a new connection, Here's a crazy screenshot






  After completion, see the following figure





  The following passage is copied from the online tutorial



lConnection profile name:JDBC Profile name, Can be filled in at will

lDirectory: Profile save path

lDescription: Profile description, Can be filled in according to the actual use

lConnection type: Connection mode, Here we chooseJDBC

lDBMS type: Database type, Most mainstream database options available, We chooseMySQL

lUser name: User name to log in to the database

lJDBC driver class: Specify driver class, Use defaultcom.mysql.jdbc.Driver

lJDBC connection URL: ConnectURL, formatjdbc:mysql://ServerIP/Hostname:port/database

lJDBC driver jar files: Specify connectedjar Packet path



  It's a demonstration of mistakes~~~ If you do not configurejdk32 Bit words, The above error will be displayed; If it is configured, it will pop up Connection test Successful,OK!!!