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
https://my-netdata.io/
character-set-server = utf8mb4
#tunning
skip_name_resolve = 1
open_files_limit = 65535
max_connect_errors = 1000000
table_open_cache = 1024
table_definition_cache = 1024
#table_open_cache_instances = 64 #MySQL 5.6
sort_buffer_size = 4M
join_buffer_size = 4M
interactive_timeout = 600
wait_timeout = 600
tmp_table_size = 32M
max_heap_table_size = 32M
#master_info_repository = TABLE #MySQL 5.6
#relay_log_info_repository = TABLE #MySQL 5.6
#gtid_mode = on
#enforce_gtid_consistency = 1
read_buffer_size = 8M
read_rnd_buffer_size = 4M
bulk_insert_buffer_size = 64M
lock_wait_timeout = 3600
http://www.uuread.cc/cfaqxcQc.html
Kubernetes具備超強的故障恢復機制,Kubernetes會重啟意外停止的pod。我們曾遇到過因記憶體洩露,導致容器在一天內宕機多次的情況,然而令人驚訝的是,甚至我們自己都沒有察覺到。
資料儲存
以我們的情況,在Kubernetes內執行資料儲存沒有想象中那麼完美,設定起來也比其他Kubernetes部署複雜得多。
於是我們決定不在生產環境資料儲存上使用Kubernetes,而是選擇在不同的機器上手動啟動這些叢集,我們在Kubernetes內部執行的應用正常連線到資料儲存叢集
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.
https://medium.com/devoops-and-universe/database-performance-aws-vs-bare-metal-452f64481b07
https://mariadb.com/kb/en/mariadb/performance-schema-overview/