CentOS6.5内 MySQL5.7.19编译安装

2019-10-20 作者:www.243.net   |   浏览(94)
mysql -uroot -p

set password=password('newpassword');

6.编写翻译安装

ps -ef | grep mysql
yum install -y gcc gcc-c++ autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake  libaio libaio-devel autoconf bzr bison libtool
tar -zxf mysql-5.7.19.tar.gz

CentOS6.5内 MySQL5.7.19编译安装。CentOS6.5内 MySQL5.7.19编译安装。2.装置信任包:

sudo grep 'temporary password' /binlog/mysqlog/err.log
[mysqld]
datadir=/data/mysql
socket=/tmp/mysql.sock
basedir = /usr/local/mysql

# basic setting
user=mysql
port=3306
server-id=11

#log
slow_query_log_file = /binlog/mysqlog/slow.log
slow_query_log = 1

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/binlog/mysqlog/err.log

14.最首先登场陆,修改密码

9.添加MySQL服务

/etc/init.d/mysql start

CentOS6.5内 MySQL5.7.19编译安装。CentOS6.5内 MySQL5.7.19编译安装。作为博主那样的Linux新手,CentOS下最赏识的便是yum安装。但有的时候候因为极度情状(比如被墙等),某些软件也许无法直接通过yum来设置,这时候大家可以利用编写翻译安装可能间接二进制文件安装。

8.初始化MySQL

11.查看mysql进程

tar -zxf boost_1_59_0.tar.gz
mv /tmp/boost_1_59_0 /usr/local/boost
组件 官方网站 下载地址 备注
mysql http://dev.mysql.com/ https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19.tar.gz mysql源码
Boost http://www.boost.org/ http://120.52.73.44/nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz 编译时使用,必须是Boost 1.59.0

多少个渠道的地点记得修改:

cd /tmp/mysql-5.7.19/support-files
cp mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
cd /usr/local/mysql/bin
./mysqld --initialize --user=mysql --datadir=/data/mysql --basedir=/usr/local/mysql --socket=/tmp/mysql.sock --log-error=/binlog/mysqlog/err.log --log-bin=/binlog/mysqlog/mysql-bin

1.率先下载相关财富:

打完收工。

12.建立Mysql映射

13.查找mysql初步密码

7.编辑my.cnf文件

3.解压并设置Boost(拷贝至/usr/local/boost目录)

mkdir -p /usr/local/mysql /binlog/mysqlog /data/mysql
groupadd -r mysql
useradd -g mysql -r -d /data/mysql mysql
chown -R mysql.mysql /usr/local/mysql /binlog/mysqlog /data/mysql

5.备选MySQL数据,日志等路子,并创办mysql顾客,付与mysql顾客相关文书夹权限

vi /etc/my.cnf
ln -s /usr/local/mysql/bin/mysql /usr/bin

本博文用于记录编写翻译安装MySQL的过程:

cd mysql-5.7.19
cmake 
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql 
-DDEFAULT_CHARSET=utf8 
-DMYSQL_DATADIR=/data/mysql 
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock 
-DDEFAULT_COLLATION=utf8_general_ci 
-DWITH_INNOBASE_STORAGE_ENGINE=1 
-DMYSQL_TCP_PORT=3306 
-DWITH_DEBUG=0 
-DWITH_ARCHIVE_STORAGE_ENGINE=1 
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 
-DWITH_PARTITION_STORAGE_ENGINE=1 
-DSYSCONFDIR=/etc/my.cnf 
-DENABLED_LOCAL_INFILE=1 
-DWITH_EXTRA_CHARSETS=all 
-DWITH_BOOST=/usr/local/boost 

make && make install

4.解压MySQL源玛

10.启动MySQL

本文由金沙澳门官网网址发布于www.243.net,转载请注明出处:CentOS6.5内 MySQL5.7.19编译安装

关键词: