LinuxQuestions.org
Review your favorite Linux distribution.
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-09-2010, 12:00 PM   #1
rmknox
Member
 
Registered: May 2010
Posts: 354

Rep: Reputation: 34
trying to start mysql


installed mysql
type
yum install mysql
tells me nothing to do - up to date

type mysql
responds ERROR 2002 - cant connect to local MYSQL server through socket
/var/lib/mysql/mysql.sock

lost in tons of documentation - sun docs very general and maybe its there but i'm getting dizzy looking

can someone give me a pointer on how to get to the point where I can get an mysql> prompt
 
Old 07-09-2010, 12:11 PM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Is mysql running ?
 
1 members found this post helpful.
Old 07-09-2010, 12:16 PM   #3
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
system monitor does not show it as running or sleeping

wen i type
mysqld &
it says no such command - similar command is mysql

Last edited by rmknox; 07-09-2010 at 12:25 PM.
 
Old 07-09-2010, 12:21 PM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Check whether the mysql process is running or not
If it is Linux based
ps ax | grep mysql

If it is unix based
ps -ef | grep mysql
 
1 members found this post helpful.
Old 07-09-2010, 12:28 PM   #5
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
ps -ef | grep mysql
produces an answer
root some numbers grep mysql

i dont know whether it is merely seeing my command or whether it sees mysql
 
Old 07-09-2010, 12:47 PM   #6
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
It seems mysql is not running and lack of information to understand your problem, Please refer some Linux or Unix System administration books to familiar with Linux based system
 
1 members found this post helpful.
Old 07-09-2010, 12:56 PM   #7
samsonite
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Rep: Reputation: 1
What version of linux/unix are you using? This will help in how to start mysql.

Aaron
 
1 members found this post helpful.
Old 07-09-2010, 01:58 PM   #8
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
linux 2.6.31.5-127.fc12.i686
 
Old 07-09-2010, 02:10 PM   #9
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
You actually have to install mysql-server !

try

yum groupinstall "MySQL Database"
 
Old 07-09-2010, 02:15 PM   #10
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Check whether the mysql startup script is existing on following location /etc/initd.d/

To check mysql status whether its working or not
/etc/init.d/mysql status

To start mysql
/etc/init.d/mysql start

Refer this to install mysql php and apache in fedora
http://www.howtoforge.com/installing...fedora-11-lamp

Last edited by kirukan; 07-09-2010 at 02:17 PM.
 
1 members found this post helpful.
Old 07-09-2010, 02:23 PM   #11
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
partial success

from sun documentation

i ran

/etc/init.d/mysqld start

and it apparently worked

am now trying to properly set passwords

did so with
/usr/bin/mysqladmin -u root etc

finallly
mysql --user=knox

BINGO!

thanks

Last edited by rmknox; 07-09-2010 at 02:35 PM.
 
Old 07-09-2010, 08:13 PM   #12
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
starting mysql automatically

I read in the sun docu,mentatino that if you have mysqld in etc/init.d then the system will start the mysql server automatically at start up.

I do and it doesnt.

However, when I type
/etc/init.d/mysqld start

it starts just fine.

is there an east way to get it to start at system startup?

thanks for this neat location

dick
 
Old 07-09-2010, 10:26 PM   #13
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
How to use init files can vary from distro to distro. You might consider searching for something like "start program boot up [distro name]."

Sun's documentation may not have taken your specific distro into account.

For example, in Slackware, the by-the-book way to start a new program on boot up (other than the ones that come out-of-the-box with Slack) is to put the start up command in /etc/rc.d/rc.local, not in /etc/init.d. Several upgrades ago, when I used to self-host my website, I started mysql and apache from there.
 
1 members found this post helpful.
Old 07-09-2010, 10:26 PM   #14
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
You don't mention what distro Linux you're using. That's important. Is it Fedora like you posted from?

If you used a package manager like yum to install MySQL (like you should) then this is taken care of automatically.

Else, you have to set up symlinks in /etc/rc?.d where ? is the runlevel. I don't know if Fedora has an easy tool to help you do this. So do something like
Code:
ln -s /etc/init.d/mysqld /etc/rc3.d/S99mysql
and it will start last in runlevel 3. Read up on SysV runlevels (I assume Fedora still uses them).
 
1 members found this post helpful.
Old 07-09-2010, 11:25 PM   #15
rmknox
Member
 
Registered: May 2010
Posts: 354

Original Poster
Rep: Reputation: 34
Sorry about the distrubition. I had not noticed that this is both linux and fedora - although it is obvious now that I look.

Fedora 2.6.31.5-127.fc12.i686

I installed with yum.

Thanks for the pointers.

Dick
 
  


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
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 02:38 AM
Slack13 - Can't start mysql; can't find mysql.sock? Jayla Linux - Newbie 11 11-25-2009 07:10 AM
Fedora 9:No mysql.sock file found. Cannot start mysql smilingbuddha Linux - Software 3 03-21-2009 04:06 AM
I have RHEL 5.0 and MySQL start problem, my MySQL server doesn't start rsatya Linux - Enterprise 4 02-03-2009 01:04 PM
MySQL - Timeout error occurred trying to start MySQL Daemon. stuartornum Linux - Software 3 02-26-2006 01:54 PM


All times are GMT -5. The time now is 01:27 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