高可用架构篇 MySQL源码编译安装(CentOS-6.6+MySQL-5.6)

简介:

部署环境

操作系统:CentOS-6.6-x86_64-bin-DVD1.iso

MySQL版本:mysql-5.6.26.tar.gz                                                                    

操作用户:root

系统IP192.168.1.205

主机名:edu-mysql-01

配置:4核、4G内存      

                                                                                             

 一、服务器配置:


1、配置网络

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

NM_CONTROLLED=no

ONBOOT=yes

TYPE=Ethernet

HWADDR=00:50:56:a1:12:53

IPADDR=192.168.1.205

NETMASK=255.255.255.0

GATEWAY=192.168.1.1

DNS1=223.5.5.5

DNS2=223.6.6.6

 

2、设置主机名

vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=edu-mysql-01

 

3、设置IP与主机名的映射

vi /etc/hosts

127.0.0.1 edu-mysql-01

192.168.1.205 edu-mysql-01

 

4、两台数据库服务器的的selinux都要disable

(永久关闭selinux,请修改/etc/selinux/config,将SELINUX改为disabled

vi /etc/selinux/config

SELINUX=disabled

 

5、重启操作系统

reboot

 

二、源码安装MySQL5.6.26:


1、使用下面的命令检查是否安装有MySQL Server:

rpm -qa | grep mysql

mysql-libs-5.1.73-3.el6_5.x86_64

如果是CentOS7以上,请使用以下命令查看:

rpm -qa | grep mariadb

mariadb-libs-5.5.41-2.el7_0.x86_64

(因为没有MySQL服务,因此没必要卸载。mysql-libsMySQL的必要包

(如果有的话可通过下面的命令来卸载掉,rpm -e mysql //普通删除模式

 

2改防火墙设置,打开3306端口:

# vi /etc/sysconfig/iptables

增加如下行:

## MySQL

-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

 

重启防火墙:

service iptables restart

 

3新增mysql用户组:

groupadd mysql

 

4新增mysql用户,并添加到mysql用户组:

# useradd -r -g mysql mysql

 

5新建MySQL执行文件目录(后面会把编译好的mysql程序安装到这个目录):

mkdir -p /usr/local/mysql

(-p 参数的作用是:如果最终目录的父目录不存在也会一并创建)

 

6新建MySQL数据库数据文件目录:

mkdir -p /home/mysql/data

mkdir -p /home/mysql/logs

mkdir -p /home/mysql/temp

注意:上面的logstemp目录是为了以后将MySQL的数据文件与执行程序文件分离,如果你打算设置到不同的路径,注意修改对应的执行命令和数据库初始化脚本。正式生产环境,建议数据目录和日志目录都使用单独的分区来挂载,不同分区属于不同的磁盘或磁盘组。

 

7增加PATH环境变量搜索路径:

# vi /etc/profile

##在profile文件末尾增加两行

# mysql env param

PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH

export PATH

 

使PATH搜索路径立即生效:

source /etc/profile

 

8、安装编译MySQL需要的依赖包:

mysql从5.5版本开始,不再使用./configure编译,而是使用cmake编译器,具体的cmake编译参数可以参考mysql官网文档

http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html,安装基本依赖包,先用yum安装cmake、automake 、autoconf ,另MySQL 5.5.x需要最少安装的包有:bison,gcc、gcc-c++、ncurses-devel):

 

# yum install make cmake gcc gcc-c++ bison bison-devel ncurses ncurses-devel autoconf automake

 

9、进入/usr/local/src目录,上传mysql-5.6.26.tar.gz源代码到/usr/local/src目录:

cd /usr/local/src

 

10开始编译安装mysql-5.6.26:

解压缩源码包:

# tar -zxvf mysql-5.6.26.tar.gz

进入解压缩源码目录:

cd mysql-5.6.26

使用cmake源码安装mysql(如果你打算安装到不同的路径,注意修改下面语句中/usr/local/mysql和/home/mysql/data路径!)

 

[root@edu-mysql-01 mysql-5.6.26]# cmake \

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \

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

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DWITH_MYISAM_STORAGE_ENGINE=1 \

-DWITH_INNOBASE_STORAGE_ENGINE=1 \

-DWITH_ARCHIVE_STORAGE_ENGINE=1 \

-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \

-DWITH_MEMORY_STORAGE_ENGINE=1 \

-DWITH_READLINE=1 \

-DENABLED_LOCAL_INFILE=1 \

-DMYSQL_DATADIR=/home/mysql/data \

-DMYSQL_USER=mysql \

-DMYSQL_TCP_PORT=3306 \

-DENABLE_DOWNLOADS=1

 

上面的这些复制完,回车,然后就开始cmake的过程,一般时间不会很长。

配置解释:

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql 设置安装目录

-DMYSQL_DATADIR=/home/mysql/data 设置数据库存放目录

-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock 设置UNIX socket 目录

-DMYSQL_USER=mysql 设置运行用户

-DDEFAULT_CHARSET=utf8 设置默认字符集,默认latin1

-DEFAULT_COLLATION=utf8_general_ci 设置默认校对规则,默认latin1_general_ci

-DWITH_INNOBASE_STORAGE_ENGINE=1 添加InnoDB引擎支持

-DENABLE_DOWNLOADS=1 自动下载可选文件,比如自动下载谷歌的测试包

-DMYSQL_TCP_PORT=3306 设置服务器监听端口,默认3306

-DSYSCONFDIR=/etc 设置my.cnf所在目录,默认为安装目录)

 

执行过程中会出现:

CMake Error: Problem with tar_extract_all(): Invalid argument

CMake Error: Problem extracting tar: /usr/local/src/mysql-5.6.26/source_downloads/gmock-1.6.0.zip

解决方法:

cd mysql目录下面会发现有一个source_downloads目录,需要解压unzip gmock-1.6.0.zip,然后再重新执行上述配置过程。当然你也可以去掉-DENABLE_DOWNLOADS=1这个选项,不编译谷歌的测试包也没有什么问题,但是之前的某些版本会出现无法编译的问题.

 

11cmake结束后开始编译源码,这一步时间会较长,请耐心等待:

# make

 

12安装编译好的程序:

# make install

注意:如果需要重装mysql,在/usr/local/src/mysql-5.6.26在执行下make install就可以了,不需要再cmakemake

 

13清除安装临时文件

make clean

 

14修改mysql目录拥有者为mysql用户:

chown -Rf mysql:mysql /usr/local/mysql

chown -Rf mysql:mysql /home/mysql

 

15进入mysql执行程序的安装路径:

cd /usr/local/mysql

 

16执行初始化配置脚本,创建系统自带的数据库和表(注意:路径/home/mysql/data需要换成你自定定义的数据库存放路径):

scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/home/mysql/data

Installing MySQL system tables...2015-12-13 15:21:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2015-12-13 15:21:53 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.26) starting as process 17362 ...

2015-12-13 15:21:53 17362 [Note] InnoDB: Using atomics to ref count buffer pool pages

2015-12-13 15:21:53 17362 [Note] InnoDB: The InnoDB memory heap is disabled

2015-12-13 15:21:53 17362 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2015-12-13 15:21:53 17362 [Note] InnoDB: Memory barrier is not used

2015-12-13 15:21:53 17362 [Note] InnoDB: Compressed tables use zlib 1.2.3

2015-12-13 15:21:53 17362 [Note] InnoDB: Using CPU crc32 instructions

2015-12-13 15:21:53 17362 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2015-12-13 15:21:53 17362 [Note] InnoDB: Completed initialization of buffer pool

2015-12-13 15:21:53 17362 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2015-12-13 15:21:53 17362 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2015-12-13 15:21:53 17362 [Note] InnoDB: Database physically writes the file full: wait...

2015-12-13 15:21:53 17362 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2015-12-13 15:21:53 17362 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2015-12-13 15:21:53 17362 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2015-12-13 15:21:53 17362 [Warning] InnoDB: New log files created, LSN=45781

2015-12-13 15:21:53 17362 [Note] InnoDB: Doublewrite buffer not found: creating new

2015-12-13 15:21:53 17362 [Note] InnoDB: Doublewrite buffer created

2015-12-13 15:21:53 17362 [Note] InnoDB: 128 rollback segment(s) are active.

2015-12-13 15:21:53 17362 [Warning] InnoDB: Creating foreign key constraint system tables.

2015-12-13 15:21:53 17362 [Note] InnoDB: Foreign key constraint system tables created

2015-12-13 15:21:53 17362 [Note] InnoDB: Creating tablespace and datafile system tables.

2015-12-13 15:21:53 17362 [Note] InnoDB: Tablespace and datafile system tables created.

2015-12-13 15:21:53 17362 [Note] InnoDB: Waiting for purge to start

2015-12-13 15:21:53 17362 [Note] InnoDB: 5.6.26 started; log sequence number 0

2015-12-13 15:21:53 17362 [Note] Binlog end

2015-12-13 15:21:53 17362 [Note] InnoDB: FTS optimize thread exiting.

2015-12-13 15:21:53 17362 [Note] InnoDB: Starting shutdown...

2015-12-13 15:21:54 17362 [Note] InnoDB: Shutdown completed; log sequence number 1625977

OK

 

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

2015-12-13 15:21:54 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.26) starting as process 17384 ...

2015-12-13 15:21:54 17384 [Note] InnoDB: Using atomics to ref count buffer pool pages

2015-12-13 15:21:54 17384 [Note] InnoDB: The InnoDB memory heap is disabled

2015-12-13 15:21:54 17384 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2015-12-13 15:21:54 17384 [Note] InnoDB: Memory barrier is not used

2015-12-13 15:21:54 17384 [Note] InnoDB: Compressed tables use zlib 1.2.3

2015-12-13 15:21:54 17384 [Note] InnoDB: Using CPU crc32 instructions

2015-12-13 15:21:54 17384 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2015-12-13 15:21:54 17384 [Note] InnoDB: Completed initialization of buffer pool

2015-12-13 15:21:54 17384 [Note] InnoDB: Highest supported file format is Barracuda.

2015-12-13 15:21:54 17384 [Note] InnoDB: 128 rollback segment(s) are active.

2015-12-13 15:21:54 17384 [Note] InnoDB: Waiting for purge to start

2015-12-13 15:21:54 17384 [Note] InnoDB: 5.6.26 started; log sequence number 1625977

2015-12-13 15:21:55 17384 [Note] Binlog end

2015-12-13 15:21:55 17384 [Note] InnoDB: FTS optimize thread exiting.

2015-12-13 15:21:55 17384 [Note] InnoDB: Starting shutdown...

2015-12-13 15:21:56 17384 [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 edu-mysql-02 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 at http://bugs.mysql.com/

 

The latest information about MySQL is available on the web at

 

  http://www.mysql.com

 

Support MySQL by buying support/licenses at http://shop.mysql.com

 

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

 

17初始化脚本在/usr/local/mysql/下生成了配置文件my.cnf,需要更改该配置文件的所有者:

ls -lah

                                              face/yyszpFX6sYNrHEWC53isXixanWdfNnSa.png

[root@edu-mysql-01 mysql] # chown -Rf mysql:mysql /usr/local/mysql/my.cnf

 

18、注意:

1Tips:在启动MySQL服务时,会按照一定次序搜索my.cnf,先在/etc目录下找,找不到则会搜索mysql程序目录下是否有my.cnf
2)需要注意CentOS 6版操作系统的最小安装完成后,即使没有安装mysql,在/etc目录下也会存在一个my.cnf文件,建议将此文件更名为其他的名字,否则该文件会干扰源码安装的MySQL的正确配置,造成无法启动。修改/etc/my.cnf操作如下:

可以:mv /etc/my.cnf /etc/my.cnf.bak

也可以:删除掉/etc/my.cnf这个文件:rm /etc/my.cnf

 

如果你需要用于生产环境,不要急着做下面的mysql启动操作。建议把上一步骤中mysql初始化生成的/usr/local/mysql/my.cnf删除,然后把你优化好的mysql配置文件my.cnf放到/etc下。(这是做mysql主从复制和mysql优化的经验!)

 

(我们这里使用/etc/my.cnf

 

19、编辑/etc/my.cnf:

vi /etc/my.cnf

[client]

port = 3306

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

 

[mysqld]

character-set-server = utf8

collation-server = utf8_general_ci

 

skip-external-locking

skip-name-resolve

 

user = mysql

port = 3306

basedir = /usr/local/mysql

datadir = /home/mysql/data

tmpdir = /home/mysql/temp

# server_id = .....

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

log-error = /home/mysql/logs/mysql_error.log

pid-file = /home/mysql/mysql.pid

 

open_files_limit = 10240

 

back_log = 600

max_connections=500

max_connect_errors = 6000

wait_timeout=605800

 

#open_tables = 600

#table_cache = 650

#opened_tables = 630

 

max_allowed_packet = 32M

 

sort_buffer_size = 4M

join_buffer_size = 4M

thread_cache_size = 300

query_cache_type = 1

query_cache_size = 256M

query_cache_limit = 2M

query_cache_min_res_unit = 16k

 

tmp_table_size = 256M

max_heap_table_size = 256M

 

key_buffer_size = 256M

read_buffer_size = 1M

read_rnd_buffer_size = 16M

bulk_insert_buffer_size = 64M

 

lower_case_table_names=1

 

default-storage-engine = INNODB

 

innodb_buffer_pool_size = 2G

innodb_log_buffer_size = 32M

innodb_log_file_size = 128M

innodb_flush_method = O_DIRECT

 

#####################

thread_concurrency = 32

long_query_time= 2

slow-query-log = on

slow-query-log-file = /home/mysql/logs/mysql-slow.log 

 

[mysqldump]

quick

max_allowed_packet = 32M

 

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

 

 

20复制服务启动脚本:

# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql

 

21启动MySQL服务:

service mysql start

Starting MySQL.. SUCCESS!

(初次启动会在/usr/local/mysql目录下生成mysql.sock文件)

 

22设置MySQL开机自动启动服务:

chkconfig mysql on

 

设置MySQL数据库root用户的本地登录密码(初始用户没有密码)

mysqladmin -u root password 'roncoo'

 

23登录并修改MySQL用户root的密码:

mysql -uroot -p

Enter password:

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

Your MySQL connection id is 2

Server version: 5.6.26-log Source distribution

 

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

 

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

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql>

mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| test               |

+--------------------+

4 rows in set (0.00 sec)

 

mysql> use mysql;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

 

修改root用户密码:

mysql> update user set Password = password('roncoo.com') where User='root';

Query OK, 4 rows affected (0.00 sec)

Rows matched: 5  Changed: 4  Warnings: 0

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

 

允许root远程登录,设置远程登录密码:www.roncoo.com

mysql> use mysql;

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'www.roncoo.com' WITH GRANT OPTION;

mysql> flush privileges;

mysql> exit;

 

注意:真实生产环境,应用操作不要使用root用户。

 

重新登录

[root@edu-mysql-01 ~]# mysql -uroot -p

Enter password:

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

Your MySQL connection id is 9

Server version: 5.6.26-log Source distribution

 

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

 

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

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql>

 

24运行安全设置脚本,强烈建议生产服务器使用(可选):

[root@edu-mysql-01 ~]# /usr/local/mysql/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

 

In order to log into MySQL to secure it, we'll need the current

password for the root user.  If you've just installed MySQL, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

 

Enter current password for root (enter for none):  ----->此处输入root密码

OK, successfully used password, moving on...

 

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

 

You already have a root password set, so you can safely answer 'n'.

 

Change the root password? [Y/n] n  -----> 上已为root设置了密码,此处可输n

 ... skipping.

 

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.

 

Remove anonymous users? [Y/n] Y  ------> 删除匿名用户

 ... Success!

 

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

 

Disallow root login remotely? [Y/n] n  -----> 一般不允许root远程登录,可添加普通用户,然后设置允许远程登录

 ... skipping.

 

By default, MySQL comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

 

Remove test database and access to it? [Y/n] Y  -----> 删除test库及相应权限

 - Dropping test database...

 ... Success!

 - Removing privileges on test database...

 ... Success!

 

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

 

Reload privilege tables now? [Y/n] Y -----> 重新加载权限表使设置生效

 ... Success!

 

All done!  If you've completed all of the above steps, your MySQL

installation should now be secure.

Thanks for using MySQL!

Cleaning up...

 

25重启服务器,检测mysql是否能开机自动启动:

[root@edu-mysql-01 ~] # reboot


相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。   相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情: https://www.aliyun.com/product/rds/mysql 
目录
相关文章
|
11月前
|
运维 监控 关系型数据库
MySQL高可用方案:MHA与Galera Cluster对比
本文深入对比了MySQL高可用方案MHA与Galera Cluster的架构原理及适用场景。MHA适用于读写分离、集中写入的场景,具备高效写性能与简单运维优势;而Galera Cluster提供强一致性与多主写入能力,适合对数据一致性要求严格的业务。通过架构对比、性能分析及运维复杂度评估,帮助读者根据自身业务需求选择最合适的高可用方案。
|
11月前
|
SQL 监控 关系型数据库
MySQL主从复制:构建高可用架构
本文深入解析MySQL主从复制原理与实战配置,涵盖复制架构、监控管理、高可用设计及性能优化,助你构建企业级数据库高可用方案。
|
负载均衡 算法 关系型数据库
大数据大厂之MySQL数据库课程设计:揭秘MySQL集群架构负载均衡核心算法:从理论到Java代码实战,让你的数据库性能飙升!
本文聚焦 MySQL 集群架构中的负载均衡算法,阐述其重要性。详细介绍轮询、加权轮询、最少连接、加权最少连接、随机、源地址哈希等常用算法,分析各自优缺点及适用场景。并提供 Java 语言代码实现示例,助力直观理解。文章结构清晰,语言通俗易懂,对理解和应用负载均衡算法具有实用价值和参考价值。
大数据大厂之MySQL数据库课程设计:揭秘MySQL集群架构负载均衡核心算法:从理论到Java代码实战,让你的数据库性能飙升!
|
人工智能 安全 Java
智慧工地源码,Java语言开发,微服务架构,支持分布式和集群部署,多端覆盖
智慧工地是“互联网+建筑工地”的创新模式,基于物联网、移动互联网、BIM、大数据、人工智能等技术,实现对施工现场人员、设备、材料、安全等环节的智能化管理。其解决方案涵盖数据大屏、移动APP和PC管理端,采用高性能Java微服务架构,支持分布式与集群部署,结合Redis、消息队列等技术确保系统稳定高效。通过大数据驱动决策、物联网实时监测预警及AI智能视频监控,消除数据孤岛,提升项目可控性与安全性。智慧工地提供专家级远程管理服务,助力施工质量和安全管理升级,同时依托可扩展平台、多端应用和丰富设备接口,满足多样化需求,推动建筑行业数字化转型。
493 5
|
10月前
|
Ubuntu 关系型数据库 MySQL
MySQL源码编译安装
本文详细介绍了MySQL 8.0及8.4版本的源码编译安装全过程,涵盖用户创建、依赖安装、cmake配置、编译优化等步骤,并提供支持多Linux发行版的一键安装脚本,适用于定制化数据库部署需求。
2404 4
MySQL源码编译安装
|
关系型数据库 MySQL 分布式数据库
Super MySQL|揭秘PolarDB全异步执行架构,高并发场景性能利器
阿里云瑶池旗下的云原生数据库PolarDB MySQL版设计了基于协程的全异步执行架构,实现鉴权、事务提交、锁等待等核心逻辑的异步化执行,这是业界首个真正意义上实现全异步执行架构的MySQL数据库产品,显著提升了PolarDB MySQL的高并发处理能力,其中通用写入性能提升超过70%,长尾延迟降低60%以上。
|
Linux
CentOS系统中rpm包与源码包的主要区别
总的来说,RPM包和源码包各有优缺点,选择哪种包主要取决于你的需求和技术水平。希望这个答案能帮助你更好地理解RPM包和源码包的区别。
491 27
|
运维 安全 数据可视化
采用PHP+Vue技术架构的不良事件管理系统(源码)
本系统为医院安全(不良)事件管理工具,支持快速上报、流程化处理与多维度分析,助力识别风险、优化管理。采用PHP+Vue技术架构,功能涵盖事件上报、追踪整改、数据统计及PDCA改进等。
404 0
|
负载均衡 算法 关系型数据库
大数据新视界--大数据大厂之MySQL数据库课程设计:MySQL集群架构负载均衡故障排除与解决方案
本文深入探讨 MySQL 集群架构负载均衡的常见故障及排除方法。涵盖请求分配不均、节点无法响应、负载均衡器故障等现象,介绍多种负载均衡算法及故障排除步骤,包括检查负载均衡器状态、调整算法、诊断修复节点故障等。还阐述了预防措施与确保系统稳定性的方法,如定期监控维护、备份恢复策略、团队协作与知识管理等。为确保 MySQL 数据库系统高可用性提供全面指导。
|
关系型数据库 MySQL PHP
源码编译安装LAMP(HTTP服务,MYSQL ,PHP,以及bbs论坛)
通过以上步骤,你可以成功地在一台Linux服务器上从源码编译并安装LAMP环境,并配置一个BBS论坛(Discuz!)。这些步骤涵盖了从安装依赖、下载源代码、配置编译到安装完成的所有细节。每个命令的解释确保了过程的透明度,使即使是非专业人士也能够理解整个流程。
549 18