>

Centos6源码安排MySQL5,MySQL数据库基于Centos7

- 编辑:澳门新葡亰平台游戏 -

Centos6源码安排MySQL5,MySQL数据库基于Centos7

二、MySQL的装置格局:

以下是MySQL常见的二种安装格局:

  • 二进制  rpm   Yum Repository    mysql57-community-release-el7-9.noarch.rpm
  • 二进制  预编译  Generic                        mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
  • 源码包安             Source Code                mysql-5.7.19.tar.gz

Centos6源码安插MySQL5.6

mysql从5.5版本起先,不再使用./configure编写翻译,而是利用cmake编写翻译器

mysql-5.6.16.tar.gz源码包下载地址:

本人的mysql目录配置如下:
安装路线:/usr/local/mysql
数据库路线:/data/mysql
源码包贮存地方:/usr/software

预备干活:安装基本依赖包,先用yum安装cmake、automake 、autoconf ,另MySQL 5.6.x急需起码安装的包有:bison,gcc、gcc-c++、ncurses-devel
[[email protected] ~]# yum install cmake make -y
[[email protected] ~]# yum install gcc gcc-c++ autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* -y
[[email protected] ~]# cp /root/mysql-5.6.15.tar.gz /usr/software/
[[email protected] ~]# cd /usr/software
始发编写翻译安装
[[email protected] ~]# tar -zxvf mysql-5.6.15.tar.gz
[[email protected] ~]# cd mysql-5.6.15
[[email protected] ~]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_READLINE=1
-DENABLED_LOCAL_INFILE=1
-DMYSQL_DATADIR=/data/mysql/
-DMYSQL_USER=mysql
-DMYSQL_TCP_PORT=3306
[[email protected] ~]# make && make install

mysql官方网址韩文文书档案粗略翻译说美素佳儿(Aptamil)下
The MyISAM, MEEnclaveGE, MEMOKoleosY, and CSV engines are mandatory (always compiled into the server) and need not be installed explicitly.(表达:mysql暗许援助的数据库引擎有MyISAM, MELANDGE, MEMOCRUISERY, CSV,不须求在编写翻译时再声称)
故此地点的编写翻译条件省掉了如下两行
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_MEMORY_STORAGE_ENGINE=1
但INNODB必供给注脚式安装,所以多了这一行
-DWITH_INNOBASE_STORAGE_ENGINE=1

查看mysql.mysql的客商及组是否存在

[[email protected] ~]# cat /etc/passwd |grep mysql

mysql:x:501:503::/home/mysql:/bin/bash

[[email protected] ~]# cat /etc/group |grep mysql

mysql:x:503:

不OK就进行以下两行命令(不然跳过这一步)
[[email protected] ~]# groupadd mysql #添加mysql用户组
[[email protected] ~]# useradd mysql -g mysql -s /sbin/nologin # 添加mysql用户

以下带水水泥灰字体的一声令下特别极其,必须求举行
[[email protected] ~]# cd /usr/local/mysql
[[email protected] ~]# chown mysql.mysql -R . #将mysql目录赋予mysql顾客的试行权限
[[email protected] ~]# chown mysql.mysql -R /data/mysql
[[email protected] ~]# cp support-files/my-default.cnf /etc/my.cnf #mysql配置文件
[[email protected] ~]# chmod 755 scripts/mysql_install_db #赋予mysql_install_db试行权限

以下命令为mysql 运营及自运行配置
[[email protected] ~]# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/

出口如下音讯:

2013-12-12 13:58:23 25913 [Note] InnoDB: The InnoDB memory heap is disabled

2013-12-12 13:58:23 25913 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2013-12-12 13:58:23 25913 [Note] InnoDB: Compressed tables use zlib 1.2.3

2013-12-12 13:58:23 25913 [Note] InnoDB: Using Linux native AIO

2013-12-12 13:58:23 25913 [Note] InnoDB: Not using CPU crc32 instructions

2013-12-12 13:58:23 25913 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2013-12-12 13:58:23 25913 [Note] InnoDB: Completed initialization of buffer pool

2013-12-12 13:58:23 25913 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2013-12-12 13:58:23 25913 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2013-12-12 13:58:23 25913 [Note] InnoDB: Database physically writes the file full: wait...

2013-12-12 13:58:23 25913 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2013-12-12 13:58:24 25913 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2013-12-12 13:58:24 25913 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2013-12-12 13:58:24 25913 [Warning] InnoDB: New log files created, LSN=45781

2013-12-12 13:58:24 25913 [Note] InnoDB: Doublewrite buffer not found: creating new

2013-12-12 13:58:24 25913 [Note] InnoDB: Doublewrite buffer created

2013-12-12 13:58:24 25913 [Note] InnoDB: 128 rollback segment(s) are active.

2013-12-12 13:58:24 25913 [Warning] InnoDB: Creating foreign key constraint system tables.

2013-12-12 13:58:24 25913 [Note] InnoDB: Foreign key constraint system tables created

2013-12-12 13:58:24 25913 [Note] InnoDB: Creating tablespace and datafile system tables.

2013-12-12 13:58:24 25913 [Note] InnoDB: Tablespace and datafile system tables created.

2013-12-12 13:58:24 25913 [Note] InnoDB: Waiting for purge to start

2013-12-12 13:58:24 25913 [Note] InnoDB: 5.6.15 started; log sequence number 0

2013-12-12 13:58:26 25913 [Note] Binlog end

2013-12-12 13:58:26 25913 [Note] InnoDB: FTS optimize thread exiting.

2013-12-12 13:58:26 25913 [Note] InnoDB: Starting shutdown...

2013-12-12 13:58:27 25913 [Note] InnoDB: Shutdown completed; log sequence number 1625977

OK

 

Filling help tables...2013-12-12 13:58:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2013-12-12 13:58:27 25936 [Note] InnoDB: The InnoDB memory heap is disabled

2013-12-12 13:58:27 25936 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2013-12-12 13:58:27 25936 [Note] InnoDB: Compressed tables use zlib 1.2.3

2013-12-12 13:58:27 25936 [Note] InnoDB: Using Linux native AIO

2013-12-12 13:58:27 25936 [Note] InnoDB: Not using CPU crc32 instructions

2013-12-12 13:58:27 25936 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2013-12-12 13:58:27 25936 [Note] InnoDB: Completed initialization of buffer pool

2013-12-12 13:58:27 25936 [Note] InnoDB: Highest supported file format is Barracuda.

2013-12-12 13:58:27 25936 [Note] InnoDB: 128 rollback segment(s) are active.

2013-12-12 13:58:27 25936 [Note] InnoDB: Waiting for purge to start

2013-12-12 13:58:27 25936 [Note] InnoDB: 5.6.15 started; log sequence number 1625977

2013-12-12 13:58:27 25936 [Note] Binlog end

2013-12-12 13:58:27 25936 [Note] InnoDB: FTS optimize thread exiting.

2013-12-12 13:58:27 25936 [Note] InnoDB: Starting shutdown...

2013-12-12 13:58:29 25936 [Note] InnoDB: Shutdown completed; log sequence number 1625987

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 ziteng26 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/bin/mysqld_safe &

 

You can test the MySQL daemon with mysql-test-run.pl

 

cd mysql-test ; perl mysql-test-run.pl

 

Please report any problems with the ./bin/mysqlbug script!

 

The latest information about MySQL is available on the web at

 

 

Support MySQL by buying support/licenses at

 

New default config file was created as /usr/local/mysql/my.cnf and

will be used by default by the server when you start it.

You may edit this file to change server settings

 

WARNING: Default config file /etc/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

 

--defaults-file argument to mysqld_safe when starting the server

 

[[email protected] ~]# cp support-files/mysql.server /etc/init.d/mysqld
[[email protected] ~]# chmod 755 /etc/init.d/mysqld
查看mysqld服务是还是不是设置为开机运行
[[email protected] ~]# chkconfig --list|grep mysqld
设置为开机运转
[[email protected] ~]# chkconfig mysqld on

开发银行mysql数据库,会输出一密密麻麻有效的音信,告诉您接下去如何发轫化mysql

[[email protected] mysql]# service mysqld start

安份守己上述乌克兰(УКРАЇНА)语,大家来初阶化管理员root的密码

[[email protected] ~]# /usr/local/mysql/bin/mysqladmin -u root password 'yourpassword'

此处yourpassword设置为 manager

 

 

刚烈,mysql有三种帐号类型,即localhost和%,前面一个限本机连接mysql,后面一个可用于其余机器远程连接mysql

最后,管理帐号登入难题,让root帐号密码可以当地和长途连接使用

[[email protected] ~]# /usr/local/mysql/bin/mysql -u root -p #敲入该命令后,荧屏会提醒输入密码,输入上一步设置的yourpassword

删去root密码为空的笔录

mysql> use mysql;

mysql> delete from user where password='';

mysql> flush privileges;

配置mysql允许root远程登入 #登录

mysql> grant all privileges on *.* to [email protected]'%' identified by "manager";

mysql> flush privileges;

mysql> select User,Password,Host from user;

 

上述命令假若试行成功

 

mysql> quit

 

 

迄今,mysql安装已经全副甘休.

 

mysql从5.5本子初叶,不再使用./configure编写翻译,而是采用cmake编写翻译器 mysql-5.6.16.tar.gz源码包下载地址: ...

#chkconfig --level 2345 mysqld on

可参考:【MySQL解惑笔记】Centos7下卸载彻底MySQL数据库

卸载maridb:
[root@host-131 ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.52-1.el7.x86_64
[root@host-131 ~]# yum -y remove mari*
[root@host-131 ~]# rm -rf /var/lib/mysql/*
[root@host-131 ~]# rpm -qa | grep mariadb
[root@host-131 ~]# 

4、修改仓库

[root@host-131 src]# yum rpolist all |grep mysql      //查看所有仓库,并能够看到开启和禁用的仓库
[root@host-131 src]# yum repolist enabled | grep "mysql.*-community.*"  //查看所有开启的仓库,发现现在开启的是MySQL 8.0的,我们需要开启MySQL5.7的仓库
mysql-connectors-community/x86_64 MySQL Connectors Community                  51
mysql-tools-community/x86_64      MySQL Tools Community                       63
mysql80-community/x86_64          MySQL 8.0 Community Server                  17     //k

 开启和关闭不同仓库,官方提供了三种修改方法:

方法一:
shell> sudo yum-config-manager --disable mysql80-community
shell> sudo yum-config-manager --enable mysql57-community

方法二:
shell> sudo dnf config-manager --disable mysql57-community
shell> sudo dnf config-manager --enable mysql56-community

方法三:
我们直接修改Yum源文件:
[root@host-131 ~]# cd /etc/yum.repos.d 
[root@host-131 yum.repos.d]# vim mysql-community.repo 
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1                        //修改为1表示开启
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/
enabled=0                        //修改为0表示关闭
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[root@host-131 yum.repos.d]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64 MySQL Connectors Community                  51
mysql-tools-community/x86_64      MySQL Tools Community                       63
mysql57-community/x86_64          MySQL 5.7 Community Server                 267    //可以看到5.7存储仓库已经开启

注意:我们应该在任何时候只启用一个发布系列的子存储库。当启用多个发布系列的子存储库时,Yum将使用最新的系列。
通过运行以下命令并检查其输出(对于Fedora,用dnf替换yum),验证是否启用了正确的子库并禁用了它:
[root@host-131 yum.repos.d]# yum repolist enabled | grep mysql
mysql-connectors-community/x86_64 MySQL Connectors Community                  51
mysql-tools-community/x86_64      MySQL Tools Community                       63
mysql57-community/x86_64          MySQL 5.7 Community Server                 267

 5、安装MySQL数据库

[root@host-131 yum.repos.d]# yum -y install mysql-community-server
[root@host-131 ~]# systemctl start mysqld   
[root@host-131 ~]# systemctl enable mysqld   设置开机自启动
[root@host-131 ~]# systemctl status mysqld  查看mysql启动状态

[root@host-131 ~]# ls /var/lib/mysql    (安装后可以看到初始化的数据库)
auto.cnf    client-cert.pem  ibdata1      ibtmp1      mysql.sock.lock     public_key.pem   sys
ca-key.pem  client-key.pem   ib_logfile0  mysql   performance_schema  server-cert.pem
ca.pem      ib_buffer_pool   ib_logfile1  mysql.sock  private_key.pem     server-key.pem

6、第三次登入数据库,并安装初阶化密码

[root@host-131 ~]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
发现是禁止访问的

在服务器的初始启动时,由于服务器的数据目录为空:服务器初始化。SSL证书和密钥文件是在数据目录中生成的。
安装并启用了validate_password。
一个超级用户帐户'root'@'localhost被创建。
超级用户的密码被设置并存储在错误日志文件中。要显示它,请使用以下命令:

MySQL5.5之前版本安装后可以直接登录
MySQL5.5自动生成的密码是空的
MySQL5.6是将密码放在root下的
MySQL5.7是将密码放在:
[root@host-131 ~]# grep 'temporary password' /var/log/mysqld.log
2018-05-30T06:34:56.956716Z 1 [Note] A temporary password is generated for root@localhost: xt8S3rWXOL/C
[root@host-131 ~]# 
[root@host-131 ~]# mysql -uroot -p"xt8S3rWXOL/C"
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 4
Server version: 5.7.22
修改密码:
方法一:
[root@host-131 ~]# mysqladmin -uroot -p"xt8S3rWXOL/C" password "Yanglt123."   //密码要满足复杂性要求
[root@host-131 ~]# mysql -uroot -p"Yanglt123."

方法二:

[root@host-131 ~]# grep 'temporary password' /var/log/mysqld.log
2018-05-30T06:34:56.956716Z 1 [Note] A temporary password is generated for root@localhost: xt8S3rWXOL/C
[root@host-131 ~]# 
[root@host-131 ~]# mysql -uroot -p"xt8S3rWXOL/C"

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

 到此数据库安装成功:

源码安装可参看文章:*【Linux运转】LNMP景况陈设*

  

 

一、MySQL数据库的官方网址:

  • https://www.oracle.com/
  • http://dev.mysql.com/doc/refman/5.7/en/linux-installation.html
  •        //不一样版本的设置文书档案和下载能够在这里找

./bootstrap

三、Yum的不二等秘书籍安装MySQL:

  • yum安装mysql 5.7 的法定安装方式地址

1、下载安装包

  • *此地址为Mysql 8.0 的安装源当中带有MySQL 5.7的源,能够在前边步骤修改开放的酒店: *

2、 设置安装起来意况

暂时先把防火墙关闭保证实验顺利:
[root@host-131 ~]# systemctl stop firewalld 
[root@host-131 ~]# systemctl disable firewalld.service
临时关闭SELlinux:
[root@host-131 ~]# setenforce 0
永久关闭SELinux:
[root@host-131 ~]# sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
查看SELinux状态:
[root@host-131 ~]# getenforce
Disabled

 3、卸载系统自带的数据库(Centos7自带的是maridb)

tar zxvf cmake-2.8.7.tar.gz

#/usr/sbin/groupadd mysql

Enter password:

linux用 wget 下载供给的软件,保存到目录 /usr/local/src 下

wget

 

四. 配置运转MySQL 5.6.10

[[email protected] ~]# /usr/local/mysql/bin/mysqladmin -uroot password root**

 

开发银行 mysql 服务的时候报如下错误:

 

ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18(暂不推行)

yum -y install ncurses-devel

yum –y install autoconf

  1. 若有须要请先修改 mysql 的配置文件的参数 my.cnf

#chkconfig --add mysqld

#cp my-default.cnf /etc/my.cnf

[mysqld] 下添加

yum –y install gcc

[[email protected] mysql-5.6.10]# mkdir -p /usr/local/mysql/data

cd ../

yum –y install bison

#/usr/sbin/useradd –r -g mysql mysql

 

  1. 启动 mysql服务

[[email protected] ~]# /usr/local/mysql/bin/mysql -uroot -p

[[email protected] mysql-5.6.10]# mkdir -p  /var/mysql/log/

二. 编写翻译安装 cmake

pid-file = /usr/local/mysql/data/mysqld.pid

#cd /usr/loca/mysql/support-files/

 

-DWITH_EXTRA_CHARSETS=utf8,gbk

-DDEFAULT_COLLATION=utf8_general_ci

-DWITH_FEDERATED_STORAGE_ENGINE=1

[[email protected] mysql-5.6.10]# chown -R mysql:mysql /var/mysql/log/         

Centos6.0 陆拾陆个人MySQL 5.6.11 CMake安装配置

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql

  1. 安装root帐号密码

yum -y install  gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make vim bison

Your MySQL connection id is 2

三. 编写翻译安装 MySQL 5.6.11

创建mysql用户及mysql组

添加mysqld服务

wget ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.6/mysql-5.6.11.tar.gz

 

chown -R mysql:mysql /usr/local/mysql


[[email protected] mysql-5.6.10]#

yum –y install libtool-ltdl-devel*

socket = /usr/local/mysql/data/mysql.sock

yum –y install libmcrypt*

yum –y install automake

#cd mysql-5.6.11/

-DWITH_PERFSCHEMA_STORAGE_ENGINE=1

六十四个人MySQL 5.6.11 CMake安装配备 一、下载所需软件 linux用 wget 下载必要的软件,保存到目录 /usr/local/src 下 wget ftp://mirror.switch.ch/mirror/m...

 

cd cmake-2.8.7

datadir = /usr/local/mysql/data

/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

 

-DMYSQL_TCP_PORT=3306

basedir=/usr/local/mysql

Welcome to the MySQL monitor.  Commands end with ; or g.

以下安装中涉及的几点须要超前证实的主题素材:

缓和格局:

2.my.cnf mysql 先导化安装

chmod +w /usr/local/mysql

make install

  1. 享有下载的公文将保留在 /usr/local/src/ 目录下

  2. mysql 将以mysql客户运营,何况将投入 service 开机自动运营

  3. mysql 将被安装在 /usr/local/mysql/ 目录下

  4. mysql 暗中同意安装使用 utf8 字符集

  5. mysql 的数目和日志文件保留在 /usr/local/mysql/ 对应目录下

  6. mysql 的安插文件保留于/etc//my.cnf


-DSYSCONFDIR=/usr/local/mysql

一、下载所需软件

vi /etc/init.d/mysqld (编辑此文件,查找并修改以下变量内容:)

Server version: 5.6.11 Source distribution

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=utf8,gbk -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/usr/local/mysql -DMYSQL_TCP_PORT=3306

datadir=/usr/local/mysql/data

-DDEFAULT_CHARSET=utf8

 

 

 

-DWITH_PARTITION_STORAGE_ENGINE=1

mysql 最新的本子都亟待cmake编写翻译安装,揣摸现在的版本也会使用这种方法,所以专门记录一下设置步骤及经过,以供参谋。

-DWITH_ARCHIVE_STORAGE_ENGINE=1

  1. 将 mysql 参加开机运维

 

#tar xvf mysql-5.6.11.tar.gz

yum –y install gcc-c++

#cd /install

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

yum –y install vim

service mysqld start

yum –y install gcc-g77

 

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

vi /etc/my.cnf    

make

affiliates. Other names may be trademarks of their respective

 

[[email protected] mysql-5.6.10]# chown -R mysql:mysql /usr/local/mysql/data

 

yum –y install libxml*

yum –y install zlib*

mysql_install_db --user=mysql  重新最初化数据库就可以

-DMYSQL_DATADIR=/usr/local/mysql/data

 

chmod +x /etc/init.d/mysqld


gmake install

lower_case_table_names=1

owners.

gmake

yum -y install make

[[email protected] data]# chown –RAV4 mysql:mysql /usr/local/mysql/data/mysql-bin.index(暂不实施)


basedir = /usr/local/mysql   

cd /usr/local/src

在乎:此设置是暗中同意centos下一度设置了新型工具包,比如GNU make, GCC, Perl, ncurses(其它版本linux安装libncurses5-dev),要是在编译安装进度中开采有缺点和失误的工具包,先yum install 单独下载安装再持续就能够。

Oracle is a registered trademark of Oracle Corporation and/or its

interactive_timeout=28800000

yum –y install fiex*

#cp mysql.server /etc/init.d/mysqld

-DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock

wait_timeout=28800000

本文由数据库发布,转载请注明来源:Centos6源码安排MySQL5,MySQL数据库基于Centos7