Skip to content

Tricks List for Daily work with MySQL (5.7) for Web Developers / Ubuntu

Design vector created by freepik -

This list will be updated periodically. Every time I feel that something will be useful and make my life easier :)

Create daily backups of your working database set on your desktop/dev machine

  1. Open console as root
  2. Paste in console:
    crontab -e
  3. Edit the user, password, path and filename pattern, the desired time to run the job and paste in crontab:
    10 11 * * * mysqldump -u root -p<password> --all-databases | gzip > /<path>/local_database_$(date +\%Y-\%m-\%d).sql.gz

    hint: use amazing site if you want the validate your cron jobs periods.

  4. Save
  5. Check with this command your result (after at least on cron cycle)
    grep CRON /var/log/syslog


Check your free space from a console in Treesize style

sudo du -chd 1 | sort -hr


Install HeidiSQL in Ubuntu

check this link from AskUbuntu


Views: 48

Leave a Reply

Your email address will not be published. Required fields are marked *