mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
二、基于官方源代码RMP构建自定义MySQLRPM(一般用于企业内部开发,生产中还是MySQL包的方式安装)
创建一个普通用户,用于构建自定义的RPM包
# useradd tubeliu
# cp mysql-community-5.7.22-1.el7.src.rpm /home/tubeliu/
# chown tubeliu.tubeliu /home/tubeliu/ -R
# yum list | grep rpm-build
# yum -y install rpm-build
# su - tubeliu
ls
mysql-community-5.7.22-1.el7.src.rpm
$ rpmbuild ~
错误:文件 /home/tubeliu 不是常规文件。
$ ls
mysql-community-5.7.22-1.el7.src.rpm rpmbuild
$ cd rpmbuild/
$ ls
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
$ cd ..
$ ls
mysql-community-5.7.22-1.el7.src.rpm rpmbuild
$ rpm -ivh mysql-community-5.7.22-1.el7.src.rpm
正在升级/安装...
1:mysql-community-5.7.22-1.el7 ################################# [100%]
$ cd rpmbuild/
$ ls
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
$ ls -R
.:
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
./BUILD:
./BUILDROOT:
./RPMS:
./SOURCES:
boost_1_59_0.tar.bz2 filter-requires.sh mysql-5.7.22.tar.gz
filter-provides.sh mysql-5.6.37.tar.gz
./SPECS:
mysql.spec
./SRPMS:
$ cd SPECS/
$ vi mysql.spec
$ rpmbuild -bb mysql.spec