• mysql5.5.28.tar.gz编译安装操作笔记


    1、yum安装依赖包
    yum install wget gcc gcc-c++ make cmake ncurses-devel libtool zilib-devel -y
     
    2、创建mysql用户
    useradd -s /sbin/nologin -M mysql
     
    3、拷贝解压mysql的tar包
    cp mysql-5.5.28.tar.gz /usr/local/
    tar -zxvf mysql-5.5.28.tar.gz
     
    4、编译安装mysql
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql
    -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock
    -DDEFAULT_CHARSET=utf8
    -DDEFAULT_COLLATION=utf8_general_ci
    -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk
    -DWITH_INNOBASE_STORAGE_ENGINE=1
    -DWITH_READLINE=1
    -DENABLED_LOCAL_INFILE=1
    -DMYSQL_DATADIR=/data/mysql/
    -DMYSQL_USER=mysql
    -DMYSQL_TCP_PORT=3306
     
    make && make install
     
    5、修改mysql配置文件
    cp support-files/my-medium.cnf /etc/my.cnf
    cp support-files/mysql.server /etc/init.d/mysqld
    chmod 755 /etc/init.d/mysqld
     
    6、初始化mysql
    bash scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/ 
     
    7、启动服务
    /etc/init.d/mysqld start
     
    8、配置mysql用户
    /usr/local/mysql/bin/mysqladmin -u root password 123

    /usr/local/mysql/bin/mysql -u root -p

    9、设置开机自启动
    chkconfig mysqld on
    chkconfig --list | grep mysqld

  • 相关阅读:
    Atcoder 1975 Iroha and Haiku
    训练指南 string easy
    心态回归
    Mysql问题处理
    Mysql-从库只读设置
    Redis5-集群搭建实验
    安装python3并新建python3的虚拟环境
    docker-部署zabbix4
    pt工具-mysql慢日志分析&优化
    Ansible:playbook-nagios
  • 原文地址:https://www.cnblogs.com/jingyunyb/p/3440905.html
Copyright © 2020-2023  润新知