select timediff(now(),convert_tz(now(),@@session.time_zone,’+00:00′));
Related Articles
How to Get Size of a Database in Mysql
To Get Data Base Size in MB and Free Space in MBSELECT table_schema “dbName”, sum( data_length + index_length ) / 1024 / 1024 “Data Base Size in MB”, sum( data_free )/ 1024 / 1024 “Free Space in MB”FROM information_schema.TABLESGROUP BY table_schema ; To Get Size in GB: SELECT sum(round(((data_length + index_length) / 1024 […]
How to take Backup of MYSQL database sql file using MYSQLDUMP Command
For a single database: mysqldump –opt –user=root –password database1 > singledb.sql For multiple Backup of databases: mysqldump –opt –user=root –password –databases database1 database2 > multipledb.sql To import a MYSQL .sql file from one location to particular location : source /home/SSI/process_databases_backup.sql
Export to Excel Using PHP and Mysql
Below simple program will export mysql data values to excel sheet without using any PHP libraries. Export to Excel Using PHP and Mysql Note: IF you get errors or in excel all the data is in one column, then instead t tab space use, comma ‘,’.