---
title: "Magento MySQL clean-up"
date: "2012-04-04"
modified: "2013-03-04"
path: "/81-magento-mysql-clean-up.html"
section: "/ramblings"
aliases:
  - "/81"
  - "/81-magento-mysql-clean-up"
  - "/81.html"
  - "/ramblings/81-magento-mysql-clean-up.html"
---

Cleanup Magento database tables, including old quotes that never made it to checkout:

<https://gist.github.com/5082859>

This can be setup to run daily via CRON using a simple shell script:

```
#!/bin/sh
/usr/bin/mysql -u root -ppassword < /client/magento-clean.sql
```
