LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-01-2004, 11:31 PM   #1
devit
Member
 
Registered: Jan 2004
Distribution: Slackware 9.1
Posts: 82

Rep: Reputation: 15
mysql doesn't start


I use a Slackware 9.1 system (full install) and I can't start mysql:
Code:
bash-2.05b# cd /etc/rc.d
bash-2.05b# ./rc.mysqld start
bash-2.05b# Starting mysqld daemon with databases from /var/lib/mysql
040402 08:10:55  mysqld ended
Code:
bash-2.05b# mysql -p -u root
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
bash-2.05b#
Could you help me solve this out!

Thanks!
 
Old 04-01-2004, 11:41 PM   #2
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
Can you post some the logs from /var/log/mysql....
 
Old 04-02-2004, 06:32 AM   #3
devit
Member
 
Registered: Jan 2004
Distribution: Slackware 9.1
Posts: 82

Original Poster
Rep: Reputation: 15
I have no /var/log/mysql... but there is a /var/log/apache...
 
Old 04-02-2004, 09:26 AM   #4
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
Find the mysqld (locate or which mysqld) and try to run it directly see what it spits out.

I'm not sure which packages are required for mysql on slack. Usually it's broken up into about three, the server, the client, and common files. So maybe one of those is missing?
 
Old 04-06-2004, 01:06 PM   #5
hus
Member
 
Registered: Dec 2003
Location: Bangkok- Thailand
Distribution: Mandriva 10.0,Fedora Core 4
Posts: 79

Rep: Reputation: 15
I have the same problem In Slack
Then I have try on Redhat but it's still the same
I think It must create password for admin. first before using it.
But I don't know how to do
 
Old 04-06-2004, 01:59 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Using Slackware and asked then answered all the time.

As root:

mysqld_install_db

chown -R mysql.mysql /var/lib/mysql

mysqld_safe &

And then attempt to connect to the mysql server.

On a side note, a search would have probably found this solution as I know I've probably stated the steps above a dozen times already.
 
Old 04-06-2004, 02:46 PM   #7
j0217995
Member
 
Registered: Jan 2003
Location: Grand Rapids, Michigan, USA
Distribution: Kubuntu
Posts: 71

Rep: Reputation: 15
This information is easily found in the MySQL readme/manual. There is a section on installing and configuing the database under Linux. http://www.mysql.com/documentation/m...html#Linux-RPM
 
Old 04-06-2004, 03:16 PM   #8
jogurt666
Member
 
Registered: Nov 2003
Location: Poland => Mazowieckie => Ok'a
Distribution: Gentoo
Posts: 176

Rep: Reputation: 30
try typing:

# ./rc.mysqld -uroot
 
Old 04-06-2004, 04:03 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by jogurt666
try typing:

# ./rc.mysqld -uroot
Okay, he clearly stated that he doesn't have a /var/lib/mysql so this means he hasn't created the initial databases and corrected the ownerships.. so its going to fail each and everytime when starting til he does those steps I previously mentioned.. then he can use that script if he chooses to do so.
 
Old 04-08-2004, 03:00 AM   #10
jogurt666
Member
 
Registered: Nov 2003
Location: Poland => Mazowieckie => Ok'a
Distribution: Gentoo
Posts: 176

Rep: Reputation: 30
well i presume he's already done that.
 
Old 04-10-2004, 11:17 AM   #11
EffemaN
LQ Newbie
 
Registered: Mar 2004
Location: Campinas - SP - Brazil
Distribution: Slackware
Posts: 3

Rep: Reputation: 0
Worked!

Quote:
Originally posted by trickykid
Using Slackware and asked then answered all the time.

As root:

mysqld_install_db

chown -R mysql.mysql /var/lib/mysql

mysqld_safe &

And then attempt to connect to the mysql server.

On a side note, a search would have probably found this solution as I know I've probably stated the steps above a dozen times already.
Thanks, thats worked fine here in my Slackware 9.1.

I think the problem was that i ran the mysqld_install_db without --user mysql parameter, so, all the directories were created as root, so the chmod -R solved these problem.

[]'s
 
Old 04-10-2004, 03:53 PM   #12
devit
Member
 
Registered: Jan 2004
Distribution: Slackware 9.1
Posts: 82

Original Poster
Rep: Reputation: 15
Excuse-me for my late reply but I had some problems with my connection. I managed to fix the problem(the database wasn't properly installed).

Thanks for your's advices!
 
Old 05-21-2004, 03:24 PM   #13
g452
Member
 
Registered: May 2003
Location: tswane
Distribution: Slackware 9.1
Posts: 113

Rep: Reputation: 15
hells bells - trickykid - u saved my ass - i did the same stupid mistake setting up mysql as root and the chmod -R solved the problem for me too - well - at least i am not getting any errors like i did - now on to brand new errors (if there is some) - -

THANX !!

 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
MySQL won't start! dezza Linux - Software 5 01-01-2005 07:21 AM
MySql error 2002, Cannot start mysql djchris Linux - Software 5 04-13-2004 06:12 PM
Cannot start MySQL cisco_kidd20 Linux - Software 13 03-25-2004 10:04 AM
I can't get MySQL to start. Travis86 Linux - Software 5 11-07-2003 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:02 PM.

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