How to Use Adminer for Database Management
What is Adminer
Adminer is a lightweight database management tool that supports multiple database systems, including MySQL, MariaDB, PostgreSQL, SQLite, among others. Compared to other database management tools, Adminer offers several notable advantages:
- Single-File Deployment: Adminer can run with just one PHP file, making deployment and use greatly convenient.
- Support for Multiple Databases: Adminer can manage multiple database systems, making it a versatile tool for developers.
- Simple Interface: Adminer provides a clean and intuitive user interface, helping developers easily perform various database operations.
- Powerful Features: Adminer supports complete database management functionalities, including creating, modifying, and deleting databases and tables, executing SQL queries, and importing and exporting data.
For developers, Adminer not only enhances work efficiency but also simplifies the complexities of database management.
Accessing Adminer
ServBay has Adminer built-in, which you can access at the following address: https://servbay.host/adminer.php
Managing ServBay's MariaDB (MySQL) Database with Adminer
Log in to the Server
- Open a browser and go to Adminer's URL.
- On the login screen, select the database type as "MySQL".
- Enter the server connection information:
- Username and password: Can be found in ServBay’s 'Settings' - 'Database'.
- Server:
localhost
or/Applications/ServBay/tmp/mysql.sock
- Click the "Login" button to enter the database management interface.
Create Database
- After logging in successfully, click "Create Database" in the left menu.
- Enter the database name.
- Click the "Save" button to create the database.
Add Data
- Select the newly created database.
- Click "Create Table".
- Enter the table name and field information.
- Click the "Save" button to create the table.
- Select the created table, and click "Insert".
- Enter data and click the "Save" button.
Delete Data
- Select the table to operate on.
- Click the "Select" button, and choose the data rows to delete.
- Click the "Delete" button to confirm the deletion.
Delete Database
- Select the database to delete from the database list.
- Click the "Delete" button.
- Confirm the deletion operation.
Managing ServBay's PostgreSQL Database with Adminer
Log in to the Server
- Open a browser and go to Adminer's URL.
- On the login screen, select the database type as "PostgreSQL".
- Enter the server connection information:
- Username and password: Can be found in ServBay’s 'Settings' - 'Database'.
- Server:
/Applications/ServBay/tmp
- Database:
postgres
or another manageable database with permissions
- Click the "Login" button to enter the database management interface.
Create Database
- After logging in successfully, click "Create Database" in the left menu.
- Enter the database name.
- Click the "Save" button to create the database.
Add Data
- Select the newly created database.
- Click "Create Table".
- Enter the table name and field information.
- Click the "Save" button to create the table.
- Select the created table, and click "Insert".
- Enter data and click the "Save" button.
Delete Data
- Select the table to operate on.
- Click the "Select" button, and choose the data rows to delete.
- Click the "Delete" button to confirm the deletion.
Delete Database
- Select the database to delete from the database list.
- Click the "Delete" button.
- Confirm the deletion operation.
Managing SQLite 3 Database with Adminer
Log in to the Server
- Open a browser and go to Adminer's URL.
- On the login screen, select the database type as "SQLite 3".
- Enter the database file path: It is recommended to place the DB file in the
/Applications/ServBay/db/sqlite
directory. - Click the "Login" button to enter the database management interface.
Create Database
- Enter a new database file name in the database file path.
- Click the "Save" button to create the database.
Add Data
- Select the newly created database.
- Click "Create Table".
- Enter the table name and field information.
- Click the "Save" button to create the table.
- Select the created table, and click "Insert".
- Enter data and click the "Save" button.
Delete Data
- Select the table to operate on.
- Click the "Select" button, and choose the data rows to delete.
- Click the "Delete" button to confirm the deletion.
Delete Database
- Choose the database file to delete in the database file path.
- Manually delete the file or use a file management tool to delete it.
Following these steps, you can easily manage the various database systems bundled with ServBay using Adminer. Adminer's simple interface and powerful functionalities will significantly enhance your database management efficiency.