Closed sysoppl closed 2 years ago
Same here.. Not been able to run this docker file with MYSQL port different from 3306 (Synology)
Can't connect to any external DB on Centos latest. Failed connecting to existing and deployed a dedicated DB with non standard port on k3s/ubuntu. Thank you
I make it works by manually creating ZoneMinder database (full database with all tables) on remote MySQL server.
In spite of getting error * Looking for remote database server ...failed!
when container starts.
@VasoVV can you provide URL with database to import?
Same Problem here. I used https://github.com/ZoneMinder/zoneminder/blob/master/db/zm_create.sql.in which solved my problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I ran into this issue and discovered that the zm_db_exists
method at https://github.com/ZoneMinder/zmdockerfiles/blob/master/utils/entrypoint.sh#L202= falsely thinks that the DB is already initialized since it only checks if the DB exists, and when using an external DB with docker, usually the DB is initialized by the DB container without any tables. So I just changed it to check for the Config table so it will correctly determine that the DB hasn't been initialized.
mysqlshow -u${ZM_DB_USER} -p${ZM_DB_PASS} -h${ZM_DB_HOST} ${ZM_DB_NAME} | grep "Config" > /dev/null 2>&1
And mounted that over the existing entry script: - ./entrypoint.sh:/usr/local/bin/entrypoint.sh
Once I changed that, I also realized that it doesn't support using a DB named other than "zm", I'm assuming the setup script just hardcodes that in. Since that script isn't in this repo I didn't bother trying to fix it and instead I just used DB name and user zm/zm to make things simpler.
This issue should not be closed, it still exists. The error-handling should also be updated to explain that it could connect to the database server but the database itself isn't found.
Edit: It also doesn't seem to support PORTS. -P is the parameter for ports, using any port or colon in the HOST name will cause it to never find the host. So many assumptions around accessing the server... X_x
I tried to create docker with external database, but it's not working. I have several other dockers connected to my database, so it is not my db fault. Also, I checked credentials three times .
Used dockerfile: zoneminderhq/zoneminder:latest-ubuntu18.04 Logs:
I tried IP:PORT and DOMAIN:PORT My port is different than 3306
This seems similar to https://github.com/ZoneMinder/zmdockerfiles/issues/62