Sign inSign up

scalingo/mysql

By scalingo

•Updated about 1 month ago

Scalingo MySQL Image

Artifact
Image
0

8.0K

scalingo/mysql repository overview

⁠Running the image

This image contains MySQL as offered by Scalingo. To start the image, you can run the following snippet:

docker run -it -p 3306:3306 \
           -v <DATA_DIRECTORY>:/var/lib/mysql \
           scalingo/mysql:latest /mysql

Your database is now up and running on the port 3306 of your host. You can connect to it with the command:

mysql --user=mysql_user --password=secret -h 172.17.0.1 -P 3306 --ssl-mode=REQUIRED --database mysql_user

Or with the root account:

mysql --user=root --password=admin-secret -h 172.17.0.1 -P 3306 --ssl-mode=REQUIRED --database mysql_user

⁠Environment

  • DB_USER (Optional, default: mysql_user): username used for database authentication.
  • DB_PASSWORD (Optional, default: secret): password used for database authentication.
  • DB_ADMIN_PASSWORD (Optional: default: admin-secret): password used for the admin account.
  • DB_UID (Optional, default: 1503): user UID that MySQL should use to store data and run itself. You can set it to your own UID to have a simpler dev environment. Just add -e DB_UID=$(id -u) before the -v flag.

⁠Permissions

A database with the same name as $DB_USER will be created. The user $DB_USER will be available to connect to it.

The admin user is named root and can access any databases with the password defined in $DB_ADMIN_PASSWORD and create new databases also.

Tag summary

Content type

Image

Digest

sha256:2809692b5…

Size

237.3 MB

Last updated

over 2 years ago

docker pull scalingo/mysql