GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.83';
Size of mysql DB
SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;
MySql DB Dump
Dump for whole DB
mysqldump --single-transaction -h[hostname] -u[username] -p[password] [dbname] > uat_mysql_dump_25Nov
Dump data from one query based on some condition:
mysqldump --single-transaction --extended-insert=FALSE -h[hostname] -u[username] -p[password] [dbname] [tablename] --where="[columnname1]=8000 and [columnname2]=18000"
Increasing Memory for Mysql DB
mysqld --innodb_buffer_pool_size=500M
Setting TimeZone
SELECT @@global.time_zone;
SET GLOBAL time_zone = '+00:00';
SET time_zone = "+00:00";
SHOW GLOBAL VARIABLES WHERE variable_name LIKE '%buffer%'