Page 1 of 1
Issue setting up Mysql Database
Posted: Wed Apr 19, 2006 6:32 pm
by BadFish
I am setting up ZoneMinder on Fedora Core 4 the Configure and make went well and now I am trying to do is create the database.
However when I try to create it using this command.
mysql mysql <db/zm_create.sql
I get the following error:
ZoneMinder-1.22.0]$ mysql mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked and I have /var/lib/mysql
thanks for your time.
Posted: Wed Apr 19, 2006 9:24 pm
by zoneminder
Is mysqld running?
Posted: Thu Apr 20, 2006 2:04 pm
by pre-newbie
Hi badfish,
I am very new on ZM. In fact I have not been able to set my cameras yet. But during my short experience I had the same symptom than you.
I do not know if your case is due to the same reasons, but the problem I had was that I installed my distro from scratch and then it was the first time I ran mysql. So, it always rejected me from creating the database because I did not created first the root mysqul passworrd.
So, what fixed the problem was just after starting the mysql server, I did:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux.site password 'new-password'
(for "linux.site", use your own machine names, that are set on your ethernet/wireless card settings, and 'new-password' the one you would like)
Then I did log in on mysql with mysql -u -p answering to the password question, with the password that we just created and then continued with the creation of the database and ZM installation..
All the details are posted here:
http://www.zoneminder.com/forums/viewtopic.php?t=5686
I hope this helps you somehow.
regards!
Posted: Fri Apr 21, 2006 4:51 pm
by BadFish
Thanks for the replies.
So as root i started mysqld:
# service mysqld start
so after checking that mysqld is running I try the following as a standard user:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux.site password 'new-password'
in the 'new-password' I place the password I want to use.
in linux.site I place the host name of the machine I am installing this on.
/usr/bin/mysqladmin -u root -p password'whateverpassword'
Enter password: <entered password>
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
I have also tried this as root.
Thanks,
Posted: Fri Apr 21, 2006 9:47 pm
by pre-newbie
Hi! It happened to me too, and the same way. Finally I installed everything from scratch again, repeating everyting and it worked for me. I am very new on this so, maybe somebody else can help you better than me, and therefore to prevent you from doing something that radical.
Good luck!
Posted: Mon Apr 24, 2006 10:11 pm
by BadFish
Anyone?
Posted: Thu Jul 06, 2006 8:13 pm
by BadFish
Had to give up install ing this cause it didn't work.
Now I am trying again and I have the same excate problem.
This is a complete new install of the OS (fedora 4)
Anyone have any idea what I am doing wrong?
Posted: Thu Jul 06, 2006 8:26 pm
by jameswilson
Im sorry mate i have never used fc4, but why dont you learn with fc3 or even better ctu zm and then move to fc4, maybe even write a how-to
Posted: Mon Jul 10, 2006 8:18 am
by cordel
zoneminder wrote:Is mysqld running?
I have to echo the same question....
That error generally means that mysql is not running.
Regards,
Corey