kylin v10 SP2 mysql8 编译安装
2022/6/23 2:19:56
本文主要是介绍kylin v10 SP2 mysql8 编译安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
1,环境介绍
2,去mysql官网下载包 https://dev.mysql.com/downloads/mysql/
或者 wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz
3, 解压压缩包 改名
tar xf mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz
mv mysql-8.0.29-linux-glibc2.12-x86_64 mysql
4,创建 my.cnf 启动过程中看日志my.cnf的配置和5.7是有区别的修改修改大小参数
mkdir mysql/ect
cd mysql/ect
! 建议把socket 放在 /tmp 下,否者每次连接都要指定socket
vim my.cnf
[client]
#user=xxx
#password=xxxx
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
datadir= /home/mysql/dbdata/data
basedir= /home/mysql
pid-file= /home/mysql/dbdata/data/mysqld_3307.pid
log-error= /home/mysql/dbdata/data/mysqld_3307.log
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
skip-name-resolve
skip-host-cache
character_set_server=utf8mb4
explicit_defaults_for_timestamp
max_allowed_packet = 16M
sort_buffer_size = 4M
read_buffer_size = 16M
#query_cache_size = 32M
#query_cache_limit = 8M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 128M
tmp_table_size = 128M
sync_binlog = 0
binlog_format = ROW
binlog_cache_size = 4M
log-slave-updates = 1
log-bin=mysql-bin
expire_logs_days = 10
max_connections = 18096
max_user_connections = 18000
max_connect_errors = 9999999
slow_query_log=on
slow-query-log-file = slow.log
long_query_time = 5
skip-federated
server-id = 5
default-storage-engine=InnoDB
innodb_data_file_path = ibdata1:12M:autoextend
innodb_file_per_table = 1
innodb_buffer_pool_size = 100M
#innodb_buffer_pool_instances = 5
innodb_log_files_in_group = 2
innodb_log_file_size = 50M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_table_locks = 0
transaction-isolation=READ-COMMITTED
innodb_doublewrite = 0
innodb_flush_method = O_DIRECT
log_bin_trust_function_creators = 1
innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
#user=xxx
#password=xxxx
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 64M
sort_buffer_size = 32M
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
5,初始化数据库 并启动
mkdir /home/mysql/dbdata -p
/home/mysql/bin/mysqld --initialize-insecure --basedir=/home/mysql --datadir=/home/mysql/dbdata/data
/home/mysql/bin/mysqld_safe --defaults-file=/home/mysql/etc/my.cnf --user=root &
6,连接数据库 修改root密码
/home/mysql/bin/mysql --socket=/tmp/mysql.sock
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Mysql!333';
7,添加环境变量
PATH="$HOME/.local/bin:$HOME/bin:/home/mysql/bin:$PATH"
这篇关于kylin v10 SP2 mysql8 编译安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-15MySQL教程:初学者必备的MySQL数据库入门指南
- 2024-11-15MySQL教程:初学者必看的MySQL入门指南
- 2024-11-04部署MySQL集群项目实战:新手入门教程
- 2024-11-04如何部署MySQL集群资料:新手入门指南
- 2024-11-02MySQL集群项目实战:新手入门指南
- 2024-11-02初学者指南:部署MySQL集群资料
- 2024-11-01部署MySQL集群教程:新手入门指南
- 2024-11-01如何部署MySQL集群:新手入门教程