percona stand my.cnf

https://tools.percona.com/wizard/ # Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208 # Configuration name server generated for at 2017-04-26 15:24:40 [mysql] # CLIENT # port = 3306 socket = /var/lib/mysql/mysql.sock [mysqld] # GENERAL # user = mysql default-storage-engine = InnoDB socket = /var/lib/mysql/mysql.sock pid-file = /var/lib/mysql/mysql.pid # MyISAM # key-buffer-size = 32M myisam-recover = FORCE,BACKUP # SAFETY # max-allowed-packet = 16M max-connect-errors = 1000000 # DATA STORAGE # datadir = /var/lib/mysql/

繼續閱讀

create user ‘root’@'%' identified by ‘password’;  grant ALL PRIVILEGES on *.* to ‘root’@'%' with grant option; flush privileges; if error have root@localhost delete from mysql.user where user=‘root’; flush privileges; create user ‘root’@'%' identified by ‘password’; grant ALL PRIVILEGES on *.* to ‘root’@'%' with grant option; select user, host from user; show grants for ‘root’@'%'; FLUSH PRIVILEGES; =====restore root privileges===== http://stackoverflow.com/questions/1709078/how-can-i-restore-the-mysql-root-user-s-full-privileges

繼續閱讀

http://tech.noredink.com/post/133347435578/optimizing-mysql-for-high-concurrency-on-amazon Looking for concurrency bottlenecks performance schema List the total maximum wait by event inside of InnoDB SELECT EVENT_NAME, SUM_TIMER_WAIT/1000000000 WAIT_MS, COUNT_STAR FROM performance_schema.events_waits_summary_global_by_event_name ORDER BY SUM_TIMER_WAIT DESC, COUNT_STAR DESC LIMIT 30; List current and last wait events on InnoDB. -- “what the current, or last completed, wait for each session was, and for exactly how long they waited” SELECT NAME, IF(PPS.

繼續閱讀

mysql 備份

http://codego.net/10343891/ 1.逻辑备份(mysqldump的,由脚本)锁定数据库。这将破坏客户端端端操作。 我的方法备份关键任务数据库InnoDB的OpenSolaris上,并采取DATADIR和日志目录的日常ZFS快照。 这些快照,然后复制到离线服务器。 因为InnoDB的是事务性和快照是atomicity,也没有必要关闭在创建快照之前的服务器(回收来自它就像复苏的表单突然停电:InnoDB支持它)。

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan