zoukankan      html  css  js  c++  java
  • Linux MySQL5.6.36安装手册

    1 安装依赖包

    yum -y install perl perl-devel
    

    2 新建用户组合用户

    groupadd mysql
    useradd mysql -g mysql
    

    3 解压到data下面

    mkdir /data
    tar -zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz -C /data
    

    4 重命名

    cd /data
    mv mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz  mysql
    

    5 安装

    cd/data/mysql
    

    初始化安装

    /data/mysql/scripts/mysql_install_db --user=mysql --basedir=/data/mysql --datadir=/data/mysql/data
    

    出现以下报错解决方法:

    WARNING: The host 'MySQL' could not be looked up with /data/mysql/bin/resolveip.
    This probably means that your libc libraries are not 100 % compatible
    with this binary MySQL version. The MySQL daemon, mysqld, should work
    normally with the exception that host name resolving will not work.
    This means that you should use IP addresses instead of hostnames
    when specifying MySQL privileges !
    Installing MySQL system tables.../data/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
    

    添加IP对应的主机名

    vim /etc/hosts
    

    以及安装依赖关系libaia文件

    yum install libaio* -y
    

    6 更改所有者

    su root
    chown -R mysql:mysql /data/mysql
    cd /data/mysql/support-files/
    cp my-default.cnf /etc/my.cnf
    cp mysql.server /etc/init.d/mysqld
    

    7 设置环境变量

    echo 'PATH=/data/mysql/bin/:$PATH' >>/etc/profile
    source /etc/profile
    

    8 添加用户并授权

    修改root本地登陆密码

    set password=PASSWORD(‘vv@122’);
    grant all privileges on *.* to ‘vv’@'%' identified by 'vv@122';
    flush privileges;
    

    9设置开机自启动

    chkconfig --add mysqld
    
  • 相关阅读:
    HDU 1394 Minimum Inversion Number 线段树
    POJ 2777 Count Color 线段树
    POJ 2828 Buy Tickets 线段树
    POJ 2528 Mayor's posters 线段树+离散化
    HDU 1166 敌兵布阵 线段树的基本应用——动态区间和问题
    【转】ACM blog 汇总
    【转】ACM资源
    【链表】关于链表的内存池
    C语言文件操作 fseek ,fread,rewind
    【转】任意进制转换--(62进制)
  • 原文地址:https://www.cnblogs.com/qiming0322/p/10132376.html
Copyright © 2011-2022 走看看