I need to start a MySQL container in Kubernetes with a database and a schema and sample data.
I tried to use the parameter "command" in the Kubernetes yaml, but at the time of execution, the db is still not started.
- image: mysql:5.7.24
name: database
command:
[
'/usr/bin/mysql -u root -e "CREATE DATABASE IF NOT EXISTS mydbname"',
]
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "1"