Ubuntu 16.04 LTS has been out for a little while now, and its standard repos offer some nice enhancements over Ubuntu 14: Apache 2.4.18, PHP 7, and MySQL 5.7.12 The process for creating a basic LAMP web server is also streamlined, as a couple of bugs that plagued Ubuntu 14.04 are now eliminated. To create […]
Tag: MySQL
Stupid SQL Tricks
Joins This intends to provide a brief summary of JOIN operations. I’m attempting to follow standard SQL here where possible, thus avoiding, say, Oracle terminology like ANTIJOIN and SEMIJOIN. All SQL databases that I’ve encountered perform LEFT/RIGHT/INNER JOIN as expected, but others will show some variation. When in doubt, refer to your documentation. The generic […]
Reset the MySQL Root Password
So you don’t know your MySQL root password but you do have the root password of the server. Here’s a quick way to reset your MySQL root password on the command line: 1. Stop MySQL 2. Start MySQL in safe mode without a password 3. Log into your database server without a password, and reset […]
Back Up MySQL Databases
A simple bash script to back up MySQL databases. This backs up every database on the server to individual gzipped files in the directory you specify so that you can easily restore them separately. If you want it to run everyday, save it with an .sh extension and add it to the crontab of an […]
Ubuntu Email Server with Postfix, Dovecot, and MySQL
————— Update November 2021: Added instructions for using Dovecot and Postfix with Let’s Encrypt. Also adjusted Postfix config to block auth attempts over port 25. This setup will get you 90%+ on mail server security tests. ————— ————— Update November 2020: If you’re on Ubuntu 20.04, these instructions still mostly work as written. There is […]