Open michondr opened 5 years ago
quic solution is to run mysql in docker:
configuring docker if you dont have it:
sudo apt install docker.io
sudo groupadd docker
- probably already existssudo gpasswd -a $USER docker
installing mysql container:
sudo service mysql stop
docker pull mysql/mysql-server:5.7
docker run -p 3306:3306 --name mysql1 -e MYSQL_ROOT_PASSWORD=root -d mysql/mysql-server:5.7
sudo docker exec -it mysql1 bash
mysql -u root --password=root
update mysql.user set host = "%" where user = "root";
flush privileges;
setup db:
CREATE DATABASE \`pytest-portal\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE \`pytest-datamall\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'pytest'@'%' IDENTIFIED BY 'pytest';
GRANT ALL PRIVILEGES ON *.* TO 'pytest'@'%' WITH GRANT OPTION;
mysql-connector
works with mysql 5.7 and not 8.0mysql-connector-python
works with mysql 8.0 and not 5.7