Issue setting up Mysql Database

Support and queries relating to all previous versions of ZoneMinder
Locked
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Issue setting up Mysql Database

Post 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.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Is mysqld running?
Phil
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

Post 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!
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Post 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,
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

Post 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!
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Post by BadFish »

Anyone?
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Post 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?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

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