Do it yourself

Error with MySQL binary installation.

Most common error in MySql binary installation is
/usr/local/mysql# scripts/mysql_install_db –user=mysql
FATAL ERROR: Could not find mysqld
The following directories were searched:
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.
Assuming you are installing the MySql binaries into /usr/local using following commands
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db –user=mysql
shell> chown -R root .
shell> chown -R mysql data
Now try with the –basedir option as shown below
scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql
The next probable error is
Installing MySQL system tables…
/usr/local/mysql/bin/mysqld: error while loading shared libraries: cannot open shared object file: No such file or directory
Type the following command
sudo apt-get install libaio1
apt-get install libaio-dev
scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql

you will get the message

Installing MySQL system tables…
Filling help tables…
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’
/usr/local/mysql/bin/mysqladmin -u root -h rohit-Pc password ‘new-password’
Alternatively you can run:
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with
cd /usr/local/mysql/mysql-test ; perl
Please report any problems with the /usr/local/mysql/scripts/mysqlbug script!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.