cmd/convertor/resources/samples/mysql-db-setup.sh
raw| 1 | #!/bin/sh |
| 2 | # Reference Script for getting started with mysql DB for userspace convertor |
| 3 | mysqldbuser=$1 |
| 4 | mysqldbpassword=$2 |
| 5 | |
| 6 | # Set up mysql |
| 7 | apt update |
| 8 | apt install mysql-server |
| 9 | service mysql start |
| 10 | cat ./mysql.conf | mysql |
| 11 | echo "CREATE USER '$mysqldbuser'@'localhost' IDENTIFIED BY '$mysqldbpassword'; GRANT ALL PRIVILEGES ON conversioncache.* TO '$mysqldbuser'@'localhost'; FLUSH PRIVILEGES;" | mysql |