• Linux下Mysql安装(RPM安装)


    1. 首先检查机器里是否已经存在MySQL

    $ rpm -qa | grep mysql

    2. 去官网下载相应的rpm包:https://dev.mysql.com/downloads/mysql/

    mysql-community-common-5.7.19-1.el6.x86_64.rpm
    mysql-community-client-5.7.19-1.el6.x86_64.rpm
    mysql-community-server-5.7.19-1.el6.x86_64.rpm
    mysql-community-libs-5.7.19-1.el6.x86_64.rpm

    3. 上传到/usr/local/mysql文件夹,进行安装mysql

      按照以下顺序进行安装,因为它们之间存在依赖关系

    #common --> libs --> clients --> server
    
    rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm
    rpm -ivh mysql-community-libs-5.7.19-1.el6.x86_64.rpm
    rpm -ivh mysql-community-clients-5.7.19-1.el6.x86_64.rpm
    rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm

      如果不按照这样的顺序,将会出现如下错误:

    # error: Failed dependencies: 
    libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64 
    libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64 
    libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64

      解决方法:

    $ yum install -y numactl

    4. 安装好后,可以去检查是否存在MySQL的配置文件或者MySQL的命令在/usr/bin下

    #mysql配置文件
    $ ls /etc/my.cnf
    
    # mysql命令
    $ cd /usr/bin/
    $ ls | grep mysql
      
    $ /etc/init.d/mysqld start
    $ ps aux|grep mysqld

    5.后续密码等配置

      请参考:Linux下Mysql安装(tar安装)

  • 相关阅读:
    杭电 1521 排列组合

    杭电 1799 循环多少次?
    杭电1028 Ignatius and the Princess III(整数拆分)
    毕业论文A.1 Matlab环境配置
    Open Graphics Library初步_搭建环境_GLUT
    Open Graphics Library初步_摄影机_GLUT
    C#使用office相关com组件
    插入排序
    二叉树的四种遍历方法(递归、迭代)
  • 原文地址:https://www.cnblogs.com/jing99/p/9684199.html
Copyright © 2020-2023  润新知