Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Feb 14 '12 at 13:16

This question came from our site for professional and enthusiast programmers.

    
Which distribution do you use ? –  fyr Feb 13 '12 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 '12 at 11:37
    
Tell your distro –  coppettim Feb 13 '12 at 11:37
    
its CentOS Linux release 6.0 (Final). –  Aamir Adnan Feb 13 '12 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 '12 at 11:49

4 Answers 4

up vote 1 down vote accepted

Try the following command:

yum install mysql-server

Then start it by trying one of these:

/sbin/service mysql start
/sbin/service mysqld start
share|improve this answer
    
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 '12 at 11:51
    
Did you start the server after installing it ? /sbin/service mysql start , or /sbin/service mysqld start –  nos Feb 13 '12 at 15:09

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.

share|improve this answer

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
share|improve this answer

Start the MySQL service either by using

service mysqld start 

or

/usr/bin/mysqld start
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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