yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
237 stars 71 forks source link

Connecting to alpine-mariadb from another Docker container - arm32v7 #54

Closed emmaparker96 closed 3 years ago

emmaparker96 commented 3 years ago

I want to access data of an alpine-mariadb from a Python script that is in another Docker container on a Raspberry Pi 2 (armhf/arm32v7).

After executing the command: docker run -it --name mariadb -p 3306:3306 -v /var/lib/mysql:/var/lib/mysql -e MYSQL_DATABASE=mydb -e MYSQL_USER=root -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=password yobasystems/alpine-mariadb:arm32v7 the following output arises:

[i] mysqld not found, creating....
[i] MySQL data directory not found, creating initial DBs
43516-01-16 16:49:34 0 [ERROR] This MySQL server doesn't support dates later than 2038
[i] Creating database: mydb
[i] with character set: 'utf8' and collation: 'utf8_general_ci'
[i] Creating user: root with password password
323662-03-12  5:39:11 0 [ERROR] This MySQL server doesn't support dates later than 2038
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*
MySQL init process done. Ready for start up.
exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0

Unfortunately, I can't get a connection from Python to the database. Is Docker Compose needed for this?

dominictayloruk commented 3 years ago

See https://github.com/yobasystems/alpine-mariadb/issues/53#issuecomment-857579408

You now have yobasystems/alpine-mariadb:arm32v7

when it should be yobasystems/alpine-mariadb:10.5.9 or even yobasystems/alpine-mariadb:10.5.9-armhf

dominictayloruk commented 3 years ago

Also see here around the issue you have in your logs https://github.com/yobasystems/alpine-mariadb/issues/47

This MySQL server doesn't support dates later than 2038

Thats why when you said you were running pi 2, i suggested the 10.5.9 image.