Computer Setup - MySQL

vi /etc/mysql/mysql.conf.d/mysqld.cnf 
vi mysqld_safe_syslog.cnf 
systemctl restart mysql.service 
 
mysqltuner
most /var/log/mysql/mysql.log
 
./mysql_tuner.pl
most /var/log/mysql/mysql-slow.log
 
vi mysql_users.sh
./mysql_users.sh 127.0.0.1
./mysql_users.sh localhost
 
mysql_optimize_tables.sh
mysql_optimize_tables_ex.sh
 
vi mysql_grant_all.sh
 
vi mysql_find_fragmented_tables.sh
 
mysql -u root -p
 
mysql -u root --password=xxxx -h 127.0.0.1 -e "SELECT user, host from user"
mysql -u root --password=xxxx -h 127.0.0.1 -e "SELECT user, host from user" mysql
 
select  ENGINE, TABLE_NAME,Round( DATA_LENGTH/1024/1024) as data_length , round(INDEX_LENGTH/1024/1024) as index_length, round(DATA_FREE/ 1024/1024) as data_free from information_schema.tables  where  DATA_FREE > 0;
 
./hist_to_mysql.sh 
 
mysqldump -uroot -p --opt --routines --add-drop-database --default-character-set=utf8 --create-options --all-databases | bzip2 > db-20160611.bz2