How to Use Adminer to Manage Databases
What is Adminer
Adminer is a lightweight database management tool that supports multiple database systems, including MySQL, MariaDB, PostgreSQL, SQLite, and more. Compared to other database management tools, Adminer has the following notable advantages:
- Single File Deployment: Adminer runs with just one PHP file, making deployment and usage extremely convenient.
- Multi-Database Support: Adminer can manage various 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 Functions: Adminer supports comprehensive database management functions, including creating, modifying, deleting databases and tables, executing SQL queries, importing and exporting data, etc.
For developers, Adminer not only enhances work efficiency but also simplifies the complexity of database management.
Accessing Adminer
ServBay comes with Adminer pre-installed, and you can access Adminer via the following URL: https://servbay.host/adminer.php
Using Adminer to Manage the MariaDB (MySQL) Database Provided by ServBay
Logging into the Server
- Open your browser and navigate to Adminer's URL.
- In the login interface, select the database type as "MySQL."
- Enter the server connection information:
- Username and password: Available in ServBay under 'Settings' - 'Database.'
- Server:
localhost
or/Applications/ServBay/tmp/mysql.sock
- Click the "Login" button to enter the database management interface.
Creating a Database
- After successfully logging in, click "Create Database" in the left menu.
- Enter the database name.
- Click the "Save" button to create the database.
Adding 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 the data and click the "Save" button.
Deleting Data
- Select the table you want to operate on.
- Click the "Select" button to choose the rows you want to delete.
- Click the "Delete" button to confirm deletion.
Deleting a Database
- In the database list, select the database you want to delete.
- Click the "Delete" button.
- Confirm the delete operation.
Using Adminer to Manage the PostgreSQL Database Provided by ServBay
Logging into the Server
- Open your browser and navigate to Adminer's URL.
- In the login interface, select the database type as "PostgreSQL."
- Enter the server connection information:
- Username and password: Available in ServBay under 'Settings' - 'Database.'
- Server:
/Applications/ServBay/tmp
- Database:
postgres
or another manageable database
- Click the "Login" button to enter the database management interface.
Creating a Database
- After successfully logging in, click "Create Database" in the left menu.
- Enter the database name.
- Click the "Save" button to create the database.
Adding 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 the data and click the "Save" button.
Deleting Data
- Select the table you want to operate on.
- Click the "Select" button to choose the rows you want to delete.
- Click the "Delete" button to confirm deletion.
Deleting a Database
- In the database list, select the database you want to delete.
- Click the "Delete" button.
- Confirm the delete operation.
Using Adminer to Manage SQLite 3 Databases
Logging into the Server
- Open your browser and navigate to Adminer's URL.
- In the login interface, 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.
Creating a Database
- Enter the new database file name in the database file path.
- Click the "Save" button to create the database.
Adding 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 the data and click the "Save" button.
Deleting Data
- Select the table you want to operate on.
- Click the "Select" button to choose the rows you want to delete.
- Click the "Delete" button to confirm deletion.
Deleting a Database
- In the database file path, select the database file you want to delete.
- Manually delete the file or use a file management tool to delete it.
By following the above steps, you can easily use Adminer to manage the various database systems provided by ServBay. Adminer's simple interface and powerful functions will greatly improve your database management efficiency.