LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-12-2009, 06:50 PM   #1
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Rep: Reputation: 0
MySQL - Could not find mysqld


Hi,

I'm trying to install a MySQL server from source files. I'm following these instructions http://dev.mysql.com/doc/refman/5.1/...k-install.html
And I'm running the easypeasy 1.0 linux distribution.

I'm trying to create the MySQL data directory and initialize the grant tables by running this command: sudo bin/mysql_install_db --user=mysql

This command gives the following error:
FATAL ERROR: Could not find mysqld

The following directories were searched:

/usr/libexec
/usr/sbin
/usr/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 of the level of the extracted archivem or pass the --basedir option pointing to that location.

I used these source files ftp://mysql.mirror.kangaroot.net/pub...-5.1.32.tar.gz

The command locate mysqld gives no results.
I've been searching for hours now, and still haven't found a solution.
Can someone help me, please?
 
Old 03-12-2009, 08:26 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
What it means is that the MySQL daemon is not running. You need to start MySQL on the computer, before you can initialise anything.
 
Old 03-12-2009, 08:28 PM   #3
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Try something like:

(As root!)

Code:
mysql start
or
Code:
/usr/sbin/mysql start
or
Code:
/etc/init.d/mysql start
It will be something like one of those.
 
Old 03-13-2009, 06:09 AM   #4
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by irishbitte View Post
Try something like:

(As root!)

Code:
mysql start
or
Code:
/usr/sbin/mysql start
or
Code:
/etc/init.d/mysql start
It will be something like one of those.
Thank you for your reply !
I tried to start the mysql server with the following command: /usr/local/mysql/bin/mysqld_safe --user=mysql &

(The commands you gave me didn't work, probably cause I'm compiling from source code)

Anyway the command /usr/local/mysql/bin/mysqld_safe --user=mysql &
gave the following error:

Code:
  GNU nano 2.0.7                          File: /var/lib/mysql/valerie-easypeasy.err                                                          

090313 12:04:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
090313 12:04:40 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
/usr/local/mysql/libexec/mysqld: Unknown error 1146
090313 12:04:40 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090313 12:04:40 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'
090313 12:04:40 [ERROR] Aborting

090313 12:04:40 [Note]
090313 12:04:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
So, I try running the upgrade command, and then I get the following output:
Code:
valerie@valerie-easypeasy:/usr/local/mysql$ sudo bin/mysql_upgrade
Looking for 'mysql' as: bin/mysql
Looking for 'mysqlcheck' as: bin/mysqlcheck
Running 'mysqlcheck'...
bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
I saw somewhere a configure command that added a socket parameter. Should I try this to? Or is the problem something different.

Last edited by kawaii!; 03-13-2009 at 06:17 AM.
 
Old 03-13-2009, 08:02 AM   #5
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I added the basedir command and now have a different output:
Code:
valerie@valerie-easypeasy:/usr/local/mysql$ sudo bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql
Installing MySQL system tables...
090313 13:54:41 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'
090313 13:54:41 [ERROR] Aborting

090313 13:54:41 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/local/mysql/libexec/mysqld --skip-grant &

and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/local/mysql/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!
This is starting to kill me ! Can someone help me with this ? :S
 
Old 03-13-2009, 08:55 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Edit my.cnf and comment the line
Code:
skip-federated
 
Old 03-13-2009, 02:34 PM   #7
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Edit my.cnf and comment the line
Code:
skip-federated
I did that, still doesn't work. I tried starting the server

Gives the following output:
Code:
valerie@valerie-easypeasy:~$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 6870
valerie@valerie-easypeasy:~$ 090313 20:32:16 mysqld_safe Logging to '/var/lib/mysql/valerie-easypeasy.err'.
090313 20:32:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
090313 20:32:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
With option --skip-grant gives the following
Code:
 valerie@valerie-easypeasy:/usr/local/mysql$ sudo /usr/local/mysql/libexec/mysqld --skip-grant --user=mysql &
[1] 6861
valerie@valerie-easypeasy:/usr/local/mysql$ 090313 20:30:58 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
090313 20:30:58 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-bdb'
090313 20:30:58 [ERROR] Aborting
Creating the directory and grant tables still gives exact the same error
 
Old 03-13-2009, 04:10 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Take a look at /var/lib/mysql/valerie-easypeasy.err to see if you find any hints why it's not starting.
 
Old 03-13-2009, 05:41 PM   #9
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Take a look at /var/lib/mysql/valerie-easypeasy.err to see if you find any hints why it's not starting.
Following is in de err file:
Code:
090313 20:23:29 [Note]
090313 20:23:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
090313 20:32:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
090313 20:32:16 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
/usr/local/mysql/libexec/mysqld: Unknown error 1146
090313 20:32:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090313 20:32:16 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-bdb'
090313 20:32:16 [ERROR] Aborting
upgrade command gives still the same.


I might have found a solution on google
add the --libexecdir=/usr/local/mysql/bin
option to my configure command !
I will try this first thing tomorrow, I'm off to bed know, will let you know if it works or not.

Anyway Thank you for your help !
 
Old 03-13-2009, 06:00 PM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
To me it looks that you have another mysql installed. If you have followed the tutorial you mentioned, the databases should be located in /usr/local/mysql/var
Try to start the server with:
Code:
/usr/local/mysql/share/mysql/mysql.server start
and see if it works.

Last edited by bathory; 03-14-2009 at 03:46 AM.
 
Old 03-14-2009, 05:11 AM   #11
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
valerie@valerie-easypeasy:~$ /usr/local/mysql/share/mysql/mysql.server start
Starting MySQL
* Couldn't find MySQL manager (/usr/bin/mysqlmanager) or server (/usr/bin/mysqld_safe)
 
Old 03-14-2009, 09:19 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You have (or used to have) another mysql installed, that uses /var/lb/mysql for databases, /usr/bin for the binaries etc. Use your package manager to uninstall it, if you want to keep the one you've compiled.As a temporary workaround run the following as root and see if it works:
Code:
export PATH=/usr/local/mysql/bin:$PATH
/usr/local/mysql/share/mysql/mysql.server start
 
Old 03-15-2009, 07:53 AM   #13
kawaii!
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I installed a debian server and tried it agian. Worked from the first time.
I have not tried the last solutions you gave me so i cannot say what was wrong.
It can be that easy peasy was the cause. Or that there was already another mysql installed
Thank you for all your help!
 
  


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
mysqld - /var/log/mysql/mysql-bin.index not found robin.w Linux - Software 5 02-10-2011 01:00 AM
mysql needs mysqld.sock? radiodee1 Linux - Server 10 01-25-2007 05:33 AM
MySQL: mysqld start for 2 sec bato Fedora 2 04-03-2006 01:50 PM
MYSQL on Slackware9.0 ./mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13) Litn Linux - Software 2 09-02-2003 09:00 PM
mysql rpm install: Didn't find /usr/libexec/mysqld rioguia Linux - Software 2 01-27-2003 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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