Mysql8.0.18如何属性源码编译安装和gcc-9.2.0升级


这篇文章将为大家详细讲解有关Mysql8.0.18如何属性源码编译安装和gcc-9.2.0升级,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。1、环境设置2、用户新增目录设置3、解压安装包mysql-8.0.18.tar.gz 到 /opt/mysql84、安装依赖
yum install -y gcc gcc-c++ ncurses-devel bison zlib libxml openssl
更新cmake3 通过Yum 安装
yum install cmake3安装后发现编译不通过 需要更新gcc版本5 以上5、gcc-9.2.0编译安装转载:
https://www.2cto.com/net/201908/815589.html安装gcc 源码编译依赖编译安装gcc6、cmake编译mysql(由于装了不同的版本gcc,编译时可以通过参数指定版本****重要!*****)
编译结束:同目录下执行安装创建目录:
查看目录:7、设置Mysql用户系统参数8、配置启动文件# 复制启动文件[client]
port = 3306
socket = /data/mysql/run/mysql.sock
# The MySQL server
[mysqld]
port = 3306
user = mysql
socket = /data/mysql/run/my开发云主机域名sql.sock
pid_file = /data/mysql/mysqld.pid
basedir = /usr/local/mysql
datadir = /data/mysql/data
tmpdir = /data/mysql/tmp
open_files_limit = 65535
explicit_defaults_for_timestamp
server_id = 1
lower_case_table_names = 1
character_set_server = utf8
#sql_mode=STRICT_TRANS_TABLES
#
# ******security
safe_user_create
max_connections = 3000
max_user_connections=2980
secure_file_priv=/data/mysql/tmpmax_connect_errors = 100000
interactive_timeout = 86400
wait_timeout = 86400
sync_binlog=100
back_log=1024
max_binlog_cache_size=2147483648
max_binlog_size=524288000
default_storage_engine = InnoDB
log_slave_updates = 1#*********** Logs related settings ***********
log_bin = /data/mysql/binlog/mysql-bin
[mysql@centos1 mysql]$ more /date/mysql/my.cnf
/date/mysql/my.cnf: No such file or directory
[mysql@centos1 mysql]$ more /data/mysql/my.cnf
[client]
port = 3306
socket = /data/mysql/run/mysql.sock
# The MySQL server
[mysqld]
port = 3306
user = mysql
socket = /data/mysql/run/mysql.sock
pid_file = /data/mysql/mysqld.pid
basedir = /usr/local/mysql
datadir = /data/mysql/data
tmpdir = /data/mysql/tmp
open_files_limit = 65535
explicit_defaults_for_timestamp
server_id = 1
lower_case_table_names = 1
character_set_server = utf8
#sql_mode=STRICT_TRANS_TABLES
#
# ******security
safe_user_create
max_connections = 3000
max_user_connections=2980
secure_file_priv=/data/mysql/tmpmax_connect_errors = 100000
interactive_timeout = 86400
wait_timeout = 86400
sync_binlog=100
back_log=1024
max_binlog_cache_size=2147483648
max_binlog_size=524288000
default_storage_engine = InnoDB
log_slave_updates = 1#*********** Logs related settings ***********
log_bin = /data/mysql/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/mysql/mysql-error.log
slow_query_log = 1
slow_query_log_file = /data/mysql/slow_statement.log
log_queries_not_using_indexes=0
log_slave_updates=ON
log_slow_admin_statements=1
general_log = 0
general_log_file = /data/mysql/general_statement.log
binlog_expire_logs_seconds = 1728000
relay_log = /data/mysql/binlog/relay-bin
relay_log_index = /data/mysql/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 = 4096M
transaction_isolation=REPEATABLE-READ
innodb_buffer_pool_instances = 8
innodb_file_per_table = 1
innodb_data_home_dir = /data/mysql/innodb_ts
innodb_data_file_path = ibdata1:2048M:autoextend
innodb_thread_concurrency = 8
innodb_log_buffer_size = 67108864
innodb_log_file_size = 1048576000
innodb_log_files_in_group = 4
innodb_max_undo_log_size=4G
innodb_undo_directory=/data/mysql/undo_space
innodb_log_group_home_dir = /data/mysql/innodb_log
innodb_adaptive_flushing=ON
innodb_flush_log_at_trx_commit = 2
innodb_max_dirty_pages_pct = 60
innodb_open_files=60000
innodb_purge_threads=1
innodb_read_io_threads=4
innodb_stats_on_metadata=OFF
innodb_flush_method=O_DIRECT
[mysql]
no-auto-rehash
default-character-set=UTF8MB4
#prompt = (u@h) [d]>_
net-buffer-length=64K
unbuffered
max-allowed-packet = 2G#some var for mysql8
#log_error_verbosity=3
#innodb_print_ddl_logs=1
#binlog_expire_logs_seconds=259200
#innodb_dedicate_server=0
#
#innodb_status_file=1
#innodb_status_output=0
#innodb_status_output_locks=0[mysqldump]
quick
max_allowed_packet=2G
log_error=/data/mysql/log/mysqld/dump.log
net_buffer_length=8k
9、初始化$/usr/local/mysql/bin/mysqld –defaults-file=/data/mysql/my.cnf –initialize –user=mysql查看初始化日志及密码[mysql@centos1 mysql]$ vi mysql-error.log2019-10-31T03:30:00.222973Z 5 [Note] [MY-010454] [Server] A temporary password is generated for
root@localhost: j63rKGLr3j-L10、启动mysql服务
$/usr/local/mysql/bin/mysqld_safe –defaults-file=/data/mysql/my.cnf –user=mysql &登录[mysql@centos1 bin]$ mysql -uroot -pj63rKGLr3j-L
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8
Server version: 8.0.18Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.mysql> show variableALTER USER
‘root’@’localhost’ IDENTIFIED WITH sha256_password BY ‘mysqlWAI’ PASSWORD EXPIRE INTERVAL 360 DAY;
关闭数据
[mysql@centos1 bin]$ mysqladmin -uroot -pmysqlWAI –socket=/data/mysql/run/mysql.sock shutdown &
完成!关于“Mysql8.0.18如何属性源码编译安装和gcc-9.2.0升级”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

相关推荐: mongoDB数据库有什么用

这篇文章主要介绍了mongoDB数据库有什么用,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。作为一名程序员,我相信大家都要接触数据库,对于mysql和mongoDB也有相对的认识,对于mysql…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 06/23 22:01
下一篇 06/23 22:02

相关推荐