How to Use Navicat to Manage Databases
What is Navicat
Navicat is a powerful database management and development tool that supports multiple database systems, including MySQL, MariaDB, PostgreSQL, SQLite, Redis, etc. Navicat provides a feature-rich and user-friendly interface, making database management more efficient and convenient. Navicat has the following notable advantages:
- Multi-database Support: Navicat supports multiple database systems, making it a versatile tool for developers.
- User Friendly: It offers an easy-to-use graphical interface, helping users perform various database operations effortlessly.
- High Performance: Navicat focuses on performance optimization, capable of quickly handling large-scale data.
- Rich Features: It supports query editing, data import/export, table structure management, SQL editing, etc.
For developers, Navicat not only improves work efficiency but also simplifies the complexity of database management.
Using Navicat to Manage ServBay's Built-in MariaDB (MySQL) Database
Logging into the Server
- Download and Install Navicat: Download and install Navicat for your operating system from the Navicat official website.
- Create New Connection:
- Open Navicat and click the "Connection" button in the top left to create a new connection.
- Select the database type as "MariaDB" or "MySQL".
- Enter Connection Information:
- Username and Password: Obtainable from ServBay's 'Settings' - 'Database'.
- Port:
3306
(Note: You only need to choose either Port or Socket) - Socket:
/Applications/ServBay/tmp/mysql.sock
- Other information like the database name can be left empty and selected later.
- Test Connection and Save: Click the "Test Connection" button to ensure the connection information is correct, then click the "OK" button to save the connection.
Creating a Database
- Enter Database Management Interface: After logging in successfully, right-click on the server name under "Connection" on the left.
- Create New Database:
- Select "New Database".
- Enter the database name.
- Click the "OK" button to create the database.
Creating a Table
- Select Database: Expand the newly created database from the left list.
- Create a Table:
- Right-click on "Tables" and select "New Table".
- Enter the table name and field information (such as field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select Table: Select the table you want to operate on from the left list.
- Insert Data:
- In the table view, click the "Insert" button.
- Enter data values.
- Click the "Save" button to save the data.
Querying Data
- Select Table: Select the table you want to operate on from the left list.
- Browse Data:
- In the table view, you can directly view the data in the table.
- You can also use the query feature to filter data.
Updating Data
- Select Table: Select the table you want to operate on from the left list.
- Edit Data:
- In the table view, double-click the row of data you want to modify.
- Modify data values.
- Click the "Save" button to save the modifications.
Deleting Data
- Select Table: Select the table you want to operate on from the left list.
- Delete Data:
- In the table view, select the row of data you want to delete.
- Right-click and select "Delete".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select Database: Select the database containing the table you want to delete from the left list.
- Delete a Table:
- Right-click on the table name you want to delete and select "Delete Table".
- Confirm the deletion operation.
Deleting a Database
- Select Database: Select the database you want to delete from the left list.
- Delete Database:
- Right-click on the database name and select "Delete Database".
- Confirm the deletion operation.
Using Navicat to Manage ServBay's Built-in PostgreSQL Database
Logging into the Server
- Create New Connection:
- Open Navicat and click the "Connection" button in the top left to create a new connection.
- Select the database type as "PostgreSQL".
- Enter Connection Information:
- Username and Password: Obtainable from ServBay's 'Settings' - 'Database'.
- Host/Socket:
127.0.0.1
or/Applications/ServBay/tmp/.s.PGSQL.5432
- Port:
5432
(If the socket method is chosen, you do not need to enter the port) - Other information like the database name can be left empty and selected later.
- Test Connection and Save: Click the "Test Connection" button to ensure the connection information is correct, then click the "OK" button to save the connection.
Creating a Database
- Enter Database Management Interface: After logging in successfully, right-click on the server name under "Connection" on the left.
- Create New Database:
- Select "New Database".
- Enter the database name.
- Click the "OK" button to create the database.
Creating a Table
- Select Database: Expand the newly created database from the left list.
- Create a Table:
- Right-click on "Tables" and select "New Table".
- Enter the table name and field information (such as field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select Table: Select the table you want to operate on from the left list.
- Insert Data:
- In the table view, click the "Insert" button.
- Enter data values.
- Click the "Save" button to save the data.
Querying Data
- Select Table: Select the table you want to operate on from the left list.
- Browse Data:
- In the table view, you can directly view the data in the table.
- You can also use the query feature to filter data.
Updating Data
- Select Table: Select the table you want to operate on from the left list.
- Edit Data:
- In the table view, double-click the row of data you want to modify.
- Modify data values.
- Click the "Save" button to save the modifications.
Deleting Data
- Select Table: Select the table you want to operate on from the left list.
- Delete Data:
- In the table view, select the row of data you want to delete.
- Right-click and select "Delete".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select Database: Select the database containing the table you want to delete from the left list.
- Delete a Table:
- Right-click on the table name you want to delete and select "Delete Table".
- Confirm the deletion operation.
Deleting a Database
- Select Database: Select the database you want to delete from the left list.
- Delete Database:
- Right-click on the database name and select "Delete Database".
- Confirm the deletion operation.
Using Navicat to Manage SQLite 3 Database
Logging into the Server
- Create New Connection:
- Open Navicat and click the "Connection" button in the top left to create a new connection.
- Select the database type as "SQLite".
- Enter Connection Information:
- Database File Path: It is recommended to place the DB file in the
/Applications/ServBay/db/sqlite
directory. - Select the database file.
- Database File Path: It is recommended to place the DB file in the
- Test Connection and Save: Click the "Test Connection" button to ensure the connection information is correct, then click the "OK" button to save the connection.
Creating a Database
- Create New Database File: Enter the new database file path and name in the connection information.
- Save: Click the "Save" button to create the database.
Creating a Table
- Select Database: Select the newly created database from the left list.
- Create a Table:
- Right-click on the database name and select "New Table".
- Enter the table name and field information (such as field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select Table: Select the table you want to operate on from the left list.
- Insert Data:
- In the table view, click the "Insert" button.
- Enter data values.
- Click the "Save" button to save the data.
Querying Data
- Select Table: Select the table you want to operate on from the left list.
- Browse Data:
- In the table view, you can directly view the data in the table.
- You can also use the query feature to filter data.
Updating Data
- Select Table: Select the table you want to operate on from the left list.
- Edit Data:
- In the table view, double-click the row of data you want to modify.
- Modify data values.
- Click the "Save" button to save the modifications.
Deleting Data
- Select Table: Select the table you want to operate on from the left list.
- Delete Data:
- In the table view, select the row of data you want to delete.
- Right-click and select "Delete".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select Database: Select the database containing the table you want to delete from the left list.
- Delete a Table:
- Right-click on the table name you want to delete and select "Delete Table".
- Confirm the deletion operation.
Deleting a Database
- Select Database File: Select the database file you want to delete from the file system.
- Delete File: Manually delete the file or use a file management tool to delete it.
Using Navicat to Manage ServBay's Built-in Redis Database
Logging into the Server
- Create New Connection:
- Open Navicat and click the "Connection" button in the top left to create a new connection.
- Select the database type as "Redis".
- Enter Connection Information:
- Username and Password: Leave blank.
- Host:
127.0.0.1
- Port:
6379
- Other information like the database name can be left empty and selected later.
- Test Connection and Save: Click the "Test Connection" button to ensure the connection information is correct, then click the "OK" button to save the connection.
Managing Data
- Select Database: Select the Redis instance you want to operate from the left list.
- Viewing Keys:
- In the database view, you can directly view all keys.
- Use the filter feature to quickly find specific keys.
- Add Keys:
- Click the "New Key" button.
- Enter the key name, type, and value.
- Click the "Save" button to add the key.
- Edit Keys:
- Double-click the key to modify.
- Edit the key's value or properties.
- Click the "Save" button to save the modifications.
- Delete Keys:
- Select the key you want to delete.
- Right-click and select "Delete Key".
- Confirm the deletion operation.
By following the steps above, you can easily use Navicat to manage the various database systems built into ServBay. Navicat's simple interface and powerful features will greatly improve your database management efficiency. Whether it's creating databases, tables, inserting, querying, updating, or deleting data, Navicat provides you with a convenient operating experience.