博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MYSQL5.7.24编译安装
阅读量:5259 次
发布时间:2019-06-14

本文共 3062 字,大约阅读时间需要 10 分钟。

1.解压源代码包

#tar zxvf mysql-boost-8.0.17.tar.gz

2.安装依赖包

#yum -y install gcc gcc-c++ ncurses ncurses-devel bison libgcrypt perl make cmake

3.建立用户组和用户

#groupadd mysql

#useradd mysql

4.建立文件夹,并赋权

mkdir /usr/local/mysql

mkdir /data

mkdir -r /data/mysql

chown -R mysql /usr/local/mysql

chown -R mysql /data

chmod -R 577 /usr/local/mysql

chmod -R 577 /data

5.编译MYSQL

#cmake -DDOWNLOAD_BOOST=1 \  -DWITH_BOOST=/usr/local \  -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \  -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \  -DDEFAULT_CHARSET=utf8 \  -DDEFAULT_COLLATION=utf8_general_ci \  -DWITH_MYISAM_STORAGE_ENGINE=1 \  -DWITH_INNOBASE_STORAGE_ENGINE=1 \  -DENABLED_LOCAL_INFILE=1 \  -DMYSQL_DATADIR=/data \ -DMYSQL_TCP_PORT=3306
# make && make install 配置MY.CNF $vi /etc/my.cnf [client] port = 3306 socket = /data/mysqldata/3306/mysql.sock # The MySQL server [mysqld] port = 3306 user = mysql socket = /data/mysqldata/3306/mysql.sock pid-file = /data/mysqldata/3306/mysql.pid basedir = /usr/local/mysql datadir = /data/mysqldata/3306/data tmpdir = /data/mysqldata/3306/tmp open_files_limit = 60000 explicit_defaults_for_timestamp server-id = 1203306 lower_case_table_names = 1 character-set-server = utf8 federated #sql_mode=STRICT_TRANS_TABLES max_connections = 1000 max_connect_errors = 100000 interactive_timeout = 86400 wait_timeout = 86400 sync_binlog=0 back_log=100 default-storage-engine = InnoDB log_slave_updates = 1 #*********** Logs related settings *********** log-bin = /data/mysqldata/3306/binlog/mysql-bin binlog_format= mixed binlog_cache_size=32m max_binlog_cache_size=64m max_binlog_size=512m long_query_time = 1 log_output = FILE log-error = /data/mysqldata/3306/mysql-error.log slow_query_log = 1 slow_query_log_file = /data/mysqldata/3306/slow_statement.log #log_queries_not_using_indexes general_log = 0 general_log_file = /data/mysqldata/3306/general_statement.log #expire-logs-days = 14 binlog_expire_logs_seconds = 1728000 relay-log = /data/mysqldata/3306/binlog/relay-bin relay-log-index = /data/mysqldata/3306/binlog/relay-bin.index #****** MySQL Replication New Feature********* master-info-repository=TABLE relay-log-info-repository=TABLE relay-log-recovery #*********** INNODB Specific options *********** innodb_buffer_pool_size = 2048M transaction-isolation=REPEATABLE-READ innodb_buffer_pool_instances = 8 innodb_file_per_table = 1 innodb_data_home_dir = /data/mysqldata/3306/innodb_ts innodb_data_file_path = ibdata1:2048M:autoextend innodb_thread_concurrency = 8 innodb_log_buffer_size = 16M innodb_log_file_size = 128M innodb_log_files_in_group = 3 innodb_log_group_home_dir = /data/mysqldata/3306/innodb_log innodb_flush_log_at_trx_commit = 2 innodb_max_dirty_pages_pct = 70 innodb_flush_method=O_DIRECT [mysql] no-auto-rehash default-character-set=gbk 初始化MYSQL $/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql. 启动MYSQL $/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql & 登陆MYSQL usr/local/mysql/bin/mysql -uroot -p$PASSWORD

转载于:https://www.cnblogs.com/flamechan1981/p/11564997.html

你可能感兴趣的文章
【洛谷P1816 忠诚】线段树
查看>>
电子眼抓拍大解密
查看>>
poj 1331 Multiply
查看>>
tomcat7的数据库连接池tomcatjdbc的25个优势
查看>>
Html 小插件5 百度搜索代码2
查看>>
Ubuntu(虚拟机)下安装Qt5.5.1
查看>>
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
查看>>
java 常用命令
查看>>
卷积中的参数
查看>>
51nod1076 (边双连通)
查看>>
Item 9: Avoid Conversion Operators in Your APIs(Effective C#)
查看>>
深入浅出JavaScript(2)—ECMAScript
查看>>
STEP2——《数据分析:企业的贤内助》重点摘要笔记(六)——数据描述
查看>>
ViewPager的onPageChangeListener里面的一些方法参数:
查看>>
Jenkins关闭、重启,Jenkins服务的启动、停止方法。
查看>>
CF E2 - Array and Segments (Hard version) (线段树)
查看>>
Linux SPI总线和设备驱动架构之四:SPI数据传输的队列化
查看>>
SIGPIPE并产生一个信号处理
查看>>
CentOS
查看>>
Linux pipe函数
查看>>