Skip to content

Instantly share code, notes, and snippets.

@Igor-Lopes
Created June 22, 2016 11:46
Show Gist options
  • Save Igor-Lopes/639ecf4169a66a603979353aa2d0ba91 to your computer and use it in GitHub Desktop.
Save Igor-Lopes/639ecf4169a66a603979353aa2d0ba91 to your computer and use it in GitHub Desktop.

MySQL conf file location:

/etc/my.cnf

Change Max connections parameters:

max_connections = 500

Print on terminal value of max_connections:

echo "show variables like 'max_connections';" | mysql -u root -p

SQL query lists database name and sizes

SELECT table_schema "DB Name", sum(data_length + index_length)/ 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment