LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-14-2010, 03:25 AM   #1
gvenugopal140
LQ Newbie
 
Registered: Jun 2010
Location: Dilsukhnagar,Hyderabad
Posts: 4

Rep: Reputation: 0
Problem with starting mysql under fedora


Hi to all,

i have installed mysql-server under fedora12 by using yum as

# yum install mysql-server

it has installed successfully...

but the problem is when i am trying to start mysql as

#/etc/init.d/mysqld start

it is showing the error message as below:

Initializing MySQL database:
FATAL ERROR: Could not find mysqld

The following directories were searched:

/user/local/mysql/bin/libexec
/user/local/mysql/bin/sbin
/user/local/mysql/bin/bin

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

[FAILED]


Why its coming like that??
Can anyone please solve this problem...
 
Old 06-14-2010, 04:29 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by gvenugopal140 View Post
Hi to all,

i have installed mysql-server under fedora12 by using yum as

# yum install mysql-server

it has installed successfully...

but the problem is when i am trying to start mysql as

#/etc/init.d/mysqld start

it is showing the error message as below:

Initializing MySQL database:
FATAL ERROR: Could not find mysqld

The following directories were searched:

/user/local/mysql/bin/libexec
/user/local/mysql/bin/sbin
/user/local/mysql/bin/bin

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

[FAILED]


Why its coming like that??
Can anyone please solve this problem...
sounds like you originally had a version of mysql server compiled from source.

Can you start the mysql server like this?

Code:
service mysqld start
Can you locate the mysqld executable?
The mysql-server package installs this into /usr/libexec


Code:
rpm -qf /usr/libexec/mysqld
mysql-server-5.0.77-4.el5_4.1

report back with any errors when trying to start mysql with

Code:
service mysqld start
if it doesnt work there are a number of ways to fix.

Easiest option would probably be to use yum to remove mysql-server, rm -f /usr/local/mysql,
then reinstall with yum.

Of course, back up anything that you might need in the /usr/local/mysql directory first..

Last edited by centosboy; 06-14-2010 at 04:44 AM.
 
Old 06-14-2010, 05:22 AM   #3
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 387

Rep: Reputation: 61
Depending on your version of Fedora, it could well be: -

/etc/rc.d/init.d/mysql start

(omitting the 'd' for daemon)
 
Old 06-14-2010, 05:58 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
hmmm....
my guess is that the script being called belongs to another mysql server package..

Code:
rpm -qf /etc/init.d/mysqld
is a guess tho....
 
Old 06-15-2010, 02:00 AM   #5
gvenugopal140
LQ Newbie
 
Registered: Jun 2010
Location: Dilsukhnagar,Hyderabad
Posts: 4

Original Poster
Rep: Reputation: 0
Problem with starting mysql under fedora12

Quote:
Originally Posted by centosboy View Post
sounds like you originally had a version of mysql server compiled from source.

Can you start the mysql server like this?

Code:
service mysqld start
Can you locate the mysqld executable?
The mysql-server package installs this into /usr/libexec


Code:
rpm -qf /usr/libexec/mysqld
mysql-server-5.0.77-4.el5_4.1

report back with any errors when trying to start mysql with

Code:
service mysqld start
if it doesnt work there are a number of ways to fix.

Easiest option would probably be to use yum to remove mysql-server, rm -f /usr/local/mysql,
then reinstall with yum.

Of course, back up anything that you might need in the /usr/local/mysql directory first..
Hi Centosboy,

thanks for ur help...

when i use

Code:
service mysqld start
its showing the error message like

Code:
Initializing MySQL database:  
FATAL ERROR: Could not find mysqld

The following directories were searched:

    /user/local/mysql/bin/libexec
    /user/local/mysql/bin/sbin
    /user/local/mysql/bin/bin

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

                                                           [FAILED]
and

Code:
rpm -qf /usr/libexec/mysqld
is showing the message like

Code:
mysql-server-5.1.47-1.fc12.i686
Could you please tell me what are the different ways to fix this problem???

Last edited by gvenugopal140; 06-15-2010 at 02:03 AM.
 
Old 06-15-2010, 02:11 AM   #6
gvenugopal140
LQ Newbie
 
Registered: Jun 2010
Location: Dilsukhnagar,Hyderabad
Posts: 4

Original Poster
Rep: Reputation: 0
Problem with starting mysql under fedora12

Quote:
Originally Posted by arashi256 View Post
Depending on your version of Fedora, it could well be: -

/etc/rc.d/init.d/mysql start

(omitting the 'd' for daemon)
Hi arashi256,

thanks for your reply

my fedora version is 12

and when i use

Code:
/etc/rc.d/init.d/mysql start
its showing the error message like
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
could you please find the solution for this problem??
 
Old 06-15-2010, 02:50 AM   #7
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 387

Rep: Reputation: 61
Okay, my mistake - it's definitely

Code:
/etc/rc.d/init.d/mysqld restart
I've put the "restart" in in case your service is already started. If it can't stop to restart, it'll simply start. You might want to do

Code:
yum groupinstall "MySQL"
because you've not installed the client package anyway so won't be able to test your local server connection.

You might also do a

Code:
ps -elf | grep mysql*
To see if a MySQL daemon is already running.

Last edited by arashi256; 06-15-2010 at 02:51 AM.
 
Old 06-15-2010, 04:51 AM   #8
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
[QUOTE=arashi256;4003882]Okay, my mistake - it's definitely

Code:
/etc/rc.d/init.d/mysqld restart
I've put the "restart" in in case your service is already started. If it can't stop to restart, it'll simply start. You might want to do

Code:
yum groupinstall "MySQL"
because you've not installed the client package anyway so won't be able to test your local server connection.

You might also do a

Code:
ps -elf | grep mysql*
To see if a MySQL daemon is already running.

the mysqld init file contains some variables that says where to search for the mysqld daemon.

Like i said before...there are many ways of solving.
But the simplest in your case could well be to remove the mysql-server package with yum.
Remove /usr/local/mysql
Then reinstall mysql-server.

I had an error like this when i installed from source because the rpm version was still installed.
This was when i was trying to test mysqlslap stresstesting.
I fixed this by just creating a symlink to where the mysqld init file was looking for mysql.
 
  


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 with starting mysql under fedora gvenugopal140 Linux - Newbie 1 06-14-2010 07:09 AM
MySQL Starting Problem athomas Linux - Software 3 06-04-2010 08:51 AM
Mysql not starting after changing mysql admin password in fedora prastal Linux - Newbie 1 02-20-2010 08:26 PM
Problem Starting MySQL on Fresh Fedora 8 Install w/ Yum'd MySQL blong4life Linux - Server 2 07-04-2008 08:44 PM
problem starting MYSQL 4.0.1 rixride00 Linux - Software 2 04-06-2004 11:45 AM


All times are GMT -5. The time now is 01:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration