partition by range innodb discard tablespace

https://bobcares.com/blog/database-crash-rescue-how-we-re-built-an-innodb-mysql-database-when-ibdata1-file-was-corrupted/ https://www.percona.com/blog/2014/10/14/recover-orphaned-innodb-partition-tablespaces-in-mysql/

2017-04-27 · 1 min · 2 words · Me

ooo

apt-get install mysql-utilities 查table statement mysqlfrm –diagnostic xxxxoooo.frm > t.sql remove t.sql not sql statme mysql -u root -pxxxooo database < t.sql

2017-04-27 · 1 min · 22 words · Me

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/ ...

2017-04-26 · 1 min · 154 words · Me

install mariadb finish give root all connect and grant

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 UPDATE mysql.user SET Grant_priv=‘Y’, Super_priv=‘Y’ WHERE User=‘root’; ...

2017-04-26 · 1 min · 93 words · Me

optimizing mysql for high concurrency on amazon

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.THREAD_ID = 0, ‘Internal Thread’, CONCAT(IPS.USER, ‘@’, IPS.HOST)) USER, DB, COMMAND, STATE, TIME, EVENT_NAME LAST_WAIT, IF(TIMER_WAIT IS NULL , ‘Still Waiting’, TIMER_WAIT/1000000000) LAST_WAIT_MS FROM performance_schema.events_waits_current JOIN performance_schema.threads PPS USING (THREAD_ID) LEFT JOIN INFORMATION_SCHEMA.PROCESSLIST IPS ON IPS.ID = PPS.THREAD_ID; ...

2017-04-22 · 1 min · 111 words · Me