Page 1 of 1

Database Connection Problem

Posted: Fri Feb 23, 2024 4:18 pm
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?

Re: Database Connection Problem

Posted: Fri Feb 23, 2024 6:17 pm
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 ... ;)