zm_database_init ERROR

Forum for questions and support relating to the 1.24.x releases only.
Locked
alexolait
Posts: 8
Joined: Tue Apr 28, 2009 3:42 pm

zm_database_init ERROR

Post 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
NokSuKao
Posts: 14
Joined: Wed Aug 26, 2009 1:53 pm

Post by NokSuKao »

Hi,

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

greetz

NokSuKao
alexolait
Posts: 8
Joined: Tue Apr 28, 2009 3:42 pm

Post 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:
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Post 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
Image
alexolait
Posts: 8
Joined: Tue Apr 28, 2009 3:42 pm

Post 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...
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Post 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
Image
alexolait
Posts: 8
Joined: Tue Apr 28, 2009 3:42 pm

Post 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....
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Post 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
Image
Locked