If I start the MySQL database and the Tinode server with a docker compose up command, does the Tinode server container try to log in as the "tinode" user (based on ths DSN I've set in my docker-compose file) and create the "tinode" database based on this schema.sql? If I simply try to connect to the MySQL container by using `docker exec -it mysql mysql -u tinode -p` I'm able to log in and perform actions on the "tinode" server.
I found that if I add this command under the db service, the init-db script that the Tinode server container runs seems to work.db:image: mysql:8.0container_name: mysqlrestart: always# Use your own volume.# volumes:# - <mysql directory in your file system>:/var/lib/mysqlcommand: >bash -c "docker-entrypoint.sh mysqld &sleep 5 &&mysql -u root -p${MYSQL_ROOT_PASSWORD} -e \"DROP DATABASE IF EXISTS ${MYSQL_DATABASE}; GRANT CREATE ON *.* TO '${MYSQL_USER}'@'%'; FLUSH PRIVILEGES;\" &&wait"But for some reason, init-db within the tinode-server container seems to fail with the message that it can't create the database 'tinode' because it already exists if I don't first drop the database via a separate command in the MySQL container.
I do currently have REST_DB=true in my docker-compose. If I try to compose the db and tinode-server and comment out the command under the "db" service to drop the tinode database, I still receive the following error log:```tinode-server | db (172.20.0.2:3306) open
tinode-server | 2025/07/27 16:29:11 Database adapter: 'mysql'; version: 113
tinode-server | 2025/07/27 16:29:11 Database not found. Creating.
tinode-server | 2025/07/27 16:29:11 Failure: Error 1007 (HY000): Can't create database 'tinode'; database exists
--
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tinode/2b706471-98d3-4daf-83b4-709001d68896n%40googlegroups.com.