LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-05-2002, 07:15 PM   #1
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Rep: Reputation: 15
Angry Mysql problems


Greets all,

I've recently been trying to setup mysql/php/apache, which i've already accomplished a few times a little while back. Anyway, i've got apache to work with php without any problems but mysql is the problem.

I tried to install mysql, but it doesn't seem to be working.

i get an error:

Quote:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
I've searched through a few sites with that error, but their sollutions don't seem to help very much.

Here is a little bit of information.
linux version - red hat 7.2
mysql-3.23.51

Here's the instructions i used to install mysql -

Quote:
groupadd mysql
useradd -g mysql mysql
tar xvf mysql-3.23.51.tar
cd mysql-3.23.51
./configure --prefix=/usr/local/mysql
make
make install
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql

Can anybody help me sort this problem out?

Thanks
Regards
Kevin
 
Old 07-05-2002, 07:55 PM   #2
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
Sounds like you haven't started the mySQL server...it's confusing because running the command "mysql" runs the mySQL client, the server needs to be started separately. Try using "mysql.server start" to start the server automatically. More information can be found on the mySQL documentation page:

http://www.mysql.com/documentation/m...tarting_server

You can start the server manually by going to your mySQL bin directory and typing "./safe_mysqld --user=mysqladm &" (replace mysqladm as whatever user you want to run the server as).

Hope this helps,
Jon

Last edited by IceNineJon; 07-05-2002 at 08:00 PM.
 
Old 07-06-2002, 02:00 PM   #3
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Thanks for your reply, but that never worked

It seems though mysql isn't even installed. When i try:

Quote:
mysql.server start
i get command not found or something like that.

Any idea's. could it be the version of mysql that dont like my system? , because i even tried it on redhat 7.1 and it came up with the same error.

Any idea's?

Thanks.
 
Old 07-06-2002, 02:04 PM   #4
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Did you say you installed from source? If so what flags did yo set?

find / -iname safe_mysqld
find / -iname mysqld
find / --name mysql
 
Old 07-06-2002, 04:29 PM   #5
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
Hello,

yes, its from source, i posted how i tried to installed it.

Quote:
groupadd mysql
useradd -g mysql mysql
tar xvf mysql-3.23.51.tar
cd mysql-3.23.51
./configure --prefix=/usr/local/mysql
make
make install
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
Have i missed anythink?
 
Old 07-06-2002, 04:38 PM   #6
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Did you add /usr/local/mysql/lib to ld.so.conf
and run ldonfig

Just to make sure I didn't miss any thing else if you run:
/usr/local/mysql/bin/safe_mysql

your get: mysql.server start?

BYA, that is is exact procedure I used on RH7.2
and I dont't see that problem.
 
Old 07-06-2002, 05:36 PM   #7
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
OK,

Quote:
Did you add /usr/local/mysql/lib to ld.so.conf
and run ldonfig
no, i never did that

Quote:
Just to make sure I didn't miss any thing else if you run:
/usr/local/mysql/bin/safe_mysql
Yep, i did that, and i get

Quote:
Starting mysqld daemon with databases from /usr/local/var
020706 22:38:46 mysqld ended
Would you like to post the way you installed it?

Thanks,
Regards
 
Old 07-06-2002, 05:47 PM   #8
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
Try starting it with "/usr/local/mysql/bin/safe_mysql &". It works but since you're running it from the console as a user, as soon as you do anything the server stops...adding a "&" tells it to run in the background.
 
Old 07-06-2002, 06:02 PM   #9
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
still no luck

I've tried it from source and from rpm's.
 
Old 07-06-2002, 06:58 PM   #10
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Sorry, I got sidetracked Slack-8.1 arrived in the mail today
One more thing for you to check

In /usr/local/mysql/var

There should a "log" called hostname.err
hostname = your_host_name

If you gettiing :
020706 20:42:22 mysqld started
020706 20:42:23 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
020706 20:42:23 mysqld ended

Then chown -R mysql:mysql /usr/local/mysql/var/mysql

Last edited by pickledbeans; 07-06-2002 at 10:45 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-08-2008 12:48 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 07:53 AM


All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration