mysql connecting problem

Discussion regarding the installation and configuration of Linux distributions.
mohdali2
Havaldaar
Posts: 125
Joined: Sun Jan 26, 2003 4:54 pm

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

adilhafeez
Cadet
Posts: 2
Joined: Wed Mar 05, 2003 6:04 pm
Contact:

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

gh4z4nf4r
Naik
Posts: 65
Joined: Mon Oct 14, 2002 3:51 pm
Location: Wah Cantt
Contact:

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

Kdaemon
Naib Subedar
Posts: 346
Joined: Sat Nov 30, 2002 12:22 pm
Location: Islamabad. GPS: LHR

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

mrkkhattak
Site Admin
Posts: 285
Joined: Wed Aug 07, 2002 8:00 pm
Location: Karachi
Contact:

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

gh4z4nf4r
Naik
Posts: 65
Joined: Mon Oct 14, 2002 3:51 pm
Location: Wah Cantt
Contact:

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

hi,
so do any one know why its not starting with the command line

fawad
Site Admin
Posts: 918
Joined: Wed Aug 07, 2002 8:00 pm
Location: Addison, IL
Contact:

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


Return to “Installation”

Who is online

Users browsing this forum: No registered users and 1 guest