`
willvvv
  • 浏览: 333325 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Percona Server with XtraDB 5.5.21和handlersocket插件安装

阅读更多

1.新建MySQL用户和用户组
groupadd mysql
useradd -g mysql mysql


2.新建MySQL数据目录
mkdir -p /data/mysql/data/

mkdir -p /data/mysql/tablespace
mkdir -p /data/mysql/binlog/
mkdir -p /data/mysql/relaylog/
chown -R mysql:mysql /data/mysql/


3.安装MySQL
cd /usr/local/src/
wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.21-25.0/binary/linux/i686/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64.tar.gz
tar zvxf Percona-Server-5.5.21-rel25.0-227.Linux.x86_64.tar.gz -C /usr/local/
cd /usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64/scripts/
./mysql_install_db --basedir=/usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64 --datadir=/data/mysql/data --user=mysql


4.MySQL的配置文件my.cnf,放在/et/目录

#BEGIN CONFIG INFO
#DESCR: 4GB RAM, InnoDB only, ACID, few connections, heavy queries
#TYPE: SYSTEM
#END CONFIG INFO

#
# This is a MySQL example config file for systems with 4GB of memory
# running mostly MySQL using InnoDB only tables and performing complex
# queries with few connections.
# 
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#

#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
#password	= [your_password]
# use loose for mysqlbinlog 
loose-character-set = utf8
port		= 3306
socket		= /tmp/mysql.sock

# *** Application-specific options follow here ***

#
# The MySQL server
#
[mysqld]

# generic configuration options
character_set_server = utf8
user        = mysql
port		= 3306
socket		= /tmp/mysql.sock
basedir     = /usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64
datadir     = /data/mysql/data
log-error   = /data/mysql/mysql_error.log
pid-file    = /data/mysql/mysql.pid

skip-name-resolve
interactive_timeout = 288000
wait_timeout = 288000

# relay-log
relay-log-index = /data/mysql/relaylog/relaylog
relay-log-info-file = /data/mysql/relaylog/relaylog
relay-log = /data/mysql/relaylog/relaylog
expire_logs_days = 7

# back_log is the number of connections the operating system can keep in
# the listen queue, before the MySQL connection manager thread has
# processed them. If you have a very high connection rate and experience
# "connection refused" errors, you might need to increase this value.
# Check your OS documentation for the maximum value of this parameter.
# Attempting to set back_log higher than your operating system limit
# will have no effect.
back_log = 600

# Don't listen on a TCP/IP port at all. This can be a security
# enhancement, if all processes that need to connect to mysqld run
# on the same host.  All interaction with mysqld must be made via Unix
# sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#skip-networking

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections = 500

# Maximum amount of errors allowed per host. If this limit is reached,
# the host will be blocked from connecting to the MySQL server until
# "FLUSH HOSTS" has been run or the server was restarted. Invalid
# passwords and other errors during the connect phase result in
# increasing this value. See the "Aborted_connects" status variable for
# global counter.
max_connect_errors = 6000

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_open_cache = 10240

# Enable external file level locking. Enabled file locking will have a
# negative impact on performance, so only use it in case you have
# multiple database instances running on the same files (note some
# restrictions still apply!) or if you use other software relying on
# locking MyISAM tables on file level.
#external-locking

# The maximum size of a query packet the server can handle as well as
# maximum query size server can process (Important when working with
# large BLOBs).  enlarged dynamically, for each connection.
max_allowed_packet = 32M

# The size of the cache to hold the SQL statements for the binary log
# during a transaction. If you often use big, multi-statement
# transactions you can increase this value to get more performance. All
# statements from transactions are buffered in the binary log cache and
# are being written to the binary log at once after the COMMIT.  If the
# transaction is larger than this value, temporary file on disk is used
# instead.  This buffer is allocated per connection on first update
# statement in transaction
binlog_cache_size = 4M

# Maximum allowed size for a single HEAP (in memory) table. This option
# is a protection against the accidential creation of a very large HEAP
# table which could otherwise use up all memory resources.
max_heap_table_size = 512M

# Size of the buffer used for doing full table scans.
# Allocated per thread, if a full scan is needed.
read_buffer_size = 4M

# When reading rows in sorted order after a sort, the rows are read
# through this buffer to avoid disk seeks. You can improve ORDER BY
# performance a lot, if set this to a high value.
# Allocated per thread, when needed.
read_rnd_buffer_size = 32M

# Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
# queries. If sorted data does not fit into the sort buffer, a disk
# based merge sort is used instead - See the "Sort_merge_passes"
# status variable. Allocated per thread if sort is needed.
sort_buffer_size = 8M

# This buffer is used for the optimization of full JOINs (JOINs without
# indexes). Such JOINs are very bad for performance in most cases
# anyway, but setting this variable to a large value reduces the
# performance impact. See the "Select_full_join" status variable for a
# count of full JOINs. Allocated per thread if full join is found
join_buffer_size = 8M

# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size = 300

# This permits the application to give the threads system a hint for the
# desired number of threads that should be run at the same time.  This
# value only makes sense on systems that support the thread_concurrency()
# function call (Sun Solaris, for example).
# You should try [number of CPUs]*(2..4) for thread_concurrency
thread_concurrency = 8

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size = 1024M

# Only cache result sets that are smaller than this limit. This is to
# protect the query cache of a very large result set overwriting all
# other query results.
query_cache_limit = 2M

# Minimum word length to be indexed by the full text search index.
# You might wish to decrease it if you need to search for shorter words.
# Note that you need to rebuild your FULLTEXT index, after you have
# modified this value.
ft_min_word_len = 4

# If your system supports the memlock() function call, you might want to
# enable this option while running MySQL to keep it locked in memory and
# to avoid potential swapping out in case of high memory pressure. Good
# for performance.
#memlock

# Table type which is used by default when creating new tables, if not
# specified differently during the CREATE TABLE statement.
default-storage-engine = innodb

# Thread stack size to use. This amount of memory is always reserved at
# connection time. MySQL itself usually needs no more than 64K of
# memory, while if you use your own stack hungry UDF functions or your
# OS requires more stack for some operations, you might need to set this
# to a higher value.
thread_stack = 192K

# Set the default transaction isolation level. Levels available are:
# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
transaction_isolation = REPEATABLE-READ

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size = 512M

# Enable binary logging. This is required for acting as a MASTER in a
# replication configuration. You also need the binary log if you need
# the ability to do point in time recovery from your latest backup.
log-bin=/data/mysql/binlog/binlog

# binary logging format - mixed recommended
binlog_format=
ROW



# If you're using replication with chained slaves (A->B->C), you need to
# enable this option on server B. It enables logging of updates done by
# the slave thread into the slave's binary log.
#log_slave_updates

# Enable the full query log. Every query (even ones with incorrect
# syntax) that the server receives will be logged. This is useful for
# debugging, it is usually disabled in production use.
#log

# Print warnings to the error log file.  If you have any problem with
# MySQL you should enable logging of warnings and examine the error log
# for possible explanations. 
#log_warnings

# Log slow queries. Slow queries are queries which take more than the
# amount of time defined in "long_query_time" or which do not use
# indexes well, if log_short_format is not enabled. It is normally good idea
# to have this turned on if you frequently add new queries to the
# system.
slow_query_log
slow_query_log_file=/data/mysql/slow.log

# All queries taking more than this amount of time (in seconds) will be
# trated as slow. Do not use "1" as a value here, as this will result in
# even very fast queries being logged from time to time (as MySQL
# currently measures time with second accuracy only).
long_query_time = 3


# ***  Replication related settings 


# Unique server identification number between 1 and 2^32-1. This value
# is required for both master and slave hosts. It defaults to 1 if
# "master-host" is not set, but will MySQL will not function as a master
# if it is omitted.
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    changes in this file to the variable values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>

# Make the slave read-only. Only users with the SUPER privilege and the
# replication slave thread will be able to modify data on it. You can
# use this to ensure that no applications will accidently modify data on
# the slave instead of the master
#read_only


#*** MyISAM Specific options


# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size = 256M

# MyISAM uses special tree-like cache to make bulk inserts (that is,
# INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA
# INFILE) faster. This variable limits the size of the cache tree in
# bytes per thread. Setting it to 0 will disable this optimisation.  Do
# not set it larger than "key_buffer_size" for optimal performance.
# This buffer is allocated when a bulk insert is detected.
bulk_insert_buffer_size = 64M

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
myisam_sort_buffer_size = 128M

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size = 10G

# If a table has more than one index, MyISAM can use more than one
# thread to repair them by sorting in parallel. This makes sense if you
# have multiple CPUs and plenty of memory.
myisam_repair_threads = 1

# Automatically check and repair not properly closed MyISAM tables.
myisam_recover

# *** INNODB Specific options ***

# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb

# each innodb table has its own tablespace
innodb_file_per_table = 1
# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size = 16M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size = 2G

# InnoDB stores data in one or more data files forming the tablespace.
# If you have a single logical drive for your data, a single
# autoextending file would be good enough. In other cases, a single file
# per device is often a good choice. You can configure InnoDB to use raw
# disk partitions as well - please refer to the manual for more info
# about this.
innodb_data_file_path = ibdata1:256M:autoextend

# Set this option if you would like the InnoDB tablespace files to be
# stored in another location. By default this is the MySQL datadir.
innodb_data_home_dir = /data/mysql/tablespace

# Number of IO threads to use for async IO operations. This value is
# hardcoded to 8 on Unix, but on Windows disk I/O may benefit from a
# larger number.
innodb_write_io_threads = 8
innodb_read_io_threads = 8

# If you run into InnoDB tablespace corruption, setting this to a nonzero
# value will likely help you to dump your tables. Start from value 1 and
# increase it until you're able to dump the table successfully.
#innodb_force_recovery=1

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency = 16

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit = 2

# Speed up InnoDB shutdown. This will disable InnoDB to do a full purge
# and insert buffer merge on shutdown. It may increase shutdown time a
# lot, but InnoDB will have to do it on the next startup instead.
#innodb_fast_shutdown

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions). 
innodb_log_buffer_size = 16M

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size = 256M

# Total number of files in the log group. A value of 2-3 is usually good
# enough.
innodb_log_files_in_group = 3

# Location of the InnoDB log files. Default is the MySQL datadir. You
# may wish to point it to a dedicated hard drive or a RAID1 volume for
# improved performance
#innodb_log_group_home_dir

# Maximum allowed percentage of dirty pages in the InnoDB buffer pool.
# If it is reached, InnoDB will start flushing them out agressively to
# not run out of clean pages at all. This is a soft limit, not
# guaranteed to be held.
innodb_max_dirty_pages_pct = 90

# The flush method InnoDB will use for Log. The tablespace always uses
# doublewrite flush logic. The default value is "fdatasync", another
# option is "O_DSYNC".
#innodb_flush_method=O_DSYNC

# How long an InnoDB transaction should wait for a lock to be granted
# before being rolled back. InnoDB automatically detects transaction
# deadlocks in its own lock table and rolls back the transaction. If you
# use the LOCK TABLES command, or other transaction-safe storage engines
# than InnoDB in the same transaction, then a deadlock may arise which
# InnoDB cannot notice. In cases like this the timeout is useful to
# resolve the situation.
innodb_lock_wait_timeout = 120


[mysqldump]
# Do not buffer the whole result set in memory before writing it to
# file. Required for dumping very large tables
quick

max_allowed_packet = 32M

[mysql]
no-auto-rehash

# Only allow UPDATEs and DELETEs that use keys.
#safe-updates

[myisamchk]
key_buffer_size = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
# Increase the amount of open files allowed per process. Warning: Make
# sure you have set the global system limit high enough! The high value
# is required for a large number of opened tables
open-files-limit = 65535
 


5.MySQL的管理脚本mysql.sh,内容如下,放在/usr/local/bin目录下,chmod +x /usr/local/bin/mysql.sh

mysql_port=3306
mysql_username="root"
mysql_password="yourpassword"

function_start_mysql()
{
    printf "Starting MySQL...\n"
    /bin/sh /usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/data --basedir=/usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64/ 2>&1 > /dev/null &
}

function_stop_mysql()
{
    printf "Stoping MySQL...\n"
    /usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -h localhost -P ${mysql_port} shutdown
}

function_restart_mysql()
{
    printf "Restarting MySQL...\n"
    function_stop_mysql
    function_start_mysql
}

function_kill_mysql()
{
    kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
    kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
}

if [ "$1" = "start" ]; then
    function_start_mysql
elif [ "$1" = "stop" ]; then
    function_stop_mysql
elif [ "$1" = "restart" ]; then
    function_restart_mysql
elif [ "$1" = "kill" ]; then
    function_kill_mysql
else
    printf "Usage: mysql.sh {start|stop|restart|kill}\n"

fi

 

6.如果需要把mysqld设为系统服务并开机启动,可以使用以下方法:

vi /etc/init.d/mysqld

#!/bin/bash
#
# comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: MySQL is a World Wide db server.
# processname: mysqld
# config: /etc/my.conf
# pidfile: /var/run/mysqld.pid

mysql_port=3306
mysql_username="root"
mysql_password="yourpassword"

function_start_mysql()
{
    printf "Starting MySQL...\n"
    /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --user=mysql --datadir=/data/mysql/data --basedir=/usr/local/mysql 2>&1 > /dev/null &
}

function_stop_mysql()
{
    printf "Stoping MySQL...\n"
    /usr/local/mysql/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -h localhost -P ${mysql_port} shutdown
}

function_restart_mysql()
{
    printf "Restarting MySQL...\n"
    function_stop_mysql
    function_start_mysql
}

function_kill_mysql()
{
    kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
    kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
}

function_status_mysql()
{
    run=`ps -ef | grep 'mysqld' | grep ${mysql_port} | wc -l`
    if [ "$run" -eq 1 ]; then
        printf "MySQL ${mysql_port} is running \n"
    else
        printf "MySQL ${mysql_port} is not running \n"
    fi
}

if [ "$1" = "start" ]; then
    function_start_mysql
elif [ "$1" = "stop" ]; then
    function_stop_mysql
elif [ "$1" = "restart" ]; then
    function_restart_mysql
elif [ "$1" = "status" ]; then
    function_status_mysql
elif [ "$1" = "kill" ]; then
    function_kill_mysql
else
    printf "Usage: mysql.sh {start|stop|restart|status|kill}\n"
fi

 

chmod a+x mysqld
chkconfig --add mysqld
chkconfig --level 2345 mysqld on

使用service mysqld start和service mysqld stop 即可开启和关闭mysql服务


7.设置环境变量
vi /etc/profile
export PATH=/usr/local/Percona-Server-5.5.21-rel25.0-227.Linux.x86_64/bin:$PATH
source /etc/profile


8.启动MySQL数据库,设置root密码

/usr/local/bin/mysql.sh start
mysql -u root
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "yourpassword";


9.安装handlersocket插件,在MySQL命令行执行 INSTALL PLUGIN handlersocket SONAME 'handlersocket.so';
在/etc/my.cnf的[mysqld]节下面增加以下内容:

loose_handlersocket_port = 9998
# the port number to bind to (for read requests)
loose_handlersocket_port_wr = 9999
# the port number to bind to (for write requests)
loose_handlersocket_threads = 16
# the number of worker threads (for read requests)
loose_handlersocket_threads_wr = 1
# the number of worker threads (for write requests)

 

重启MySQL,/usr/local/bin/mysql.sh restart


10.检查handlersocket是否OK,在MySQL命令行执行 show processlist; 查看输出内容

分享到:
评论
5 楼 willvvv 2012-06-21  
SkgHimT 写道
grzrt 写道
willvvv 写道
grzrt 写道
handlersocket支持查询分区吗?如:一个表分成多个分区,用HS查询指定分区的数据????


这个我倒没有使用过,缓存方案我都用的是redis。
多谢



缓存使用redis,采用什么方式实现mysql数据到redis中数据的同步
mysql udf + 触发器?
使用这种方式实现,但是有的mysql percona版本报错‘can't open shared library 'xxx.so' errno:0...’
不知道为什么?请问楼主遇到这个问题了吗?楼主采用什么方式实现数据同步到缓存?


现在项目中很简单没有使用udf,直接在编码中实现的 ,先写db再写cache,后续考虑异步队列方式,udf思路很好,研究学习一下
4 楼 SkgHimT 2012-06-19  
grzrt 写道
willvvv 写道
grzrt 写道
handlersocket支持查询分区吗?如:一个表分成多个分区,用HS查询指定分区的数据????


这个我倒没有使用过,缓存方案我都用的是redis。
多谢



缓存使用redis,采用什么方式实现mysql数据到redis中数据的同步
mysql udf + 触发器?
使用这种方式实现,但是有的mysql percona版本报错‘can't open shared library 'xxx.so' errno:0...’
不知道为什么?请问楼主遇到这个问题了吗?楼主采用什么方式实现数据同步到缓存?
3 楼 grzrt 2012-05-09  
willvvv 写道
grzrt 写道
handlersocket支持查询分区吗?如:一个表分成多个分区,用HS查询指定分区的数据????


这个我倒没有使用过,缓存方案我都用的是redis。
多谢
2 楼 willvvv 2012-05-09  
grzrt 写道
handlersocket支持查询分区吗?如:一个表分成多个分区,用HS查询指定分区的数据????


这个我倒没有使用过,缓存方案我都用的是redis。
1 楼 grzrt 2012-04-25  
handlersocket支持查询分区吗?如:一个表分成多个分区,用HS查询指定分区的数据????

相关推荐

    介绍 Percona 服务器 XtraDB 和 Xtrabackup

    Percona Server是Percona推出的一个产品,它是基于MySQL官方版本的衍生版,并且包含了XtraDB存储引擎和XtraBackup工具。 XtraDB是InnoDB存储引擎的增强版,它是在InnoDB的基础上进行了改进,以提供更好的性能和新的...

    Percona 服务器与 XtraDB 存储引擎

    综上所述,Percona Server 和 XtraDB 存储引擎结合了 MySQL 的成熟技术和 Percona 的创新成果,为用户提供了高性能、高可靠性的数据库解决方案,特别是在事务处理密集型应用中表现突出,成为许多企业级项目中的首选...

    MySQL集群PXC(Percona-XtraDB-Cluster-5.7.41-31.65)

    Percona-XtraDB-Cluster-server-57-5.7.41-31.65.1.el7.x86_64.rpm Percona-XtraDB-Cluster-devel-57-5.7.41-31.65.1.el7.x86_64.rpm Percona-XtraDB-Cluster-client-57-5.7.41-31.65.1.el7.x86_64.rpm Percona-...

    Percona XtraDB 集群安装与配置

    2. **安装Percona XtraDB Cluster软件包**:使用`#yum -y install Percona-XtraDB-Cluster-server Percona-XtraDB-Cluster-client Percona-Server-shared-compat percona-xtrabackup`命令来安装必要的软件包。...

    mysql 5.7 Percona Server

    综上所述,Percona Server 5.7 在 MySQL 5.7 的基础上,通过一系列优化和增强,为企业级应用提供了更高的性能、更强的安全性和更佳的可扩展性。对于那些对数据库性能有严格要求的大型企业和互联网公司,Percona ...

    mysql percona server 官方手册

    总结而言,Percona Server官方手册5.6版本为数据库管理员提供了深入的技术信息和指南,涵盖了安装、升级、性能优化和特性改进等关键方面。通过详细阅读手册,管理员可以确保对Percona Server的深入理解和高效部署,...

    Percona-XtraDB-Cluster-57-5.7.28-31.41.rar

    5. **监控和管理工具**:Percona提供了一系列工具,如Percona Toolkit和Percona Server for MySQL,帮助管理员监控和优化集群性能。 6. **性能优化**:在5.7版本中,MySQL引入了诸如InnoDB Memory Heap、Column ...

    Percona-XtraDB-Cluster

    Percona XtraDB Cluster is fully compatible with MySQL Server Community Edition, Percona Server, and MariaDB in the following sense: • Data compatibility: You can use data created by any MySQL variant...

    MySQL集群PXC(Percona-XtraDB-Cluster-5.6.15-25.5)

    Percona-XtraDB-Cluster-5.6.15.tar.gz percona-xtradb-cluster-galera.tar.gz Percona-XtraDB-Cluster-5.6.15-25.5.759.Linux.i686.tar.gz Percona-XtraDB-Cluster-5.6.15-25.5.759.Linux.x86_64.tar.gz Percona-...

    xtraDB-Cluster全部安装包

    1.percona-xtrabackup-2.2.12-1....4.Percona-XtraDB-Cluster-server-55-5.5.41-25.11.853.el7.x86_64.rpm 5.Percona-XtraDB-Cluster-shared-55-5.5.41-25.11.853.el7.x86_64.rpm 6.socat-1.7.2.4-1.el7.rf.x86_64.rpm

    Percona_XtraDB_Cluster

    Percona XtraDB Cluster是一个高可用性的开源数据库集群解决方案,它基于Galera库提供了同步多主复制(Synchronous Multi-Master Replication),这意味着数据几乎实时地在多个服务器间复制,从而提高了数据库的可用...

    Percona-XtraDB-Cluster-5.7.31-31.45-r10-el7-x86_64-bundle.tar

    mysql多主集群安装包

    MySQL集群PXC(Percona-XtraDB-Cluster-8.0.32)

    MySQL集群PXC: Percona-XtraDB-Cluster-8.0.32-24.tar.gz percona-xtradb-cluster_8.0.32-24.orig.tar.gz Percona-XtraDB-Cluster-8.0.32-24.tar.gz.gz

    Percona-XtraDB-Cluster-5.7.17-29.20

    Percona XtraDB Cluster基于Percona Server和Galera库构建而成,实现了高同步复制,数据在所有节点上同时写入,以此来保证数据的一致性。 2. Percona XtraDB Cluster的限制 在文档的描述中提到了Percona XtraDB ...

    MYSQL percona server manual

    Percona XtraDB引擎不会进行进一步的二进制发布,而是作为Percona Server和MariaDB的一部分进行分发。 Percona Server中可用的特性列表包括但不限于以下方面: - 性能改进:Percona Server针对性能的提升有很多...

    MySQL Percona Xtradb Cluster安装手册

    Percona Xtradb Cluster(PXC)是一种高可用性和扩展性解决方案,基于Percona Server,旨在提供高性能和高可用性的数据库解决方案。以下是PXC的安装手册和相关知识点: 1. Percona Xtradb Cluster简介 Percona ...

    安装Percona XtraDB集群 FOR CentOS

    Percona Server 是 MySQL 的衍生版,专注于 Linux/BSD 下 MySQL 数据库服务器的改进, 在功能和性能上较 MySQL有着显著的提升。Percona Server 的使用和 MySQL 完全一致,你完全可以把它当成是 MySQL 来使用。

    Percona_XtraDB_Cluster_5.7.27-31.39.pdf

    PXC是Percona XtraDB Cluster的缩写,是一种具有高可用性和高扩展性的MySQL开源集群。它集成了Percona Server和Percona XtraBackup,同时采用了Codership Galera库。 常见的PXC架构如下,

    Percona-Server-5.7.35-38-Linux.x86_64.glibc2.12-minimal.tar.gz

    安装Percona Server后,可以通过Percona的管理和监控工具,如Percona Toolkit、Percona Xtrabackup等进行日常维护和性能监控。此外,Percona还提供了一系列文档和技术支持,帮助用户更好地理解和利用这款数据库...

    MySql 高可用Percona Xtradb Cluste 5.5 (包含binlog server)实战安装部署指南中文版v2

    本指南将深入介绍如何实战安装部署Percona XtraDB Cluster 5.5,包括binlog server的设置。 一、Percona XtraDB Cluster简介 Percona XtraDB Cluster是在MySQL基础上进行优化的集群解决方案,使用InnoDB存储引擎,...

Global site tag (gtag.js) - Google Analytics