mysql connecting problem

Discussion regarding the installation and configuration of Linux distributions.

mysql connecting problem

Postby mohdali2 » Tue Mar 04, 2003 5:12 pm

I recently installed mysql database from redhat linux 7.2 distribution in form of RPM package but when I tried to connect the test database using

mysql -utest

The following error message displayed:

Error 2002:

Can't connect to local mysql server through socket "/var/lib/mysql/mysql.sock" (111)

If anyone knows please help me solve the problem

Regards
Muhammad Ali
mohdali2
Havaldaar
 
Posts: 125
Joined: Sun Jan 26, 2003 4:54 pm

Postby adilhafeez » Wed Mar 05, 2003 6:07 pm

it seems that you havent started the mysql daemon
to start mysql type following command
login as super user (root)

service mysqld start
or
/etc/rc.d/init.d/mysqld start
adilhafeez
Cadet
 
Posts: 2
Joined: Wed Mar 05, 2003 6:04 pm
WLM: adilhafeez@hotmail.com
Yahoo Messenger: adil_hafeez@yahoo.com

Postby gh4z4nf4r » Tue Mar 11, 2003 8:01 pm

aoa,

mohdali2
i had the same error when i installed mysql recently. then i gave all those commands like
mysqld start
mysqld start &
and one or more type that was given in the howto
but that did nothing for me .......dont know why because its the standard way to do it .
then what i did in the end was to start mysqld from serviceconfigurator and then every thing worked fine ..i got my connection and was abe to connect to database through mycc.
that was all how it went i still dont know why
mysqld start didnt worked
gh4z4nf4r
Naik
 
Posts: 65
Joined: Mon Oct 14, 2002 3:51 pm
WLM: gh4z4nf4r@hotmail.com
Yahoo Messenger: gh4z4nf4r@yahoo.com
Location: Wah Cantt

mysqld

Postby Kdaemon » Mon Apr 28, 2003 1:14 pm

I also had same problem
i first started mysqld
that created that socket for listening
Kdaemon
Naib Subedar
 
Posts: 346
Joined: Sat Nov 30, 2002 12:22 pm
Location: Islamabad. GPS: LHR

Postby mrkkhattak » Mon Apr 28, 2003 6:21 pm

Assalamualaikum,

Oh ...

I too did the same gh4z4nf4r (started mysql from service configurator or webmin - both worked fine) . after that I added mysql to be run at startup (added it through service configurater). it worked fine :-)

regards,

-Meraj
mrkkhattak
Site Admin
 
Posts: 285
Joined: Wed Aug 07, 2002 8:00 pm
ICQ: 173967661
WLM: mrkkhattak
Yahoo Messenger: mrkkhattak
AOL: mrkkhattak
Location: Karachi

Postby gh4z4nf4r » Tue Apr 29, 2003 11:33 am

hi,
so do any one know why its not starting with the command line
gh4z4nf4r
Naik
 
Posts: 65
Joined: Mon Oct 14, 2002 3:51 pm
WLM: gh4z4nf4r@hotmail.com
Yahoo Messenger: gh4z4nf4r@yahoo.com
Location: Wah Cantt

Postby fawad » Tue Apr 29, 2003 5:37 pm

gh4z4nf4r,
It's usually recommended to use the init script for starting and stopping daemons instead of doing that directly. On redhat:

Code: Select all

su -
service mysql restart

will restart the service in an orderly fashion
fawad
Site Admin
 
Posts: 918
Joined: Wed Aug 07, 2002 8:00 pm
ICQ: 17672437
Website: http://www.fawad.net
WLM: fawadhalim@hotmail.com
Yahoo Messenger: fawad2048
AOL: fawadhalim
Location: Addison, IL


Return to “%s” Installation

Who is online

Users browsing this forum: No registered users and 2 guests