Navicat tutorial

The following content is based on the installation of MySQL and Navicat. If it is not installed, please refer to the following content to install it.

[MySQL 8.0.34 Installation Tutorial]: MySQL 8.0.34 Installation Tutorial_Xijin's no1's Blog-CSDN Blog

[Navicat16 Installation Tutorial]: Navicat16 Installation Tutorial_Xijin's no1's Blog-CSDN Blog

1. Create and connect to the database

After successfully installing and starting Navicat, we first need to establish a new database connection.

Click the "Connect" button in the upper left corner of the main interface and select the type of database you want to connect to (such as MySQL).

In the pop-up dialog box, enter relevant connection information, including: connection name, host address, port, user name, password, etc.

Click the "Test Connection" button to verify that the information filled in is correct. If the connection is successful, click "OK" to complete the creation of the new connection.

2. Create and manage database

With Navicat, you can easily create and manage databases. The following are the specific steps:

Select the current connection in the main interface, right-click and select "New Database".

In the dialog box that pops up, enter the database name, and set the character set and collation. Click "OK" to create a new database.

To rename, delete, etc. a database, right-click the corresponding database and select the corresponding function from the menu.

3. Create and manage tables

Next, we will learn how to use Navicat to create and manage data tables.

On the main interface, select the database for which a table needs to be created, right-click and select "New" -> "Table".

Enter the table name in the pop-up dialog box, and click OK.

Next add fields to the data table. Select the newly created table and enter the "Design" mode. Add the required fields in the "Field" list below, and set the corresponding attributes (such as: type, length, whether it is empty, primary key, etc.).

After the data table is created, you can also perform various operations through the right-click menu, such as modifying the table structure, deleting the table, renaming, etc.

4. Manage data records

Navicat provides an intuitive way to manage records in data tables, including operations such as adding, modifying and deleting.

Double-click the data table to be managed to open the table view.

To add a new record, click the "Add" button at the top and enter data in the new pop-up row.

To edit a record, select it directly in the table and edit the value of the corresponding field.

To delete one or more records, select the rows to be deleted and click the "Delete" button at the top.

5. Import and export data

Navicat supports fast data import and export, which is convenient for users to backup and migrate data.

To import data, first open the table that needs to import data, and then click the "Import Wizard" button at the top. Select the data source type (eg CSV file) and follow the prompts.

To export data, also open the table that needs to export data, and click the "Export Wizard" button at the top. Select the data format to be exported (such as Excel or CSV file), set the storage path and file name, and click "Start" to execute the export operation.

6. Query editor and SQL editor

Navicat provides a convenient Query Editor and SQL Editor, allowing you to write and execute SQL queries easily.

Right-click on a connection or database and select New Query. This will open a new query tab.

When writing SQL code in Query Editor, you can use the IntelliSense feature to aid in coding.

After writing, click the "Execute" button to run the SQL code. The execution result will be displayed in the "Results" panel below.

7. Use the visual query builder

For users new to SQL or unfamiliar with a certain database language, Navicat's visual query builder feature is especially useful. Here's how to use it:

Right-click on a connection or database and select New Query -> Query Builder.

In the opened interface, drag the required table from the database and table structure list on the left to the middle area.

Set the connection relationship between the tables by clicking the associated fields between the tables and pulling the connection line.

Set filter conditions, sorting rules, grouping and other information below.

After the settings are complete, click the "Generate" button in the upper right corner to convert the constructed query into SQL code.

8. Database synchronization and backup recovery

Navicat provides powerful database synchronization and backup and recovery functions to help users ensure safe and reliable operation of the database.

To perform database synchronization, first select the connection or database to be synchronized on the main interface. Then click the "Data Sync" button at the top and follow the wizard.

To back up a database, right-click the database to be backed up and select "Backup Database". Set the storage path of the backup file and other related settings, and then click "Start" to execute the backup operation.

To restore a database backup, right click on the database to be restored and select "Restore Database". Select the previously backed up files, confirm the restore settings, and click "Start" to execute the restore operation.

Guess you like

Origin blog.csdn.net/xijinno1/article/details/132657940