How to Manage Databases with TablePlus
What is TablePlus
TablePlus is a modern database management tool that supports multiple database systems, including MySQL, MariaDB, PostgreSQL, SQLite, Redis, etc. It offers a clean and intuitive user interface that makes database management more efficient and convenient. TablePlus has the following notable features:
- Multi-database support: TablePlus supports multiple database systems, making it a versatile tool for developers.
- User-friendly: It provides an easy-to-use graphical interface that helps users perform various database operations with ease.
- High performance: TablePlus emphasizes performance optimization, capable of handling large-scale data quickly.
- Rich features: Supports query editing, data import/export, table structure management, SQL editing, etc.
For developers, TablePlus not only improves work efficiency but also simplifies the complexity of database management.
Managing the Built-in MariaDB (MySQL) Database in ServBay with TablePlus
Connecting to the Server
- Download and install TablePlus: Download and install the TablePlus client for your operating system from the TablePlus official website.
- Create a new connection:
- Open TablePlus and click the "Create New Connection" button at the top left.
- Select the database type as "MariaDB" or "MySQL".
- Enter connection information:
- Username and Password: Obtain from ServBay's 'Settings' - 'Database'.
- Port:
3306
(Note: Only choose either Port or Socket) - Socket:
/Applications/ServBay/tmp/mysql.sock
- Other information such as the database name can be left blank and selected later.
- Test the connection and save: Click the "Test" button to ensure the connection details are correct, then click the "Connect" button to enter the database management interface.
Creating a Database
- Enter the database management interface: After logging in successfully, click on the "Databases" tab on the left.
- Create a new database:
- Click the "New" button at the top left.
- Enter the database name.
- Click the "Save" button to create the database.
Creating a Table
- Select the database: Choose the newly created database from the list on the left.
- Create a table:
- Right-click the database name and select "New Table".
- Enter the table name and field information (e.g., field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select the table: Choose the table to operate on from the list on the left.
- Insert data:
- In the table view, click the "Insert Row" button.
- Enter the data values.
- Click the "Save" button to save the data.
Querying Data
- Select the table: Choose the table to operate on from the list on the left.
- Browse data:
- In the table view, you can directly view the data in the table.
- You can also use the SQL query feature to filter the data.
Updating Data
- Select the table: Choose the table to operate on from the list on the left.
- Edit data:
- In the table view, double click on the data row you want to modify.
- Change the data values.
- Click the "Save" button to save the changes.
Deleting Data
- Select the table: Choose the table to operate on from the list on the left.
- Delete data:
- In the table view, select the data row you want to delete.
- Right-click and select "Delete Row".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select the database: Choose the database containing the table to delete from the list on the left.
- Delete the table:
- Right-click the table name to delete and select "Delete Table".
- Confirm the deletion.
Deleting a Database
- Select the database: Choose the database to delete from the list on the left.
- Delete the database:
- Right-click the database name to delete and select "Delete Database".
- Confirm the deletion.
Managing the Built-in PostgreSQL Database in ServBay with TablePlus
Connecting to the Server
- Create a new connection:
- Open TablePlus and click the "Create New Connection" button at the top left.
- Select the database type as "PostgreSQL".
- Enter connection information:
- Username and Password: Obtain from ServBay's 'Settings' - 'Database'.
- Host/Socket:
127.0.0.1
or/Applications/ServBay/tmp/.s.PGSQL.5432
- Port:
5432
(if using Socket, the Port is not required) - Other information such as the database name can be left blank and selected later.
- Test the connection and save: Click the "Test" button to ensure the connection details are correct, then click the "Connect" button to enter the database management interface.
Creating a Database
- Enter the database management interface: After logging in successfully, click on the "Databases" tab on the left.
- Create a new database:
- Click the "New" button at the top left.
- Enter the database name.
- Click the "Save" button to create the database.
Creating a Table
- Select the database: Choose the newly created database from the list on the left.
- Create a table:
- Right-click the database name and select "New Table".
- Enter the table name and field information (e.g., field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select the table: Choose the table to operate on from the list on the left.
- Insert data:
- In the table view, click the "Insert Row" button.
- Enter the data values.
- Click the "Save" button to save the data.
Querying Data
- Select the table: Choose the table to operate on from the list on the left.
- Browse data:
- In the table view, you can directly view the data in the table.
- You can also use the SQL query feature to filter the data.
Updating Data
- Select the table: Choose the table to operate on from the list on the left.
- Edit data:
- In the table view, double click on the data row you want to modify.
- Change the data values.
- Click the "Save" button to save the changes.
Deleting Data
- Select the table: Choose the table to operate on from the list on the left.
- Delete data:
- In the table view, select the data row you want to delete.
- Right-click and select "Delete Row".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select the database: Choose the database containing the table to delete from the list on the left.
- Delete the table:
- Right-click the table name to delete and select "Delete Table".
- Confirm the deletion.
Deleting a Database
- Select the database: Choose the database to delete from the list on the left.
- Delete the database:
- Right-click the database name to delete and select "Delete Database".
- Confirm the deletion.
Managing SQLite 3 Databases with TablePlus
Connecting to the Server
- Create a new connection:
- Open TablePlus and click the "Create New Connection" button at the top left.
- 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 the connection and save: Click the "Test" button to ensure the connection details are correct, then click the "Connect" button to enter the database management interface.
Creating a Database
- Create a 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 the database: Choose the newly created database from the list on the left.
- Create a table:
- Right-click the database name and select "New Table".
- Enter the table name and field information (e.g., field name, type, length, default value, etc.).
- Click the "Save" button to create the table.
Adding Data
- Select the table: Choose the table to operate on from the list on the left.
- Insert data:
- In the table view, click the "Insert Row" button.
- Enter the data values.
- Click the "Save" button to save the data.
Querying Data
- Select the table: Choose the table to operate on from the list on the left.
- Browse data:
- In the table view, you can directly view the data in the table.
- You can also use the SQL query feature to filter the data.
Updating Data
- Select the table: Choose the table to operate on from the list on the left.
- Edit data:
- In the table view, double click on the data row you want to modify.
- Change the data values.
- Click the "Save" button to save the changes.
Deleting Data
- Select the table: Choose the table to operate on from the list on the left.
- Delete data:
- In the table view, select the data row you want to delete.
- Right-click and select "Delete Row".
- Click the "Save" button to confirm the deletion.
Deleting a Table
- Select the database: Choose the database containing the table to delete from the list on the left.
- Delete the table:
- Right-click the table name to delete and select "Delete Table".
- Confirm the deletion.
Deleting a Database
- Select the database file: Choose the database file to delete in the file system.
- Delete the file: Manually delete the file or use a file management tool to delete it.
Managing the Built-in Redis Database in ServBay with TablePlus
Connecting to the Server
- Create a new connection:
- Open TablePlus and click the "Create New Connection" button at the top left.
- Select the database type as "Redis".
- Enter connection information:
- Username and Password: Leave blank.
- Host:
127.0.0.1
- Port:
6379
- Other information such as the database name can be left blank and selected later.
- Test the connection and save: Click the "Test" button to ensure the connection details are correct, then click the "Connect" button to enter the database management interface.
Managing Data
- Select the database: Choose the Redis instance to operate on from the list on the left.
- View 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 you want to modify.
- Change the key's value or attributes.
- Click the "Save" button to save the changes.
- Delete keys:
- Select the key to delete.
- Right-click and select "Delete Key".
- Confirm the deletion.
By following the above steps, you can easily manage the various database systems built into ServBay with TablePlus. The clean interface and powerful features of TablePlus will greatly improve your database management efficiency. Whether it's creating databases and tables or inserting, querying, updating, and deleting data, TablePlus provides you with a convenient operational experience.