1

I am trying to install MySQL on Linux. And it seems that I'm confused which MySQL package I should use for my particular Linux environment.

My Linux Details:

Linux 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 6.0 (Final)

So I went for MySQL package MySQL-server-5.5.20-1.linux2.6.x86_64.rpm (download from here). I choose Linux-Generic from dropdown. But when I try to install it I got this error:

error: Failed dependencies:
    libaio.so.1()(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64
    libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64
    libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.5.20-1.linux2.6.x86_64

I got more failed dependencies errors when I choose MySQL-server-5.5.20-1.linux2.6.i386.rpm. So both are not working.

6
  • Which distribution do you use ?
    – fyr
    Feb 13, 2012 at 11:36
  • If it's something from RH or CentOS you should use yum to install packages it will resolve your dependencies.
    – Sergey Benner
    Feb 13, 2012 at 11:37
  • Tell your distro
    – coppettim
    Feb 13, 2012 at 11:37
  • its CentOS Linux release 6.0 (Final).
    – Aamir Adnan
    Feb 13, 2012 at 11:39
  • Ok i used yum to install. After installation when i issue mysql command i got this error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
    – Aamir Adnan
    Feb 13, 2012 at 11:49

4 Answers 4

0

Try the following command:

yum install mysql-server

Then start it by trying one of these:

/sbin/service mysql start
/sbin/service mysqld start
2
  • Ok i used yum to install. After installation when i issue mysql command i got this error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
    – Aamir Adnan
    Feb 13, 2012 at 11:51
  • Did you start the server after installing it ? /sbin/service mysql start , or /sbin/service mysqld start
    – nos
    Feb 13, 2012 at 15:09
7

After a similar error, I figured out what your problem was (and had a big "durrrr" on my side, as I was building from SRPM in the background):

When using the packages from mysql.com, be certain that you're downloading the correct version for your platform (32-bit or 64-bit), including all of the supplemental packages. MySQL Oracle has a terrible webpage layout, and it's easy to mix things up.

To install the dependency for either architecture:

yum install libaio

or if you need 32-bit MySQL on the 64-bit architecture:

yum install libaio.686

You could always install the in-distro packages (as discussed above), but this is a direct response to your original issue. I think it's pretty easy to mix up downloads on that site.

0

It appears you have a RedHat Enterprise Linux 6.x or a CentOS 6.x. (the "el6" in your kernel id).

Please try to get the rpm for you own distrib from either redhat.com or centos.org (they are more or less compatible which each other). I would recommend you use the "yum" installation tool, which will solve all the dependencies itself:

yum install mysql-server
-2

Start the MySQL service either by using

service mysqld start 

or

/usr/bin/mysqld start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.