Linux7-mariadb数据库的源码包升级
2017-02-14 11:44
513 查看
Mariadb源码包升级安装
数据库的安装方式:
1、RPM包
2、源码包
3、通用二进制格式的程序包
详细解析源码包升级:这里以mariadb-5.5.46-linux-x86_64.tar.gz为例
[root@centos7 ~]# rpm -q mariadb-server
mariadb-server-5.5.44-2.el7.centos.x86_64
[root@centos7 ~]# tar xf mariadb-5.5.46-linux-x86_64.tar.gz -C /usr/local/ ——/usr/local:源码包安装路径
[root@centos7 ~]# cd /usr/local/[root@centos7 local]# ln -sv mariadb-5.5.46-linux-x86_64 mysql ‘mysql’ -> ‘mariadb-5.5.46-linux-x86_64’[root@centos7 local]# ll mysql/
total 204drwxr-xr-x. 2 root root4096 Oct 26 20:21 bin-rw-r--r--. 1 500 500 17987 Oct 10 2015 COPYING-rw-r--r--. 1 500 500 26545 Oct 10 2015 COPYING.LESSERdrwxr-xr-x. 3 root root17 Oct 26 20:21 data-rw-r--r--. 1 500 5008245 Oct 10 2015 EXCEPTIONS-CLIENTdrwxr-xr-x. 3 root root18 Oct 26 20:21 include-rw-r--r--. 1 500 5008694 Oct 10 2015 INSTALL-BINARYdrwxr-xr-x. 3 root root4096 Oct 26 20:21 libdrwxr-xr-x. 4 root root28 Oct 26 20:21 mandrwxr-xr-x. 11 root root4096 Oct 26 20:21 mysql-test-rw-r--r--. 1 500 500 108813 Oct 10 2015 READMEdrwxr-xr-x. 2 root root29 Oct 26 20:21 scriptsdrwxr-xr-x. 27 root root4096 Oct 26 20:21 sharedrwxr-xr-x. 4 root root4096 Oct 26 20:21 sql-benchdrwxr-xr-x. 3 root root4096 Oct 26 20:21 support-files[root@centos7 local]# id mysqluid=27(mysql) gid=27(mysql) groups=27(mysql)[root@centos7 local]# cd mysql/[root@centos7 mysql]# chown -R root:mysql ./* ——链接文件赋权规则[root@centos7 mysql]# lltotal 204
drwxr-xr-x. 2 root mysql 4096 Oct 26 20:21 bin -rw-r--r--. 1 root mysql 17987 Oct 10 2015 COPYING-rw-r--r--. 1 root mysql 26545 Oct 10 2015 COPYING.LESSERdrwxr-xr-x. 3 root mysql7 Oct 26 20:21 data-rw-r--r--. 1 root mysql8245 Oct 10 2015 EXCEPTIONS-CLIENTdrwxr-xr-x.3 root mysql18 Oct 26 20:21 include-rw-r--r--. 1 root mysql8694 Oct 10 2015 INSTALL-BINARYdrwxr-xr-x. 3 root mysql4096 Oct 26 20:21 libdrwxr-xr-x. 4 root mysql28 Oct 26 20:21 mandrwxr-xr-x. 11 root mysql4096 Oct 26 20:21 mysql-test-rw-r--r--. 1 root mysql 108813 Oct 10 2015 READMEdrwxr-xr-x. 2 root mysql29 Oct 26 20:21 scriptsdrwxr-xr-x. 27 root mysql4096 Oct 26 20:21 sharedrwxr-xr-x. 4 root mysql4096 Oct 26 20:21 sql-benchdrwxr-xr-x. 3 root mysql4096 Oct 26 20:21 support-files[root@centos7 mysql]# mkdir /mydata/data -p[root@centos7 mysql]# chown -R mysql.mysql /mydata/data/[root@centos7 mysql]# ls support-files/
binary-configure my-innodb-heavy-4G.cnf my-small.cnf mysql.server
Magic my-large.cnf mysqld_multi.server SELinux
my-huge.cnf my-medium.cnf mysql-log-rotate
[root@centos7 mysql]# mkdir /etc/mysqld
[root@centos7 mysql]# cp support-files/my-large.cnf /etc/mysqld/my.cnf [root@centos7 mysql]# vim /etc/mysql/my.cnf[mysqld]port = 3306socket = /tmp/mysql.sockskip-external-lockingkey_buffer_size = 256Mmax_allowed_packet = 1Mtable_open_cache = 256sort_buffer_size = 1Mread_buffer_size = 1Mread_rnd_buffer_size = 4Mmyisam_sort_buffer_size = 64Mthread_cache_size = 8query_cache_size= 16M# Try number of CPU's*2 for thread_concurrencythread_concurrency = 8datadir = /mydata/dataskip_name_resolve = ONinnodb_file_per_table = ON[root@centos7 mysql]# cp support-files/mysql.server /etc/init.d/mysqld [root@centos7 mysql]# ll /etc/init.d/mysqld -rwxr-xr-x. 1 root root 12196 Oct 26 20:37 /etc/init.d/mysqld [root@centos7 mysql]# chkconfig --add mysqld[root@centos7 mysql]# service mysqld start
Starting MySQL... ERROR!
[root@centos7 mysql]# ss -tnl
StateRecv-Q Send-Q Local Address:PortPeer Address:Port
LISTEN05192.168.122.1:53*:*LISTEN0128*:22*:*LISTEN0128127.0.0.1:631*:*LISTEN0100127.0.0.1:25*:*LISTEN0128:::22:::*LISTEN0128::1:631:::*LISTEN0100::1:25:::*
[root@centos7 mysql]# pwd
/usr/local/mysql
[root@centos7 mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data
[root@centos7 mysql]# ls /mydata/data/
aria_log.00000001 mysqlmysql-bin.000002 performance_schema
aria_log_control mysql-bin.000001 mysql-bin.index test
[root@centos7 mysql]# service mysqld start Starting MySQL.. SUCCESS!
数据库的安装方式:
1、RPM包
2、源码包
3、通用二进制格式的程序包
详细解析源码包升级:这里以mariadb-5.5.46-linux-x86_64.tar.gz为例
[root@centos7 ~]# rpm -q mariadb-server
mariadb-server-5.5.44-2.el7.centos.x86_64
[root@centos7 ~]# tar xf mariadb-5.5.46-linux-x86_64.tar.gz -C /usr/local/ ——/usr/local:源码包安装路径
[root@centos7 ~]# cd /usr/local/[root@centos7 local]# ln -sv mariadb-5.5.46-linux-x86_64 mysql ‘mysql’ -> ‘mariadb-5.5.46-linux-x86_64’[root@centos7 local]# ll mysql/
total 204drwxr-xr-x. 2 root root4096 Oct 26 20:21 bin-rw-r--r--. 1 500 500 17987 Oct 10 2015 COPYING-rw-r--r--. 1 500 500 26545 Oct 10 2015 COPYING.LESSERdrwxr-xr-x. 3 root root17 Oct 26 20:21 data-rw-r--r--. 1 500 5008245 Oct 10 2015 EXCEPTIONS-CLIENTdrwxr-xr-x. 3 root root18 Oct 26 20:21 include-rw-r--r--. 1 500 5008694 Oct 10 2015 INSTALL-BINARYdrwxr-xr-x. 3 root root4096 Oct 26 20:21 libdrwxr-xr-x. 4 root root28 Oct 26 20:21 mandrwxr-xr-x. 11 root root4096 Oct 26 20:21 mysql-test-rw-r--r--. 1 500 500 108813 Oct 10 2015 READMEdrwxr-xr-x. 2 root root29 Oct 26 20:21 scriptsdrwxr-xr-x. 27 root root4096 Oct 26 20:21 sharedrwxr-xr-x. 4 root root4096 Oct 26 20:21 sql-benchdrwxr-xr-x. 3 root root4096 Oct 26 20:21 support-files[root@centos7 local]# id mysqluid=27(mysql) gid=27(mysql) groups=27(mysql)[root@centos7 local]# cd mysql/[root@centos7 mysql]# chown -R root:mysql ./* ——链接文件赋权规则[root@centos7 mysql]# lltotal 204
drwxr-xr-x. 2 root mysql 4096 Oct 26 20:21 bin -rw-r--r--. 1 root mysql 17987 Oct 10 2015 COPYING-rw-r--r--. 1 root mysql 26545 Oct 10 2015 COPYING.LESSERdrwxr-xr-x. 3 root mysql7 Oct 26 20:21 data-rw-r--r--. 1 root mysql8245 Oct 10 2015 EXCEPTIONS-CLIENTdrwxr-xr-x.3 root mysql18 Oct 26 20:21 include-rw-r--r--. 1 root mysql8694 Oct 10 2015 INSTALL-BINARYdrwxr-xr-x. 3 root mysql4096 Oct 26 20:21 libdrwxr-xr-x. 4 root mysql28 Oct 26 20:21 mandrwxr-xr-x. 11 root mysql4096 Oct 26 20:21 mysql-test-rw-r--r--. 1 root mysql 108813 Oct 10 2015 READMEdrwxr-xr-x. 2 root mysql29 Oct 26 20:21 scriptsdrwxr-xr-x. 27 root mysql4096 Oct 26 20:21 sharedrwxr-xr-x. 4 root mysql4096 Oct 26 20:21 sql-benchdrwxr-xr-x. 3 root mysql4096 Oct 26 20:21 support-files[root@centos7 mysql]# mkdir /mydata/data -p[root@centos7 mysql]# chown -R mysql.mysql /mydata/data/[root@centos7 mysql]# ls support-files/
binary-configure my-innodb-heavy-4G.cnf my-small.cnf mysql.server
Magic my-large.cnf mysqld_multi.server SELinux
my-huge.cnf my-medium.cnf mysql-log-rotate
[root@centos7 mysql]# mkdir /etc/mysqld
[root@centos7 mysql]# cp support-files/my-large.cnf /etc/mysqld/my.cnf [root@centos7 mysql]# vim /etc/mysql/my.cnf[mysqld]port = 3306socket = /tmp/mysql.sockskip-external-lockingkey_buffer_size = 256Mmax_allowed_packet = 1Mtable_open_cache = 256sort_buffer_size = 1Mread_buffer_size = 1Mread_rnd_buffer_size = 4Mmyisam_sort_buffer_size = 64Mthread_cache_size = 8query_cache_size= 16M# Try number of CPU's*2 for thread_concurrencythread_concurrency = 8datadir = /mydata/dataskip_name_resolve = ONinnodb_file_per_table = ON[root@centos7 mysql]# cp support-files/mysql.server /etc/init.d/mysqld [root@centos7 mysql]# ll /etc/init.d/mysqld -rwxr-xr-x. 1 root root 12196 Oct 26 20:37 /etc/init.d/mysqld [root@centos7 mysql]# chkconfig --add mysqld[root@centos7 mysql]# service mysqld start
Starting MySQL... ERROR!
[root@centos7 mysql]# ss -tnl
StateRecv-Q Send-Q Local Address:PortPeer Address:Port
LISTEN05192.168.122.1:53*:*LISTEN0128*:22*:*LISTEN0128127.0.0.1:631*:*LISTEN0100127.0.0.1:25*:*LISTEN0128:::22:::*LISTEN0128::1:631:::*LISTEN0100::1:25:::*
[root@centos7 mysql]# pwd
/usr/local/mysql
[root@centos7 mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data
[root@centos7 mysql]# ls /mydata/data/
aria_log.00000001 mysqlmysql-bin.000002 performance_schema
aria_log_control mysql-bin.000001 mysql-bin.index test
[root@centos7 mysql]# service mysqld start Starting MySQL.. SUCCESS!
相关文章推荐
- Redhat Enterprise Linux 6 (CentOS 6) 用源码包方式安装MariaDB数据库
- 部署mariadb数据库到linux(源码编译安装)
- linux下源码编译sqlite3数据库
- Linux6.3_64安装Oracle10.2.0.1数据库并升级至10.2.0.4版本
- MySQL/MariaDB/Percona数据库升级脚本
- Linux下将数据库从MySQL迁移到MariaDB的基础操作教程
- Linux下将数据库从MySQL迁移到MariaDB的基础操作教程
- Linux中mysql+apache+php的源码包的安装,数据库的创建
- Linux与云计算——第二阶段Linux服务器架设 第一十二章:数据库搭建—MariaDB
- 数据库学习之--Linux下Mysql源码包安装
- linux下PostgreSQL数据库的源码安装
- linux系统下源码安装mysql5.6数据库
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- linux源码升级内核
- Linux下编译安装配置MariaDB数据库的方法
- Linux 源码升级 Openssh
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- OpenERP 源码变更后数据库升级
- MariaDB数据库在Linux下的编译安装配置