One of the services offered by Daspanel is the database manager. For this service the chosen tool is the Adminer. We chose it because in addition to MySql it works with a number of other types of databases.
Daspanel comes with a container running a MySql database server, more specifically the MariaDB 10. It can be used for the local development of sites and also in the public hosting of them.
In the control panel click the services menu
On the next screen where all avaiable services are listed.
- Click this buttom to open the database manager service.
You can directly access the database manager by opening the url adminer.svc.daspanel.site in your browser.
A new window will open in your browser to enter the login data on the database server. In the example below we will show you how to log in to the Daspanel MySql server, for other servers that you want to use, just use the appropriate credentials.
- System: Select "MySQL"
- Server: Enter "daspanel-mysql" as the server address. If you are going to use an external server, please enter its valid address here.
- Username: Enter "root"
- Password: Inform the admin password.
- Click the login button.
You can easily obtain login credentials in the *** Database Management *** section of
System->Services Users module using the link below:
Let's say we want to create a database for Wordpress. Being in the Adminer main screen:
On the next page
- Enter the database name
- Select collation type, the recommended one is utf8_general_ci
- Click the Save button to create the database
Create database user¶
On the page that displays database details
- Privileges: Click this link
On the next page you can associate existing users with the database or create a new user and associate it with the database.
- Create user: Click this link to add new database user
On the next page we will add our new user:
- Server: Put % here.
- Username: Choose the login username
- Password: Choose a good password and put here
- All privileges: Mark this oiption
- Grant option: Mark it to allow the user add anothers users
- Click the save button to create the new user
- The Daspanel MySQL container can only be accessed by the other docker containers
that are on your internal network created by
docker-compose, so it is not so dangerous to use % in the host field.
- To simplify the example we created a user with all the powers in relation to the database to which he was associated, of course you can opt in a more rigid control of the granted permissions.