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
    
  • 相关阅读:
    explicit for ctors taking more than one argument
    Python 的 encode 和 decode
    Tripwire配置和运行
    man twadmin
    Tripwire策略说明
    Tripwire安装
    [部分翻译] tripwire(8)
    snort-2.9.3.1安装
    [转载] snort中文手册
    wireshark_1.2.11安装
  • 原文地址:https://www.cnblogs.com/qiming0322/p/10132376.html
Copyright © 2011-2022 走看看