GICT knowledge base
MySQL FLUSH Commands.
Published
Flush privileges
mysql> FLUSH PRIVILEGES;
when we grant some privileges for a user, running the command flush privileges will reloads the grant tables in the mysql database enabling the changes to take effect without reloading or restarting mysql service.
Flush TABLES
mysql> FLUSH TABLES;
The command closes all tables which are currently open or in use. And clears cache which intern make better utilization on available memory.
Flush HOSTS
mysql> FLUSH HOSTS;
The command uses host cache tables, if maximum number of connections has been reached for a particular host, mysql server will not able to make new connections. flushing host tables resets the process and again allows the connections for particular HOST.
Flush LOGS
mysql> FLUSH LOGS;
The command closes and reopens all log files, if log files are to big and taking more time to load then you can run the command which will create an empty log file.
Related guides
Check MariaDB Versions and Compatibility on Shared Hosting
Check your actual MariaDB/MySQL server version, maintenance coverage and application requirements before requesting a shared-hosting upgrade or move.
MySQLHow to Monitor MySQL Database Server Performance
Learn how to monitor MySQL performance with 4 essential Linux command-line tools.
MySQLHow to secure MySQL connections with SSL on Ubuntu
MySQL allows remote connections and we must protect data transfer happeneing between servers with SSL. Follow this tutorial to learn how.
MySQLHow to set up High Availability WordPress with HyperDB
HyperDB is a drop-in plugin that allows you to set up High Availability WordPress site that can work with multiple database servers at once.
