The database model behind WordPress doesn’t follow several good database design rules and conventions. When we’re designing a database for a specific purpose, knowing all its desired functionalities in advance, we can follow all of those rules. But WordPress needs to cover anything that anyone could have in mind, so sacrificing foreign keys and using ..
JSON data can be stored in TEXT and VARCHAR columns, but having an data type specifically for JSON is fun. JSON Labs Release: Native JSON Data Type and Bin..
Enable MySQL Event Scheduler Start MySQL event scheduler by executing following query in PhpMyAdmin or MySQL command prompt.
SET GLOBAL event_scheduler = ON;
SET GLOBAL event_scheduler = 1;
Create a Event Here the following event will run everyday and clear/delete 10 days old data fromcart table based on time stamp
CREATE EVENT newEvent
ON SCHEDULE EVERY 1 DAY
DELETE FROM cart WHERE created_at <= DATE_SUB(NOW(), INTERVAL 10 DAY) ;
View Event Show all the running events. [crayon-5ba3c636ee29d21508943..
There are several strategies for backup, snapshot, dump, dump binlog, it all depends on your need and the size of your database. I’ll explain a little about the tool provides by MySQL, which is the mysqldump , I indicate this tool for databases that have 15gb/20gb even more than that, the probability that you have ..
As with version 10.0.1, it is now possible to use multiple masters as source for single slave node as replication topology. This link can help you set up the replication from a single master. To add more masters just use the ‘CHANGE MASTER TO’ command and use different master addresses. Update: Follow this to setup ..
Apply Percona best practices to achieve better MySQL database performance and avoid the time, complexity, and risk of customizing a my.cnf configuration on your own. Simply copy and paste the results of the Percona Configuration Wizard for MySQL into your my.cnf file. Tens of thousands of MySQL users have already used this tool to improve ..
AN sample below to write an update query that should be executed based on a select query and conditions. [crayon-5ba3c636ee8b28..