Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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.
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:
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)
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:
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.