centos6.7 64位下安装MySQL-5.5

      一、确认系统是64位还是32位,最后确认是64位
       #getconf WORD_BIT
      #getconf LONG_BIT
      #echo $HOSTTYPE
      二、检查是否有其它版本的MySQL
      #rpm -qa|grep mysql
       三、卸载MySQL5.1
       #yum -y remove mysql-libs-5.1.73-7.el6.x86_64
       #rpm -qa|grep mysql
       #yum -y remove mysql-5.1.73-7.el6.x86_64
       #rpm -qa mysql
      四、下载安装包在opt目录下
      #cd /opt
      #yum install wget
      #yum install wget
      #wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.30-1.el6.x86_64.rpm
      #wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.30-1.el6.x86_64.rpm
      #wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.30-1.el6.x86_64.rpm
        五、安装   
         #rpm -ivh MySQL-devel-5.5.30-1.el6.x86_64.rpm
        #rpm -ivh MySQL-client-5.5.30-1.el6.x86_64.rpm
         #wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.30-1.el6.x86_64.rpm
      六、解决libaio报错问题
        #rpm -ivh MySQL-server-5.5.30-1.el6.x86_64.rpm
       libaio.so.1()(64bit) is needed by MySQL-server-5.5.25a-1.rhel5.x86_64
       libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.5.25a-1.rhel5.x86_64
       libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.5.25a-1.rhel5.x86_64
        从以上错误信息可以看出是因为缺少库libaio,所以需要安装libaio
      七、再次安装
        #wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm
        #rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm
        #rpm -ivh MySQL-server-5.5.30-1.el6.x86_64.rpm
      八、启动服务
        #/etc/init.d/mysql start
        Starting MySQL... SUCCESS!
        #mysql -u root -p
        Enter password:
        Welcome to the MySQL monitor.  Commands end with ; or \g.
        Your MySQL connection id is 1
        Server version: 5.5.30 MySQL Community Server (GPL)
        Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
        Oracle is a registered trademark of Oracle Corporation and/or its
        affiliates. Other names may be trademarks of their respective
        owners.
        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
        mysql>
        启动成功,缺省口令为空

你可能感兴趣的:(运维,知识点)