Page 1 of 1

zm_database_init ERROR

Posted: Tue Sep 08, 2009 3:14 pm
by alexolait
Hello

I try to update zone minder from 1.24.1 to 1.24.2 but when i launch zm_database_init i have this error:

Code: Select all

Giving all priviliges to zm_admin on database zm
ERROR 1045 (28000) access denied for user root@loalhost using password:YES
Have you got any idea about this error ?

Thanks for your help

Posted: Thu Sep 10, 2009 11:49 am
by NokSuKao
Hi,

set the root password in /root/.my.cnf. Then it should work. So it solved the problem.

greetz

NokSuKao

Posted: Fri Sep 11, 2009 5:15 pm
by alexolait
i have tried to put the password in the .my.cnf and to delete it but i have the same problem
This solution was posted in another forum topic.

I don't understand ....

If you have any other idea :roll:

Posted: Fri Sep 11, 2009 8:02 pm
by monex
Hi,

you should delete /root/.my.cnf as suggested and the password should not be empty. You can try to connect to mysql by entering "mysql -u root -p". If this failed you've not configured your mysql correct.

Hope this helps

Posted: Sat Sep 12, 2009 2:25 pm
by alexolait
i have a password for mysql. (for root and zm_admin
i have no probem to enter in mysql with root user and zm_user and my password

always the same problem...

Posted: Sun Sep 13, 2009 8:06 am
by monex
Hi,

that's curious, can you check if the password for user root equals the password in the .my.cnf in /root/.my.cnf. and that user root is the user, for example the .my.cnf should look like:

Code: Select all

[client]
user=root
password=<secret>
you can verify the correctness of the .my.cnf by typing mysql as root which should log you in to mysql as user root without password.

Btw. you are running zm_database_init as user root aren't you? As far as I remember it is not possible to run it as normal user but just to make sure that this isn't the cause of failure.


Hope this helps

Posted: Sun Sep 13, 2009 8:57 am
by alexolait
hello,

i'm logged in root
when i try to connect to mysql with root user and my password , it works
mysql -u root -p ...... no problem

I have edited .my.cnf and put the password after password=*******

i try to connect with the command mysql -u root and i have the access denied message and zm_init_database doesn't works

really i don't understand....

Posted: Sun Sep 13, 2009 10:44 am
by monex
Hi,

that's really curious now :P

The zm_database_init script relays on the .my.cnf configuration because it is only a wrapper script which calls the mysql command. The script should work when you can just enter "mysql" without any options (no user or password specified) and you get the mysql command prompt.

So far the theory :) One thing which is also possible is that you've mistakenly entered the system root password and not the mysql root password to .my.cnf file. That would result in the described error.

You can also have a look at /etc/my.cnf which contains the global mysql configuration. You can check if it differs form original configuration by running rpm -q mysql --verify which should give no changes (empty result) when nothing was changed.

You see I'm currently running out of ideas what could cause this error ;)

Hope this helps