Database Connection Problem

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Quantum
Posts: 121
Joined: Fri Mar 25, 2011 3:34 pm

Database Connection Problem

Post by Quantum »

Have mariadb in one container in podman pod, and ZM in another container in the same pod.

Inside the zm container:

Code: Select all

# nc -z -v mariadb 3306
mariadb (127.0.0.1:3306) open
... so I know that the ZM container shares the mariadb port.

Code: Select all

# mysql -u root -h 127.0.0.1:3306 -p < /usr/share/zoneminder/db/zm_create.sql
Enter password: 
ERROR 2005 (HY000): Unknown server host '127.0.0.1:3306' (-2)
Huh?
mikb
Posts: 661
Joined: Mon Mar 25, 2013 12:34 pm

Re: Database Connection Problem

Post by mikb »

Try this syntax instead, maybe it doesn't understand "HTTP" style port specs and is treating all of it as a "host" (which it clearly isn't) :-

Code: Select all

mysql -u root -h 127.0.0.1 -P 3306 .... 
Note, big P for port, little p for whatever you were doing with that ... ;)
Post Reply