SOLVED: Errors when trying to run ZM for the first time

Forum for questions and support relating to the 1.24.x releases only.
Locked
Fill
Posts: 9
Joined: Sat Jul 18, 2009 9:26 am
Location: Portugal

SOLVED: Errors when trying to run ZM for the first time

Post by Fill »

Hi guys, I just installed ZM on my debian 5.0 box. Everything seemed to be fine on ./configure and on make install.

I created a proper database name, user and password to connect to the MySQL Server (which is in the same machine - localhost)

and yes, I *did* set the username, database name, password and host correctly on the configure command, however it seems like I'm having some problems:
BOX4:/home/filipe/ZoneMinder-1.24.2# zmpkg.pl start
Warning, overriding installed ./zm.conf file with local copy
DBI connect('database=ZoneMinderDB;host=localhost','zmadmin',...) failed: Access denied for user 'zmadmin'@'localhost' (using password: YES) at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 46.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 46.
BOX4:/home/filipe/ZoneMinder-1.24.2#
Also, I wonder if ZM is meant to be run as a root or as a normal user.
I hope to have some help from you soon.

Thanks in advance,
Fill
Last edited by Fill on Mon Aug 03, 2009 5:40 pm, edited 1 time in total.
World705
Posts: 8
Joined: Tue Jun 30, 2009 1:46 pm

Post by World705 »

check that the zmadmin has the host it can connect from as localhost. and also that the database also has the user priveleges for this
World705
Posts: 8
Joined: Tue Jun 30, 2009 1:46 pm

Post by World705 »

also just saw that the database you have chosen might be CASE sensitive
Fill
Posts: 9
Joined: Sat Jul 18, 2009 9:26 am
Location: Portugal

Post by Fill »

OK, I'll check what you said. But tell me: all these error messages are related to the fact of ZM not being able to connect to the database?

And should ZM be run as a root or as normal user?
Fill
Posts: 9
Joined: Sat Jul 18, 2009 9:26 am
Location: Portugal

Post by Fill »

user zmadmin is registered on MySQL and is able to connect to the database...
filipe@BOX4:~$ mysql -u zmadmin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 63
Server version: 5.0.51a-24+lenny1 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> connect ZoneMinderDB
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Connection id: 64
Current database: ZoneMinderDB

mysql>
Fill
Posts: 9
Joined: Sat Jul 18, 2009 9:26 am
Location: Portugal

Post by Fill »

hmm, seems like the password I chose was incompatible with ZM files (it had some weird symbols like #, $, etc) .. maybe the # made the conf file read it as a comment or something like that. The password started with # so probably it was screwing up something. I logged into mysql and changed zmadmin's password, reconfigured & recompiled ZM and now it connects to the db

However, I seem to be having another issue with this system - I'll report it in a new topic because this one is solved.

Thanks for all the help you provided me
Cheers,
Fill
Locked