computer_setup:mysql
This is an old revision of the document!
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;
computer_setup/mysql.1625309249.txt.gz · Last modified: 2021/07/03 10:47 by peter