Skip to content


正则表达式口诀

正则其实也势利,削尖头来把钱揣; (指开始符号^和结尾符号$) 特殊符号认不了,弄个倒杠来引路; (指. *等特殊符号) 倒杠后面跟小w, 数字字母来表示; (w跟数字字母;\d跟数字) 倒杠后面跟小d, 只有数字来表示; 倒杠后面跟小a, 报警符号嘀一声; 倒杠后面跟小b, 单词分界或退格; 倒杠后面跟小t, 制表符号很明了; 倒杠后面跟小r, 回车符号知道了; 倒杠后面跟小s, 空格符号很重要; 小写跟罢跟大写,多得实在不得了; 倒杠后面跟大W, 字母数字靠边站; 倒杠后面跟大S, 空白也就靠边站; 倒杠后面跟大D, 数字从此靠边站; 倒框后面跟大B, 不含开头和结尾;

单个字符要重复,三个符号来帮忙; ( + ?) 0 星加1 到无穷,问号只管0 和1; (表0-n;+表1-n;?表0-1次重复) 花括号里学问多,重复操作能力强; ({n} {n,} {n,m}) 若要重复字符串,园括把它括起来; ((abc){3} 表示字符串“abc”重复3次 ) 特殊集合自定义,中括号来帮你忙; 转义符号行不通,一个一个来排队; 实在多得排不下,横杠请来帮个忙; ([1-5]) 尖头放进中括号,反义定义威力大; ([^a]指除“a”外的任意字符 ) 1竖作用可不小,两边正则互替换; (键盘上与“”是同一个键) 1竖能用很多次,复杂定义很方便; 园括号,用途多; 反向引用指定组,数字排符对应它; (“(\w+)\b\s+\1\b”中的数字“1”引用前面的“(\w+)”) 支持组名自定义,问号加上尖括号; (“(?

\w+)”中把“w+”定义为组,组名为“Word”) 园括号,用途多,位置指定全靠它; 问号等号字符串,定位字符串前面; (“\w+(?=ing\b)”定位“ing”前面的字符串) 若要定位串后面,中间插个小于号; (“(?

Posted in 文档理论.

Tagged with .


find搜索如何排除文件及目录

查找cache目录下不是html的文件

find ./cache ! -name ‘*.html’ -type f

列出当前目录下的目录名,排除includes目录,后面的-print不能少

find . -path ‘./includes’ -prune -o -type d -maxdepth 1 -print

2012-3-26更新 排除多个目录,”(“前是带”\”的

find / \( -path /home/ -o -path /root \) -prune -nouser -type f -exec ls -l {} \;

Posted in Linux 命令.

Tagged with .


linux下用mailx不启动Sendmail使用其它SMTP发邮件

可能服务器群已有专用邮件服务器不想在每台服务器上开启sendmail服务, 可以使用此方法让其它WEB服务器等调用,方便管理与维护.

1.首先需要一个SMTP邮件服务器 假设已有一台mail.c1gstudio.com邮件服务器

2.在本机的/etc/mail.rc 尾部输入

set [email protected] set smtp=mail.c1gstudio.com set smtp-auth=login set smtp-auth-user=mailuser set smtp-auth-password=mailpassword

3.发送邮件 mail -v -s “Hello ” [email protected] < /etc/hosts 收件人可以是多个人以","分割 -v是显示过程

Resolving host mail.c1gstudio.com . . . done. Connecting to 208.133.200.99 . . . connected. 220 Welcome to mail.c1gstudio.com ESMTP,Warning: Version not Available! >>> EHLO localhost 250-mta.mail.c1gstudio.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN >>> AUTH LOGIN 334 xcvxcv >>> xc3xvsd== 334 f32fsdfwq >>> faddasdfaA== 235 2.0.0 Authentication successful >>> MAIL FROM: 250 2.1.0 Ok >>> RCPT TO: 250 2.1.5 Ok >>> DATA 354 End data with . >>> . 250 2.0.0 Ok: queued as A2E541C41D >>> QUIT 221 2.0.0 Bye

参考: http://kc1985.blog.51cto.com/2407758/537881

==================== 2012-4-10更新 以上测试是在centos6.0下运行没有问题,但在centos5.x上无法成功,为此放狗搜了半天无果 某天总算发现了差异,原来centos6上是Heirloom Mailx,在debian上用的多,yum search下没有.

centos5.8

mailx -V 8.1 6/6/93. Type ? for help. “/var/spool/mail/root”: 2 messages 2 new

centos6.0

mailx -V 12.4 7/29/08

找到问题就好办了 heirloom项目网址 http://sourceforge.net/projects/heirloom/ 目前最近版是mailx-12.4 1.安装mailx wget http://sourceforge.net/settings/mirror_choices?projectname=heirloom&filename=heirloom-mailx/12.4/mailx-12.4.tar.bz2 tar jxvf mailx-12.4.tar.bz2 cd mailx-12.4 make make install 出错

test -d /usr/local/bin || mkdir -p /usr/local/bin /usr/ucb/install -c mailx /usr/local/bin/mailx make: /usr/ucb/install: Command not found make: *** [install] Error 127

make install UCBINSTALL=/usr/bin/install

默认安装在 /usr/local/bin/mailx /etc/nail.rc 也可以自定义安装目录

make PREFIX=/opt/mailx SYSCONFDIR=/opt/mailx/etc

2.在本机的/etc/nail.rc 尾部输入 注意是nail.rc不是mail.rc

set [email protected] set smtp=mail.c1gstudio.com set smtp-auth=login set smtp-auth-user=mailuser set smtp-auth-password=mailpassword

3.切换到新mailx mv /bin/mail /bin/mail.OFF ln -s /usr/local/bin/mailx /bin/mail

4.测试 mail -v -s “new mailx ” [email protected] < /etc/hosts

Resolving host mail.c1gstudio.com . . . done. ….

========================== 2013-4-26更新 如出错找不到libiconv.so.2

mailx: error while loading shared libraries: libiconv.so.2: cannot open shar

可以查找下libiconv有无安装,再把lib目录放入/etc/ld.so.conf中 一般在/usr/local/lib/ echo ‘/usr/local/lib/’ >> /etc/ld.so.conf ldconfig -v

Posted in Mail/Postfix.

Tagged with , .


备份时遇到File size limit exceeded

用u盘备份文件时注意分区格式,通常使用的FAT32单文件最大为4G,超出时会遇到File size limit exceeded 错误.

Posted in 备份.

Tagged with .


Fckeditor<=2.4.2含上传漏洞

Version <=2.4.2 For php 在处理PHP 上传的地方并未对Media 类型进行上传文件类型的控制,导致用户上传任意文件!将以下保存为html文件,修改action地址。

Upload a new file:

还有很有漏洞详见参考

参考: http://www.85815.com/article.asp?id=1320

Posted in 安全通告.

Tagged with .


给PHP5.2.*打上Hash冲突漏洞补丁

PHP5.2.通过构造Hash冲突可以实现拒绝服务攻击,针对此漏洞官方发布了PHP 5.3.9但不会为此发布PHP 5.2.18. 5.2. 可以打上下面的patch来解决此问题.

https://github.com/laruence/laruence.github.com/tree/master/php-5.2-max-input-vars

目前已知的受影响的语言以及版本有::

Java, 所有版本

JRuby <= 1.6.5

PHP <= 5.3.8, <= 5.4.0RC3

Python, 所有版本

Rubinius, 所有版本

Ruby <= 1.8.7-p356

Apache Geronimo, 所有版本

Apache Tomcat <= 5.5.34, <= 6.0.34, <= 7.0.22

Oracle Glassfish <= 3.1.1

Jetty, 所有版本

Plone, 所有版本

Rack, 所有版本

V8 JavaScript Engine, 所有版本

不受此影响的语言或者修复版本的语言有::

PHP >= 5.3.9, >= 5.4.0RC4

JRuby >= 1.6.5.1

Ruby >= 1.8.7-p357, 1.9.x

Apache Tomcat >= 5.5.35, >= 6.0.35, >= 7.0.23

Oracle Glassfish, N/A (Oracle reports that the issue is fixed in the main codeline and scheduled for a future CPU)

将php从5.2.14升级到5.2.17并打上补丁 下载patch https://github.com/laruence/laruence.github.com/zipball/master

到之前的php编译目录

cd src/lempelf/package/ wget http://www.php.net/get/php-5.2.17.tar.gz/from/kr.php.net/mirror wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz tar zxvf php-5.2.17.tar.gz gzip -cd php-5.2.17-fpm-0.5.14.diff.gz |patch -d php-5.2.17 -p1 patching file configure Hunk #7 succeeded at 110645 (offset 1324 lines). Hunk #9 succeeded at 119634 (offset 1324 lines). patching file configure.in patching file libevent/ChangeLog patching file libevent/Makefile.am patching file libevent/Makefile.in patching file libevent/README patching file libevent/aclocal.m4 patching file libevent/autogen.sh patching file libevent/buffer.c patching file libevent/compat/sys/_time.h patching file libevent/compat/sys/queue.h patching file libevent/config.h.in patching file libevent/configure patching file libevent/configure.in patching file libevent/depcomp patching file libevent/devpoll.c patching file libevent/epoll.c patching file libevent/epoll_sub.c patching file libevent/evbuffer.c patching file libevent/event-config.h patching file libevent/event-fpm.h patching file libevent/event-internal.h patching file libevent/event.3 patching file libevent/event.c patching file libevent/event.h patching file libevent/evhttp.h patching file libevent/evport.c patching file libevent/evsignal.h patching file libevent/evutil.c patching file libevent/evutil.h patching file libevent/http-internal.h patching file libevent/http.c patching file libevent/install-sh patching file libevent/kqueue.c patching file libevent/log.c patching file libevent/log.h patching file libevent/min_heap.h patching file libevent/missing patching file libevent/poll.c patching file libevent/select.c patching file libevent/signal.c patching file libevent/strlcpy-internal.h patching file libevent/strlcpy.c patching file main/php_config.h.in patching file sapi/cgi/Makefile.frag patching file sapi/cgi/cgi_main.c patching file sapi/cgi/config9.m4 patching file sapi/cgi/fastcgi.c patching file sapi/cgi/fastcgi.h patching file sapi/cgi/fpm/Makefile.frag patching file sapi/cgi/fpm/acinclude.m4 patching file sapi/cgi/fpm/conf/php-fpm.conf.in patching file sapi/cgi/fpm/config.m4 patching file sapi/cgi/fpm/fpm.c patching file sapi/cgi/fpm/fpm.h patching file sapi/cgi/fpm/fpm_arrays.h patching file sapi/cgi/fpm/fpm_atomic.h patching file sapi/cgi/fpm/fpm_autoconf.h.in patching file sapi/cgi/fpm/fpm_children.c patching file sapi/cgi/fpm/fpm_children.h patching file sapi/cgi/fpm/fpm_cleanup.c patching file sapi/cgi/fpm/fpm_cleanup.h patching file sapi/cgi/fpm/fpm_clock.c patching file sapi/cgi/fpm/fpm_clock.h patching file sapi/cgi/fpm/fpm_conf.c patching file sapi/cgi/fpm/fpm_conf.h patching file sapi/cgi/fpm/fpm_config.h patching file sapi/cgi/fpm/fpm_env.c patching file sapi/cgi/fpm/fpm_env.h patching file sapi/cgi/fpm/fpm_events.c patching file sapi/cgi/fpm/fpm_events.h patching file sapi/cgi/fpm/fpm_php.c patching file sapi/cgi/fpm/fpm_php.h patching file sapi/cgi/fpm/fpm_php_trace.c patching file sapi/cgi/fpm/fpm_php_trace.h patching file sapi/cgi/fpm/fpm_process_ctl.c patching file sapi/cgi/fpm/fpm_process_ctl.h patching file sapi/cgi/fpm/fpm_request.c patching file sapi/cgi/fpm/fpm_request.h patching file sapi/cgi/fpm/fpm_shm.c patching file sapi/cgi/fpm/fpm_shm.h patching file sapi/cgi/fpm/fpm_shm_slots.c patching file sapi/cgi/fpm/fpm_shm_slots.h patching file sapi/cgi/fpm/fpm_signals.c patching file sapi/cgi/fpm/fpm_signals.h patching file sapi/cgi/fpm/fpm_sockets.c patching file sapi/cgi/fpm/fpm_sockets.h patching file sapi/cgi/fpm/fpm_stdio.c patching file sapi/cgi/fpm/fpm_stdio.h patching file sapi/cgi/fpm/fpm_str.h patching file sapi/cgi/fpm/fpm_trace.c patching file sapi/cgi/fpm/fpm_trace.h patching file sapi/cgi/fpm/fpm_trace_mach.c patching file sapi/cgi/fpm/fpm_trace_pread.c patching file sapi/cgi/fpm/fpm_trace_ptrace.c patching file sapi/cgi/fpm/fpm_unix.c patching file sapi/cgi/fpm/fpm_unix.h patching file sapi/cgi/fpm/fpm_worker_pool.c patching file sapi/cgi/fpm/fpm_worker_pool.h patching file sapi/cgi/fpm/init.d/php-fpm.in patching file sapi/cgi/fpm/xml_config.c patching file sapi/cgi/fpm/xml_config.h patching file sapi/cgi/fpm/zlog.c patching file sapi/cgi/fpm/zlog.h unzip laruence-laruence.github.com-43969a1.zip cd php-5.2.17 patch -p1 patching file configure Hunk #1 succeeded at 2176 (offset 11 lines). patching file configure.in patching file main/main.c patching file main/php_globals.h patching file main/php_variables.c patching file main/php_version.h

打好补丁,重编译一遍php

./configure –prefix=/opt/php-5.2.17p1 –with-config-file-path=/opt/php-5.2.17p1/etc –with-mysql=/opt/mysql –with-mysqli=/opt/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –enable-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-soap –enable-xml –enable-zend-multibyte –disable-debug –disable-ipv6 make ZEND_EXTRA_LIBS=’-liconv’ make install cd ../memcache-3.0.5 make clean /opt/php-5.2.17p1/bin/phpize ./configure –with-php-config=/opt/php-5.2.17p1/bin/php-config make make install cd ../eaccelerator-0.9.6.1 make clean /opt/php-5.2.17p1/bin/phpize ./configure –enable-eaccelerator=shared –with-php-config=/opt/php-5.2.17p1/bin/php-config make make install cd ../PDO_MYSQL-1.0.2 make clean /opt/php-5.2.17p1/bin/phpize ./configure –with-php-config=/opt/php-5.2.17p1/bin/php-config –with-pdo-mysql=/opt/mysql make make install cd ../imagick-2.2.2/ make clean /opt/php-5.2.17p1/bin/phpize ./configure –with-php-config=/opt/php-5.2.17p1/bin/php-config make make install #32位用下面 cp ../ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /opt/php-5.2.17p1/lib/php/extensions/no-debug-non-zts-20060613/ #64位用下面 cp ../ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/ZendOptimizer.so /opt/php-5.2.17p1/lib/php/extensions/no-debug-non-zts-20060613/ mkdir -p /opt/php-5.2.17p1/eaccelerator_cache chown www:website /opt/php-5.2.17p1/eaccelerator_cache/ chmod 770 /opt/php-5.2.17p1/eaccelerator_cache/ touch /opt/php-5.2.17p1/logs/php_error.log chown www:website /opt/php-5.2.17p1/logs/php_error.log chmod 770 /opt/php-5.2.17p1/logs/php_error.log #升级pear (可选) /opt/php-5.2.17p1/bin/pear upgrade pear /opt/php-5.2.17p1/bin/pear install Benchmark Cache_Lite DB HTTP Mail Mail_Mime Net_SMTP Net_Socket Pager XML_Parser XML_RPC cp -p /opt/php/etc/php.ini /opt/php-5.2.17p1/etc/ cp -p /opt/php/etc/php-fpm.conf /opt/php-5.2.17p1/etc/ chown root:website /opt/php-5.2.17p1/etc/* chmod 660 /opt/php-5.2.17p1/etc/* /opt/php/sbin/php-fpm stop #删掉软连接,切换php rm /opt/php ln -s /opt/php-5.2.17p1/ /opt/php /opt/php/sbin/php-fpm start

注意phpfpm.conf,php.ini中的路径

找不到libmysqlclient.so.16

./conftest: error while loading shared libraries: libmysqlclient.so.16

echo /opt/mysql/lib/mysql >> /etc/ld.so.conf ldconfig -v

eAccelerator出错

[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.2.14. Rebuild it for your PHP version (5.2.17p1) or download precompiled binaries.

重新编译eAccelerator

参考: http://www.laruence.com/2011/12/29/2412.html

Posted in PHP, 安全, 安全通告.

Tagged with , .


mysql5.1.26rc升级至Percona mysql5.5.17

mysql5.5 比mysql5.1有更快的innodb,更好的多核支持,加强的复制功能,这正是我看中的. Percona-Server是MySQL的衍生版,在功能和性能上较官方MySQL 又有着很显著的提升.

Percona版和官方mysql.5.5.17下编出中文支持需用 -DWITH_EXTRA_CHARSETS=all 下面参数无法编出 -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk 官方mysql.5.5.18两个参数都无法编译出中文支持… 5.5起使用cmake编译,可以用yum安装 5.6也可用此安装

wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.17-22.1/source/Percona-Server-5.5.17-rel22.1.tar.gz tar zxvf Percona-Server-5.5.17-rel22.1.tar.gz cd Percona-Server-5.5.17-rel22.1 CC=gcc CFLAGS=”-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -O3″ CXX=g++ CXXFLAGS=”-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -felide-constructors -fno-rtti -O3″ cmake . \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DSYSCONFDIR:PATH=/opt/mysql-5.5.17-22.1 \ -DCMAKE_INSTALL_PREFIX:PATH=/opt/mysql-5.5.17-22.1 \ -DENABLED_PROFILING:BOOL=ON \ -DENABLE_DEBUG_SYNC:BOOL=OFF \ -DMYSQL_DATADIR:PATH=/opt/mysql-5.5.17-22.1/var \ -DMYSQL_MAINTAINER_MODE:BOOL=OFF \ -DWITH_EXTRA_CHARSETS=all \ -DWITH_BIG_TABLES:BOOL=ON \ -DWITH_FAST_MUTEXES:BOOL=ON \ -DENABLE-PROFILING:BOOL=ON \ -DWITH_SSL:STRING=bundled \ -DWITH_UNIT_TESTS:BOOL=OFF \ -DWITH_ZLIB:STRING=bundled \ -DWITH_PARTITION_STORAGE_ENGINE:BOOL=ON \ -DWITH_PLUGINS=heap,csv,partition,innodb_plugin,myisam \ -DEFAULT_COLLATION=utf8_general_ci \ -DEFAULT_CHARSET=utf8 \ -DENABLED_ASSEMBLER:BOOL=ON \ -DENABLED_LOCAL_INFILE:BOOL=ON \ -DENABLED_THREAD_SAFE_CLIENT:BOOL=ON \ -DENABLED_EMBEDDED_SERVER:BOOL=OFF \ -DWITH_CLIENT_LDFLAGS:STRING=all-static \ -DINSTALL_LAYOUT:STRING=STANDALONE \ -DCOMMUNITY_BUILD:BOOL=ON;

失败后更改配制操作

make clean rm -f CMakeCache.txt

编译安装

make make install cp support-files/mysql.server /opt/mysql-5.5.17-22.1/bin/ chown -R mysql:mysql /opt/mysql-5.5.17-22.1 chmod 755 /opt/mysql-5.5.17-22.1/bin/mysql.server ln -s /opt/mysql-5.5.17-22.1/ /opt/mysql

复制5.1全部数据

cp -a /opt/mysql-5.1.26rc/var /opt/mysql-5.5.17-22.1/

复制5.1的原配置文件启动出错

cp /opt/mysql-5.1.26rc/my.cnf /opt/mysql-5.5.17-22.1/ /opt/mysql-5.5.17-22.1/bin/mysqld –skip-grant-tables –user=mysql 111212 15:50:51 [Note] Flashcache bypass: disabled 111212 15:50:51 [Note] Flashcache setup error is : ioctl failed 111212 15:50:51 [Warning] option ‘innodb-autoextend-increment’: unsigned value 52428800 adjusted to 1000 111212 15:50:51 [Note] Plugin ‘InnoDB’ is disabled. 111212 15:50:51 [ERROR] bin/mysqld: unknown option ‘–skip-locking’ 111212 15:50:51 [ERROR] Aborting 111212 15:50:51 [Note] bin/mysqld: Shutdown complete

mysql5.5不再支持skip-locking 参数,需从my.cnf中去除; 如果原先用了innodb还需修改参数和实际文件大小一致

ls -lh /opt/mysql/var/ -rw-r—– 1 mysql mysql 2030043136 Dec 13 16:55 ibdata1 -rw-r—– 1 mysql mysql 67108864 Dec 13 16:55 ib_logfile0 -rw-r—– 1 mysql mysql 67108864 Dec 13 16:37 ib_logfile1

计算ibdata1 文件大小 2030043136/1024/1024=1936M,ib_logfile=67108864/1024/1024=64M

innodb_data_file_path = ibdata1:1936M:autoextend innodb_log_file_size = 64M innodb_log_files_in_group = 2 #后面不需要M innodb-autoextend-increment=50

修改过的my.cnf discuz论坛应用,innodb数据2G左右

[client] port = 3306 socket = /opt/mysql/mysql.sock [mysqld] port = 3306 socket = /opt/mysql/mysql.sock #skip-locking skip-name-resolve back_log=100 key_buffer_size = 4128M query_cache_size = 128M query_cache_limit = 2M #default=1M query_cache_min_res_unit = 2k #default=4K max_allowed_packet = 16M table_cache = 5096 table_definition_cache = 1024 tmp_table_size = 1792M #default=16M max_heap_table_size = 512M #default=16M read_buffer_size = 8M read_rnd_buffer_size = 32M sort_buffer_size = 256M join_buffer_size = 20M myisam_sort_buffer_size = 256M thread_cache_size = 80 #default=0 thread_stack = 192K #default=192K thread_concurrency = 16 #default=10 connect_timeout = 30 max_connection = 500 max_connect_errors = 30 wait_timeout = 30 concurrent_insert=2 #以增加碎片代价提高写入 server-id = 9 innodb_additional_mem_pool_size = 64M innodb_buffer_pool_size = 4G innodb_autoextend_increment =50 #ibdata1以实际文件大小代替 innodb_data_file_path = ibdata1:1936M:autoextend #新增参数 innodb_write_io_threads = 8 #新增参数 innodb_read_io_threads = 8 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 0 innodb_log_buffer_size = 8M #log_file和原配置保持一样 innodb_log_file_size = 64M innodb_log_files_in_group = 2 innodb_max_dirty_pages_pct = 60 innodb_lock_wait_timeout = 50 #innodb_file_per_table [mysqldump] quick max_allowed_packet = 32M [mysql] no-auto-rehash [isamchk] key_buffer = 256M sort_buffer_size = 256M read_buffer = 8M write_buffer = 8M [myisamchk] key_buffer = 256M sort_buffer_size = 256M read_buffer = 8M write_buffer = 8M [mysqlhotcopy] interactive-timeout

再次跳过权限表启动

/opt/mysql-5.5.17-22.1/bin/mysqld –skip-grant-tables –user=mysql 111213 16:49:29 [Note] Flashcache bypass: disabled 111213 16:49:29 [Note] Flashcache setup error is : ioctl failed 111213 16:49:29 InnoDB: The InnoDB memory heap is disabled 111213 16:49:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins 111213 16:49:29 InnoDB: Compressed tables use zlib 1.2.3 111213 16:49:29 InnoDB: Initializing buffer pool, size = 4.0G 111213 16:49:30 InnoDB: Completed initialization of buffer pool 111213 16:49:30 InnoDB: highest supported file format is Barracuda. InnoDB: 127 rollback segment(s) active. 111213 16:49:30 InnoDB: Waiting for the background threads to start 111213 16:49:31 Percona XtraDB (http://www.percona.com) 1.1.8-20.1 started; log sequence number 1881683892 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_current’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_history’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_history_long’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’setup_consumers’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’setup_instruments’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’setup_timers’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’performance_timers’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’threads’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_summary_by_thread_by_event_name’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_summary_by_instance’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’events_waits_summary_global_by_event_name’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’file_summary_by_event_name’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’file_summary_by_instance’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’mutex_instances’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’rwlock_instances’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’cond_instances’ has the wrong structure 111213 16:49:31 [ERROR] Native table ‘performance_schema’.’file_instances’ has the wrong structure 111213 16:49:31 [Note] /opt/mysql-5.5.17-22.1/bin/mysqld: ready for connections. Version: ‘5.5.17’ socket: ‘/opt/mysql/mysql.sock’ port: 3306 Source distribution

升级

/opt/mysql/bin/mysql_upgrade Looking for ‘mysql’ as: /opt/mysql/bin/mysql Looking for ‘mysqlcheck’ as: /opt/mysql/bin/mysqlcheck Running ‘mysqlcheck’ with connection arguments: ‘–port=3306’ ‘–socket=/opt/mysql/mysql.sock’ Running ‘mysqlcheck’ with connection arguments: ‘–port=3306’ ‘–socket=/opt/mysql/mysql.sock’ discuzx.pre_common_addon OK discuzx.pre_common_admincp_cmenu OK discuzx.pre_common_admincp_group OK discuzx.pre_common_admincp_member OK discuzx.pre_common_admincp_perm OK discuzx.pre_common_admincp_session OK discuzx.pre_common_admingroup OK discuzx.pre_common_adminnote OK discuzx.pre_common_advertisement OK discuzx.pre_common_advertisement_custom OK discuzx.pre_common_banned OK discuzx.pre_common_block OK discuzx.pre_common_block_favorite OK discuzx.pre_common_block_item OK discuzx.pre_common_block_item_data OK discuzx.pre_common_block_permission OK discuzx.pre_common_block_pic OK discuzx.pre_common_block_style OK discuzx.pre_common_block_xml OK discuzx.pre_common_cache OK discuzx.pre_common_card OK discuzx.pre_common_card_log OK discuzx.pre_common_card_type OK discuzx.pre_common_credit_log OK discuzx.pre_common_credit_rule OK discuzx.pre_common_credit_rule_log OK discuzx.pre_common_credit_rule_log_field OK discuzx.pre_common_cron OK discuzx.pre_common_district OK discuzx.pre_common_diy_data OK discuzx.pre_common_domain OK discuzx.pre_common_failedlogin OK discuzx.pre_common_friendlink OK discuzx.pre_common_grouppm OK discuzx.pre_common_invite OK discuzx.pre_common_magic OK discuzx.pre_common_magiclog OK discuzx.pre_common_mailcron OK discuzx.pre_common_mailqueue OK discuzx.pre_common_member OK discuzx.pre_common_member_action_log OK discuzx.pre_common_member_connect OK discuzx.pre_common_member_count OK discuzx.pre_common_member_field_forum OK discuzx.pre_common_member_field_home OK discuzx.pre_common_member_grouppm OK discuzx.pre_common_member_log OK discuzx.pre_common_member_magic OK discuzx.pre_common_member_profile OK discuzx.pre_common_member_profile_setting OK discuzx.pre_common_member_security OK discuzx.pre_common_member_stat_field OK discuzx.pre_common_member_stat_fieldcache OK discuzx.pre_common_member_stat_search OK discuzx.pre_common_member_stat_searchcache OK discuzx.pre_common_member_status OK discuzx.pre_common_member_validate OK discuzx.pre_common_member_verify OK discuzx.pre_common_member_verify_info OK discuzx.pre_common_moderate OK discuzx.pre_common_myapp OK discuzx.pre_common_myinvite OK discuzx.pre_common_mytask OK discuzx.pre_common_nav OK discuzx.pre_common_onlinetime OK discuzx.pre_common_onlinetime_bak OK discuzx.pre_common_plugin OK discuzx.pre_common_pluginvar OK discuzx.pre_common_process OK discuzx.pre_common_regip OK discuzx.pre_common_relatedlink OK discuzx.pre_common_report OK discuzx.pre_common_searchindex OK discuzx.pre_common_secquestion OK discuzx.pre_common_session OK discuzx.pre_common_setting OK discuzx.pre_common_smiley OK discuzx.pre_common_sphinxcounter OK discuzx.pre_common_stat OK discuzx.pre_common_statuser OK discuzx.pre_common_style OK discuzx.pre_common_stylevar OK discuzx.pre_common_syscache OK discuzx.pre_common_tag OK discuzx.pre_common_tagitem OK discuzx.pre_common_task OK discuzx.pre_common_taskvar OK discuzx.pre_common_template OK discuzx.pre_common_template_block OK discuzx.pre_common_template_permission OK discuzx.pre_common_uin_black OK discuzx.pre_common_usergroup OK discuzx.pre_common_usergroup_field OK discuzx.pre_common_word OK discuzx.pre_common_word_type OK discuzx.pre_connect_feedlog OK discuzx.pre_connect_memberbindlog OK discuzx.pre_connect_tlog OK discuzx.pre_forum_access OK discuzx.pre_forum_activity OK discuzx.pre_forum_activityapply OK discuzx.pre_forum_announcement OK discuzx.pre_forum_attachment OK discuzx.pre_forum_attachment_0 OK discuzx.pre_forum_attachment_1 OK discuzx.pre_forum_attachment_2 OK discuzx.pre_forum_attachment_3 OK discuzx.pre_forum_attachment_4 OK discuzx.pre_forum_attachment_5 OK discuzx.pre_forum_attachment_6 OK discuzx.pre_forum_attachment_7 OK discuzx.pre_forum_attachment_8 OK discuzx.pre_forum_attachment_9 OK discuzx.pre_forum_attachment_unused OK discuzx.pre_forum_attachtype OK discuzx.pre_forum_bbcode OK discuzx.pre_forum_creditslog OK discuzx.pre_forum_debate OK discuzx.pre_forum_debatepost OK discuzx.pre_forum_faq OK discuzx.pre_forum_forum OK discuzx.pre_forum_forum_threadtable OK discuzx.pre_forum_forumfield OK discuzx.pre_forum_forumrecommend OK discuzx.pre_forum_groupcreditslog OK discuzx.pre_forum_groupfield OK discuzx.pre_forum_groupinvite OK discuzx.pre_forum_grouplevel OK discuzx.pre_forum_groupranking OK discuzx.pre_forum_groupuser OK discuzx.pre_forum_imagetype OK discuzx.pre_forum_medal OK discuzx.pre_forum_medallog OK discuzx.pre_forum_memberrecommend OK discuzx.pre_forum_moderator OK discuzx.pre_forum_modwork OK discuzx.pre_forum_onlinelist OK discuzx.pre_forum_order OK discuzx.pre_forum_poll OK discuzx.pre_forum_polloption OK discuzx.pre_forum_pollvoter OK discuzx.pre_forum_post OK discuzx.pre_forum_post_1 OK discuzx.pre_forum_post_2 OK discuzx.pre_forum_post_tableid OK discuzx.pre_forum_postcomment OK discuzx.pre_forum_postlog OK discuzx.pre_forum_postposition OK discuzx.pre_forum_poststick OK discuzx.pre_forum_promotion OK discuzx.pre_forum_ratelog OK discuzx.pre_forum_relatedthread OK discuzx.pre_forum_replycredit OK discuzx.pre_forum_rsscache OK discuzx.pre_forum_spacecache OK discuzx.pre_forum_statlog OK discuzx.pre_forum_thread OK discuzx.pre_forum_threadclass OK discuzx.pre_forum_threadimage OK discuzx.pre_forum_threadlog OK discuzx.pre_forum_threadmod OK discuzx.pre_forum_threadpartake OK discuzx.pre_forum_threadrush OK discuzx.pre_forum_threadtype OK discuzx.pre_forum_trade OK discuzx.pre_forum_tradecomment OK discuzx.pre_forum_tradelog OK discuzx.pre_forum_typeoption OK discuzx.pre_forum_typeoptionvar OK discuzx.pre_forum_typevar OK discuzx.pre_forum_warning OK discuzx.pre_home_album OK discuzx.pre_home_album_category OK discuzx.pre_home_appcreditlog OK discuzx.pre_home_blacklist OK discuzx.pre_home_blog OK discuzx.pre_home_blog_category OK discuzx.pre_home_blogfield OK discuzx.pre_home_class OK discuzx.pre_home_click OK discuzx.pre_home_clickuser OK discuzx.pre_home_comment OK discuzx.pre_home_docomment OK discuzx.pre_home_doing OK discuzx.pre_home_favorite OK discuzx.pre_home_feed OK discuzx.pre_home_feed_app OK discuzx.pre_home_friend OK discuzx.pre_home_friend_request OK discuzx.pre_home_friendlog OK discuzx.pre_home_notification OK discuzx.pre_home_pic OK discuzx.pre_home_picfield OK discuzx.pre_home_poke OK discuzx.pre_home_pokearchive OK discuzx.pre_home_share OK discuzx.pre_home_show OK discuzx.pre_home_specialuser OK discuzx.pre_home_userapp OK discuzx.pre_home_userappfield OK discuzx.pre_home_viewlog OK discuzx.pre_home_visitor OK discuzx.pre_portal_article_content OK discuzx.pre_portal_article_count OK discuzx.pre_portal_article_related OK discuzx.pre_portal_article_title OK discuzx.pre_portal_article_trash OK discuzx.pre_portal_attachment OK discuzx.pre_portal_category OK discuzx.pre_portal_category_permission OK discuzx.pre_portal_comment OK discuzx.pre_portal_rsscache OK discuzx.pre_portal_topic OK discuzx.pre_portal_topic_pic OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.general_log OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Running ‘mysql_fix_privilege_tables’… OK

再重启下mysql就可以使用. mysql5.1的myisam,innodb共享或单表都可以顺利升到5.5. 需注意字符编码,-skip-locking参数,innodb共享池及日志大小.

Posted in Mysql.

Tagged with , , , .


mysql InnoDB 版本一览

mysql 5.6.3-m6 的innodb版本为 1.2.3

查看版本方法,可以看到大版本

  • SELECT * FROM information_schema.plugins;
  • SELECT @@innodb_version;

MySQL 5.5:

MySQL Plugin Status Date
5.5.18 1.1.8 GA 11/16/2011
5.5.17 1.1.8 GA 10/19/2011
5.5.16 1.1.8 GA 09/15/2011
5.5.15 1.1.8 GA 07/28/2011
5.5.14 1.1.8 GA 07/05/2011
5.5.13 1.1.7 GA 05/31/2011
5.5.12 1.1.6 GA 05/05/2011
5.5.11 1.1.6 GA 04/07/2011
5.5.10 1.1.5 GA 03/15/2011
5.5.9 1.1.5 GA 02/07/2011
5.5.8 1.1.4 GA 12/03/2010
5.5.7 1.1.3 GA 10/14/2010
5.5.6 1.1.2 GA 09/13/2010
5.5.5 1.1.1 Early Adopter 06/06/2010 *3
5.5.4 1.1.0 Beta 04/09/2010 *2
5.5.3 1.0.6 RC 03/24/2010
5.5.2 1.0.6 RC 02/12/2010
5.5.1 1.0.6 RC 01/04/2010
5.5.0 1.0.5 RC 12/07/2009 *1

*1: The InnoDB Plugin is included in MySQL 5.5 releases as the built-in version of InnoDB.

*2: InnoDB has been upgraded to version 1.1. This version is considered of Beta quality.

*3: InnoDB has been upgraded to version 1.1.1. This version is considered of “early adopter” quality.

MySQL 5.1:

MySQL Plugin Status Date
5.1.60 1.0.17 GA 11/16/2011
5.1.59 1.0.17 GA 09/15/2011
5.1.58 1.0.17 GA 07/05/2011
5.1.57 1.0.16 GA 05/05/2011
5.1.56 1.0.15 GA 03/01/2011
5.1.55 1.0.15 GA 02/07/2011
5.1.54 1.0.14 GA 11/26/2010
5.1.53 1.0.13 GA 11/03/2010
5.1.52 1.0.13 GA 10/11/2010
5.1.51 1.0.12 GA 09/10/2010
5.1.50 1.0.11 GA 08/03/2010
5.1.49 1.0.10 GA 07/09/2010
5.1.48 1.0.9 GA 06/02/2010
5.1.47 1.0.8 GA 05/06/2010
5.1.46 1.0.7 GA 04/06/2010
5.1.45 1.0.6 RC 03/01/2010
5.1.44 1.0.6 RC 02/04/2010
5.1.43 1.0.6 RC 01/15/2010
5.1.42 1.0.6 RC 12/15/2009
5.1.41 1.0.5 RC 11/05/2009 *4
5.1.40 1.0.4 Beta 10/06/2009
5.1.39 1.0.4 Beta 09/04/2009
5.1.38 1.0.4 Beta 09/01/2009 *3
x.x.xx 1.0.3 Alpha 03/11/2009
x.x.xx 1.0.2 Alpha 12/01/2008
x.x.xx 1.0.1 Alpha 05/08/2008 *2
x.x.xx 1.0.0 Alpha 04/15/2008 *1

*1: The initial release of the InnoDB Plugin is based on the built-in InnoDB in MySQL version 5.1.

*2: These 4 versions (1.0.0 – 1.0.3) were only available as separate downloads.

3: 1st Release of Plugin (see 1* below for more details)

*4: InnoDB Plugin has been upgraded to version 1.0.5. This version is considered of Release Candidate (RC) quality.

MariaDB:

MariaDB Plugin Status Date Comments
5.1.55 1.0.15 GA 03/01/11 If use InnoDB Plugin
5.1.55 1.0.15-12.5 GA 03/01/11 If use built-in InnoDB, which is XtraDB+ in MariaDB *1
5.2.9 1.0.15-12.7 GA 09/22/11
5.3.2 1.0.15-12.7 GA 10/14/11

*1: XtraDB+ differs some from XtraDB as it contains even further enhancements on top of XtraDB. Please see the following 2 links for more details on these differences:

http://kb.askmonty.org/en/mariadb-53-asynchronous-io-on-windows-with-innodb (work by Wlad) http://www.facebook.com/note.php?note_id=10150211546215933 (work by KNielsen)

There are even some more optimizer additions, but no graphs yet to report.

Changelogs:

Note: The plugin versions had their own changelogs initially, but eventually the changes were just mixed into the general changelogs for the MySQL Server.

Note: Also, some plugin versions span multiple MySQL versions, so those have multiple links below.

Plugin 1.0:

1.0.0  http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-100.html
1.0.1   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-101.html
1.0.2   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-102.html
1.0.3   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-103.html
1.0.4   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-104.html
1.0.5   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-105.html
1.0.6   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-106.html
1.0.7   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-107.html
1.0.8   http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-108.html
1.0.9   http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.html
1.0.10  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-49.html
1.0.11  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html
1.0.12  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html
1.0.13  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-52.html
    http://dev.mysql.com/doc/refman/5.1/en/news-5-1-53.html
1.0.14  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-54.html
1.0.15  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-55.html
    http://dev.mysql.com/doc/refman/5.1/en/news-5-1-56.html
1.0.16  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-57.html
1.0.17  http://dev.mysql.com/doc/refman/5.1/en/news-5-1-58.html
    http://dev.mysql.com/doc/refman/5.1/en/news-5-1-59.html
    http://dev.mysql.com/doc/refman/5.1/en/news-5-1-60.html

Plugin 1.1:

1.1.0  http://dev.mysql.com/doc/innodb/1.1/en/innodb-changes-11.html
1.1.1   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-5.html
1.1.2   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-6.html
1.1.3   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-7.html
1.1.4   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-8.html
1.1.5   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-9.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-10.html
1.1.6   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-11.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-12.html
1.1.7   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-13.html
1.1.8   http://dev.mysql.com/doc/refman/5.5/en/news-5-5-14.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-15.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-17.html
    http://dev.mysql.com/doc/refman/5.5/en/news-5-5-18.html

Misc. Notes:

5.1.38 is first release of the plugin

http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html

And for reference, here is the text from that announcement regarding the InnoDB Plugin:

C.1.1. Changes in MySQL 5.1.38

  As of MySQL 5.1.38, the InnoDB Plugin is included in MySQL
  releases, in addition to the built-in version of InnoDB that
  has been included in previous releases. This version of the
  InnoDB Plugin is 1.0.4 and is considered of Beta quality.

  The InnoDB Plugin offers new features, improved performance
  and scalability, enhanced reliability and new capabilities
  for flexibility and ease of use. Among the features of the
  InnoDB Plugin are "Fast index creation," table and index
  compression, file format management, new INFORMATION_SCHEMA
  tables, capacity tuning, multiple background I/O threads, and
  group commit.

  For information about these features, see the InnoDB Plugin
  Manual at

http://www.innodb.com/products/innodb_plugin/plugin-documentation

  For general information about using InnoDB in MySQL,
  see Section 13.6, "The InnoDB Storage Engine."

  The InnoDB Plugin is included in source and binary
  distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64,
  ia64), and generic Linux RPM packages.

  To use the InnoDB Plugin, you must disable the built-in
  version of InnoDB that is also included and instruct the
  server to use InnoDB Plugin instead. To accomplish this, use
  the following lines in your my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so

  For the plugin-load option, innodb is the name to associate
  with the plugin and ha_innodb_plugin.so is the name of the
  shared object library that contains the plugin code. The
  extension of .so applies for Unix (and similar) systems. For
  HP-UX on HPPA (11.11) or Windows, the extension should be .sl
  or .dll, respectively, rather than .so.

  If the server has problems finding the plugin when it starts
  up, specify the pathname to the plugin directory. For
  example, if plugins are located in the lib/mysql/plugin
  directory under the MySQL installation directory and you have
  installed MySQL at /usr/local/mysql, use these lines in your
  my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
    plugin_dir=/usr/local/mysql/lib/mysql/plugin

  The previous examples show how to activate the storage engine
  part of InnoDB Plugin, but the plugin also implements several
  InnoDB-related INFORMATION_SCHEMA tables. (For information
  about these tables, see

http://www.innodb.com/doc/innodb_plugin-1.0/innodb-information-schema.html)

  To enable these tables, include additional name=library
  pairs to the plugin-load option:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
      ;innodb_trx=ha_innodb_plugin.so
      ;innodb_locks=ha_innodb_plugin.so
      ;innodb_cmp=ha_innodb_plugin.so
      ;innodb_cmp_reset=ha_innodb_plugin.so
      ;innodb_cmpmem=ha_innodb_plugin.so
      ;innodb_cmpmem_reset=ha_innodb_plugin.so

  The plugin-load option here is formatted on multiple lines
  for display purposes but should be written in my.cnf using a
  single line without spaces in the option value. On Windows,
  substitute .dll for each instance of the .so extension.

  After the server starts up, verify that InnoDB Plugin has
  been loaded by using the SHOW PLUGINS statement. For example,
  if you have loaded the storage engine and the
  INFORMATION_SCHEMA tables, the output should include lines
  similar to these:

    mysql> SHOW PLUGINS;
    +---------------------+--------+--------------------+---------------------...
    | Name                | Status | Type               | Library             ...
    +---------------------+--------+--------------------+---------------------...
    | InnoDB              | ACTIVE | STORAGE ENGINE     | ha_innodb_plugin.so ...
    | INNODB_TRX          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_LOCKS        | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP_RESET    | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM       | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    +---------------------+--------+--------------------+---------------------...

  If you build MySQL from a source distribution, InnoDB Plugin
  is one of the storage engines that is built by default. Build
  MySQL the way you normally do; for example, by using the
  instructions at Section 2.10, "MySQL Installation Using a
  Source Distribution." After the build completes, you should
  find the plugin shared object file under the
  storage/innodb_plugin directory, and make install should
  install it in the plugin directory. Configure MySQL to use
  InnoDB Plugin as described earlier for binary distributions.

Misc Links:

http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-introduction.html http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes.html http://dev.mysql.com/doc/refman/5.5/en/innodb-5-5.html http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-installation.html

转自:http://www.chriscalender.com/?p=479

Posted in Mysql.

Tagged with , .


内存问题服务器死机一例

硬件:R410 E56062 4G6 Hynix 4GB18-H9 系统:centos5.5

服务器半天左右就会死机一次 tail /var/log/messages

Nov 25 09:28:20 c1g kernel: Machine check events logged Nov 25 09:33:20 c1g kernel: Machine check events logged Nov 25 09:38:20 c1g kernel: Machine check events logged Nov 25 09:43:20 c1g kernel: Machine check events logged Nov 25 09:48:20 c1g kernel: Machine check events logged Nov 25 09:53:20 c1g kernel: Machine check events logged Nov 25 10:03:20 c1g kernel: Machine check events logged Nov 25 10:08:20 c1g kernel: Machine check events logged Nov 25 10:13:20 c1g kernel: Machine check events logged Nov 25 10:18:20 c1g kernel: Machine check events logged Nov 25 10:23:20 c1g kernel: Machine check events logged Nov 25 10:28:20 c1g kernel: Machine check events logged Nov 25 10:44:46 c1g syslogd 1.4.1: restart.

tail -n100 /var/log/mcelog

HARDWARE ERROR. This is *NOT* a software problem! Please contact your hardware vendor CPU 2 BANK 8 TSC 69cd4ba150c [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)] MISC c1ac44000081282 ADDR 5fa5c8580 MCG status: MCi status: Error overflow MCi_MISC register valid MCi_ADDR register valid MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR Transaction: Memory read error STATUS cc0001800001009f MCGSTATUS 0 MCE 2 HARDWARE ERROR. This is *NOT* a software problem! Please contact your hardware vendor CPU 6 BANK 8 TSC 69cd4ba18ca [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)] MISC c1ac44000081282 ADDR 5fa5c8580 MCG status: MCi status: Error overflow MCi_MISC register valid MCi_ADDR register valid MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR Transaction: Memory read error STATUS cc0001800001009f MCGSTATUS 0 MCE 3 HARDWARE ERROR. This is *NOT* a software problem! Please contact your hardware vendor CPU 4 BANK 8 TSC 69cd4ba1595 [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)] MISC c1ac44000081282 ADDR 5fa5c8580 MCG status: MCi status: Error overflow MCi_MISC register valid MCi_ADDR register valid MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR Transaction: Memory read error STATUS cc0001800001009f MCGSTATUS 0

日志中记录了内存出错,原来有24G内存拔掉了一根4G后问题没有再出现.

Posted in 技术.

Tagged with , .


Lempelf一键包 更新到1.0.1

做了点小小更新

ChangeLog

2011-11-30 发布Lempelf 1.0.1 支持32位ZendOptimizer 增加操作用户输入密码提示 增加可以自定义ssh端口 增加centos6的yum支持 增加内核shmmax优化修正eaccelerator.shm_size错误 修正php的cgi.fix_pathinfo参数 修改net.ipv4.tcp_max_tw_buckets = 15000 nginx更新到0.8.55 不关闭messagebus服务 yum 增加perl-ExtUtils-MakeMaker 安装mysql时自动删除 /etc/my.cnf toolkits下增加采集系统信息脚本

https://blog.c1gstudio.com/lempelfpage

Posted in Lempelf一键包, 技术.

Tagged with .