Centos 8 安装MySQL 方法

2024-10-13 08:03:28

1、OS版本CentOS Linux release 8.1.1911 (Core)

Centos 8 安装MySQL 方法

3、[root@localhost ~]# tar zxf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz[root@localhost ~]# mv mysql-5.7.26-linux-glibc2.12-x86_64 /usr/local/mysql[root@localhost ~]#

Centos 8 安装MySQL 方法

5、[root@localhost ~]# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)安装yum install libncurses* -y问题解决[root@localhost ~]# yum install libncurses* -y

Centos 8 安装MySQL 方法

7、vim /etc/my.cnf[client]port = 3306socket = /tmp/mysql.sock[mysqld柯计瓤绘]port = 3306socket = /tmp/mysql.sockpid_file = /data/mysql/mysql.piddatadir = /data/mysqldefault_storage_engine = InnoDBmax_allowed_packet = 512Mmax_connections = 2048open_files_limit = 65535skip-name-resolvelower_case_table_names=1character-set-server = utf8mb4collation-server = utf8mb4_unicode_ciinit_connect='SET NAMES utf8mb4'innodb_buffer_pool_size = 512Minnodb_log_file_size = 1024Minnodb_file_per_table = 1innodb_flush_log_at_trx_commit = 0key_buffer_size = 64Mlog-error = /data/mysql/mysql_error.loglog-bin = /data/mysql/mysql-binbinlog_format = mixedexpire_logs_days = 10slow_query_log = 1slow_query_log_file = /data/mysql/slow_query.loglong_query_time = 1server-id=1

Centos 8 安装MySQL 方法

9、[root@localhost ~]# cp /usr/local/mysql/support-files/mysql.serv髫潋啜缅er /etc/init.d/mysqld[root@localhost ~]#[root@localhost ~]# chkconfig --add mysqld[root@localhost ~]#[root@localhost ~]# chkconfig mysqld on[root@localhost ~]#[root@localhost ~]# chkconfig --list |grep mysqld

Centos 8 安装MySQL 方法
猜你喜欢