Select Page
Delete MySQL/MariaDB Rows Older Than Date

Delete MySQL/MariaDB Rows Older Than Date

I ran into a problem recently where I needed to delete all rows in a MySQL table that were older than three months. To delete MySQL/MariaDB rows older than date xxxx-xx-xx, I was able to accomplish this with the following statement: MySQL DELETE FROM `table` WHERE...

Perform Basic MySQL Database Operations

Assuming you are a superuser, create a new database: Shell mysqladmin -p create db_name 1 mysqladmin -p create db_name Import data: Shell mysql -p db_name < db_name.sql 1 mysql -p db_name < db_name.sql Dump the db: Shell mysqldump -p --single-transaction db_name...