In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
#! / bin/sh
# Author:Luojq
BAKTIME=$ (date +% Y-%m-%d%H:%M:%S)
USER_PSWD=123456
USER_NAME=root
MYLOGIN= "mysql-u$ {USER_NAME}-p$ {USER_PSWD}"
DUMP_CMD= "/ usr/bin/mysqldump-u ${USER_NAME}-p$ {USER_PSWD}-B-master-data=2-- single_transaction-- flush-logs-- skip-add-drop-table"
DATABASE= "$($MYLOGIN-e" show databases; "| egrep-vi" _ schema | mysql ")"
For dbname in ${DATABASE}
Do
MYDIR=/data/backup/$ {dbname}
[!-d ${MYDIR}] & & mkdir-p ${MYDIR}
$DUMPCMD ${dbname} | gzip > ${MYDIR} / ${dbname} ${BAK_TIME} .sql.gz
Done
Mysql common commands
Show processlist; # looks at the SQL statements that are being executed in the database and may not be able to see the complete SQL statements.
Show full processlist; # view the full SQL statement being executed and show it in its entirety.
Set global key_buffer_size = 1024102432; # adjust the database parameters without restarting the database, which will take effect directly and become invalid after restart.
Show variables; # check the configuration parameters of the database, such as the validity of the parameters in my.cnf.
Kill id command to kill the thread, id is the thread number (under mysql)
Show status views database state information for the current session.
Show global status looks at the running status information of the entire database. It is very important to analyze and monitor.
Show engine innodb status displays the performance status of the innodb engine
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.