How to install mysql drivers in linux:
sudo apt-get install g++
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install libssl-dev
sudo apt-get install libmysqlclient-dev
cd /home/[yourUsername]/Qt/[QtVersion]/Src/qtbase/src/plugins/sqldrivers/mysql
/home/[yourUsername]/Qt/[QtVersion]/gcc/bin/qmake
make
make install
This command will run a mariadb container with password "mypass". You can change the volume and password.
docker run --name project_pds -p 3306:3306 -v /home/[yourUsername]/container_volume/projectPDS:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mypass -d mariadb
After that when container starts connect to it with this command
docker exec -it project_pds bash
and run this command inside the container to create a database for the server. Following commands will ask you the password that you have configured in docker run command.
mysql -p -e "CREATE DATABASE serverDB"
You can see available databases with this command:
mysql -p -e "SHOW databases;"
Now you can start correctly the server.
To see contents of users_table in mariadb container execute following commands:
mysql -uroot -p
use serverDB;
Select* from users_table;