This directory contains a Dockerfile that builds a Docker image derived the MySQL Server 8.0 image. It includes SQL programs that popularize the following datasets:
We can run a Docker container of it for unit testing.
cd example/datasets
docker build -t sqlflow:data .
docker run --rm -d --name sqlflowdata \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_ROOT_HOST=% \
sqlflow:data
Popularize the databases and tables with commands below:
docker exec -it sqlflowdata bash
To popularize the Churn dataset into churn
:
cat /popularize_churn.sql | mysql -uroot -proot
To popularize the Irises dataset into iris
:
cat /popularize_iris.sql | mysql -uroot -proot
To prepare database for storing machine learning models:
echo "CREATE DATABASE IF NOT EXISTS sqlflow_models;" | mysql -uroot -proot
In the container, run below command to test if tables exist.
echo "select count(*) from churn.test;" | mysql -uroot -proot
It should print the number of rows as the following:
count(*)
10
- It usually takes about 15 seconds to bring up the MySQL Server. If you try to connect it before that, you may see the following error
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
After commands executes successfully and data are popularized, go back to Installation page.