LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL - Could not find mysqld (http://www.linuxquestions.org/questions/linux-software-2/mysql-could-not-find-mysqld-711194/)

kawaii! 03-12-2009 07:50 PM

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?

irishbitte 03-12-2009 09:26 PM

What it means is that the MySQL daemon is not running. You need to start MySQL on the computer, before you can initialise anything.

irishbitte 03-12-2009 09:28 PM

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.

kawaii! 03-13-2009 07:09 AM

Quote:

Originally Posted by irishbitte (Post 3473785)
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.

kawaii! 03-13-2009 09:02 AM

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

bathory 03-13-2009 09:55 AM

Edit my.cnf and comment the line
Code:

skip-federated

kawaii! 03-13-2009 03:34 PM

Quote:

Originally Posted by bathory (Post 3474290)
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

bathory 03-13-2009 05:10 PM

Take a look at /var/lib/mysql/valerie-easypeasy.err to see if you find any hints why it's not starting.

kawaii! 03-13-2009 06:41 PM

Quote:

Originally Posted by bathory (Post 3474724)
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 !

bathory 03-13-2009 07:00 PM

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.

kawaii! 03-14-2009 06:11 AM

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)

bathory 03-14-2009 10:19 AM

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


kawaii! 03-15-2009 08:53 AM

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!


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