MySQL¶
Deploying a DBMS¶
To deploy a MySQL DBMS you will need to complete the following steps:
1. Create an application with a suitable tariff.¶
Attention
Stable work is possible at tariffs not lower than “Initial”.
2. At the “Data Upload” stage, select “Via Git”¶
3. At the «Configuration» stage, select «db» and «mysql» and click «Finish»¶
When deployed, the Docker image mysql:${meta.toolchain.version}
is used. The meta.toolchain.version
parameter is optional. If not specified, the latest mysql:latest
image will be used.
Since the value of the meta.toolchain.version
parameter is a mysql image tag, you can use an arbitrary tag from docker hub as its value.
4. Specify the required environment parameters.¶
In the «Variables» section of the project, you must set the following environment variables:
To add the
root
user password and store it securely, you need to click on the «Create secret» button. In the «Name» field, enterMYSQL_ROOT_PASSWORD
, and in the Value field, enter the desired password.Additionally, you can create another user with
superuser
rights; to do this, you need to specify the user name in theMYSQL_USER
variable, and the password in theMYSQL_PASSWORD
secret.
Important
Come up with a sufficiently complex password for the database so that attackers cannot gain access to it.
If necessary, you can set other parameters supported by the image. More information about these parameters can be found on the image page.
Connect to the database¶
Attention
Connecting to the database is only possible from other projects created in Amverum.
To connect to the database, you must use the 3306
port and internal domain name specified on the «Info» page in the format:
amverum-<username>-run-<transliterated-project-name>
Deploying phpMyAdmin¶
The procedure is the same as deploying the DBMS itself:
1. Create an application with a suitable tariff.¶
Attention
To use phpMyAdmin, you need a container with a tariff of at least «Starter».
2. At the “Data Upload” stage, select “Via Git”¶
3. At the «Configuration» stage, select «db» and «phpmyadmin» and click «Finish»¶
Deployment uses image Docker phpmyadmin:${meta.toolchain.version}
4. Specify the required environment parameters.¶
In the «Variables» section of the project, you must set the following environment variables:
Variable
PMA_ABSOLUTE_URI
- link to the application (in the formathttps://<transliterated-project-name>-<user-name>.amverum.io
PMA_ARBITRARY variable set to 1
5. On the «Configuration» page of the application, click the «Build» button¶
If the configuration is empty, you must select “db” and “phpmyadmin” again and click “apply”, and then “build”.
6. In the «Settings» section of the application, activate free domain name or add your own.¶
Cunning
To save on consuming a project with mongo-express, we recommend pausing it after finishing work.