1. Installation
After downloading, unzip it and use it directly. Take a look at the unzipped directory:
Double-click to open the following file (you can add a desktop shortcut or add it to the taskbar):
Then you will be prompted to enter the registration code:
Back In the unzipped folder of Navicat, there is a file called key.txt, open it, there is a registration code in it,
click OK to open it: the following interface will be displayed
2. Simple to use
Since it is a mysql client, we need to connect to the mysql server and
enter the ip address and port of the mysql server in the pop-up interface, as well as the mysql user name and password.
About the proofreading rules, you can understand by reading these two blogs:
MySQL verification rules
Mysql Summary of the difference between the collation utf8_unicode_ci and utf8_general_ci in
In the above steps, click OK to create a database,
and then we will create a new table in the above database.
That is, we use the mouse to
click and click , which is to generate the corresponding SQL statement to execute and then click to save:
This table is generated: If you
don’t believe it, let’s go to the command line and take a look: After this table exists
, we will directly You can use this tool to operate the database, because the command line operation is still quite disgusting.
Then we look at the establishment of foreign keys
and then automatically generate the corresponding SQL statement
and click Save, give a table name, there is this table
and then double-click The above table name can insert data.
For example, the id field of the dep table above is not set to auto-increment. I want to change it and let the id field become auto-increment. How to
design the table:
Then what should we do? , Directly delete this table and re-create it?
Your other associated table will definitely not allow you to do this, so you need to cancel the foreign key relationship of the associated table first, or delete the foreign key associated table first,
then
delete the foreign key of the associated table , save and then go We want to add auto-increment to the id field in the dep table, set the id field to auto-increment, save it, and then re-add the foreign key of the emp table to the id field of dep . Finally, insert a few pieces of data into the dep table.
This tool can also The relationship between your tables is shown to you in the form of graphics:
click on this ER diagram, the relationship between the two will be displayed, then in the future when your tables are many, you can view your own tables through this diagram The relationship between the table and the table, see the effect:
if we click on the line between the two tables, we can see the relationship between the two:
you can also select the above model to directly create the chart and create the relationship between the tables
But the model we built above cannot be created directly into the database. It needs to be imported in the form of sql, and then the exported sql statement is executed in the database
and then exported and saved to a place to
open the exported file. Take a look at the contents inside
. It is the SQL statement translated into the model we created. Copy these SQL statements, but execute them in mysql, and wait until the two tables in our model. Is it very convenient?
Navicat tool can also write native sql statements to perform database operations, and
you will see an interface for entering sql statements:
then write a sql statement to try:
then run it:
we can also use the data exported from the previous database to sql The form of the file is imported into the database through Navicat:
If we have a file imported from the database, the file name is init.sql, and the contents are as follows.
First, we create a new database:
Then select the database, click the right button, Choose to run the sql file;
pay attention to the above step, just close it directly, don't click start again
and then take a look through the ER diagram, the relationship between each table can be seen very clearly.
We can also comment on the sql statement: select the statement and then ctrl+/ to comment on multiple lines, ctrl+shift+/ to uncomment
ok, Navicat simply introduces it, everyone can practice it~~~