mysql

Useful Commands

  • show status; (gives list of lots of internal values for the running mysql server)
  • show variables; (shows a list of mysql system variables)
  • show variables like 'max_connections'; (get a particular system variable)
  • show processlist;  (shows list of currently running connections, if a query is running it will be shown in right most column)
  • KILL PROCESSID; kills a running query, ID obtained from show processlist command

max_connect_errors

  • "This variable determines how many interrupted connections can occur from a host. If the number of interrupted connections from this host surpasses this number, that host is blocked from further connections."
  • If a successful connection completes from the host, the counter should be set to 0.
  • Default value of max_connect_errors is 10.
  • Can clear it out with the command mysqladmin flush-hosts

Permissions for backup

GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to backup@localhost
 IDENTIFIED BY 'readonly';
FLUSH PRIVILEGES;
Taxonomy: