LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2003, 10:53 AM   #1
vexed
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Rep: Reputation: 0
mysql on slack9


I did a fresh and full install of slack 9.

I've been reading a lot of on mysql and I wanted to start messing with tables. I tried to logon mysql and it gave me an error:

ERROR 2002: Can't connect to local MYSQL server through socket '/var/run/mysql/mysql.sock' (2)

I checked the directory and there's nothing in there. I remember I didn't have to do any tweaking for slack8.1 so I'm not sure where to start from here or what to put for mysql.sock.

Does anyone know how to get mysql going? Or at least point me in the right direction.
 
Old 04-04-2003, 09:35 PM   #2
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
is your mysql running?
ps -ef | grep mysql
 
Old 04-05-2003, 10:07 AM   #3
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
when mysql deamon starts it creates a socket file thats mysql.sock
type top and look for mysql on the list if it not listes start it first then connect to it
 
Old 04-07-2003, 08:58 AM   #4
vexed
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Hello,

Thanks for the replies.

I ran:

bash> ps -ef | grep mysql

And it didn't find anything.

I ran top and I did not see anything mysql related.

Apparently, the mysql server isn't running at all. Am I forgetting a setting or conf file, and rc.d setting?
 
Old 04-07-2003, 10:25 AM   #5
vexed
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Original Poster
Rep: Reputation: 0
An small update.

I re-installed slackware 9 on one of my machines. The other is an updated 8.1 -> 9 slackbox.

They both gave the same error when trying to log into mysql.

bash>mysql
ERROR 2002: Can't connect to local MYSQL server through socket '/var/run/mysql/mysql.sock' (2)

And both machines do not have the mysql.sock file in the /var/run/mysql/ Plus, they don't have an instance of mysql running.
 
Old 04-07-2003, 04:20 PM   #6
m32
Member
 
Registered: Feb 2003
Location: Cedar Park, TX
Distribution: Slackware 9.0, RH 9
Posts: 39

Rep: Reputation: 15
Quote:
Originally posted by vexed
An small update.

I re-installed slackware 9 on one of my machines. The other is an updated 8.1 -> 9 slackbox.

They both gave the same error when trying to log into mysql.

bash>mysql
ERROR 2002: Can't connect to local MYSQL server through socket '/var/run/mysql/mysql.sock' (2)

And both machines do not have the mysql.sock file in the /var/run/mysql/ Plus, they don't have an instance of mysql running.
Not to be a smarty pants (as I know nothing of mysql), but google pulled up lots on your error message:

This one seemed good.
 
Old 04-08-2003, 04:16 PM   #7
vexed
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I checked that out. I don't have a /usr/local/mysql/ but I did find it in /usr/bin and ran safe_mysqld &.

This created an error log on /var/lib/mysql

mysqld started
/usr/libexec/mysqld: Table 'mysql.host' doesn't exist
mysqld ended

My concern is that this is a fresh install of slackware 9 and I can't mysql into the database. I didn't install mysql seperately.
 
Old 04-09-2003, 01:06 PM   #8
vexed
LQ Newbie
 
Registered: Apr 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I read a few other threads and some manuals. I got it working. What I did as a root user.

cd /var/lib
chown -R mysql mysql mysql
chgrp -R root mysql mysql
su mysql
mysqladmin -u root status
cd /var
/var/lib/mysql/mysql_install_db &

I guess the permissions weren't set properly, b/c the initial db files weren't created. I'm still a newb to mysql. Thanks to those who helped out.
 
  


Reply



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 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
MySQL & Slack9.1 belorion Linux - Software 4 11-17-2003 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09: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
Open Source Consulting | Domain Registration