zoukankan      html  css  js  c++  java
  • MySQL 5.5.60 源码安装说明

    安装依赖

    # yum -y install gcc gcc* cmake automake bison bison-devel tcl tcl-* ncurses-devel perl

    解压

    # tar fzx mysql-5.5.60.tar.gz

    编译安装

    # cmake .  
    -DCMAKE_INSTALL_PREFIX=/usr/local/mysql 
    -DWITH_INNOBASE_STORAGE_ENGINE=1  
    -DWITH_MYISAM_STORAGE_ENGINE=1 
    -DDEFAULT_CHARSET=utf8  
    -DDEFAULT_COLLATION=utf8_general_ci  
    -DWITH_EXTRA_CHARSETS=all 
    -DMYSQL_TCP_PORT=3306  
    -DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock  
    -DMYSQL_DATADIR=/usr/local/mysql/data
    
    # make && make install
    
    # 如果编译安装失败后,再次编译安装,请将 mysql-5.5.60/CMakeCache.txt  文件删除

    初始化并启动数据库

    # groupadd -r mysql
    # useradd -g mysql -r -s /sbin/nologin mysql
    # chown -R mysql:mysql /usr/local/mysql
    # cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
    # cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
    # /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
    Installing MySQL system tables...
    190926 19:12:07 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
    190926 19:12:07 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.60-log) starting as process 119738 ...
    OK
    Filling help tables...
    190926 19:12:07 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
    190926 19:12:07 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.60-log) starting as process 119745 ...
    OK
    
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    
    /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
    /usr/local/mysql/bin/mysqladmin -u root -h 127.0.0.1
    127.0.0.1 password 'new-password'
    
    Alternatively you can run:
    /usr/local/mysql/bin/mysql_secure_installation
    
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
    
    See the manual for more instructions.
    
    You can start the MySQL daemon with:
    cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
    
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl
    
    Please report any problems at http://bugs.mysql.com/

    启动数据库

    # cat >> /etc/profile <<EOF
    MYSQL_HOME=/usr/local/mysql
    export PATH=$MYSQL_HOME/bin:$PATH
    EOF
    # source /etc/profile
    # /etc/init.d/mysqld start
    Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
    . SUCCESS!
  • 相关阅读:
    PerfDog携手Imagination,助力开发者获取GPU关键数据
    WeTest云手机升级,支持iOS 15全新系统
    洞穿性能测试痛点,PerfDog以提升应用和游戏的品质为使命
    使用xmlhttprequest遇到CORS报错的处理
    Hive的联级(cascade)-新增字段(column)后,旧分区无法更新数据问题
    数据异常检测入门
    Linux查看文件或文件夹大小: du命令
    k8s pod自动重启原因(jvm内存设置)
    计算容器运行至今多长时间
    期刊论文在线投稿审稿系统day1数据库设计
  • 原文地址:https://www.cnblogs.com/litzhiai/p/15271536.html
Copyright © 2011-2022 走看看