Tag Archives: mysql

Site backup script example

This handy script will backup a directory and database. To use, create a new file on your server, probably in your user’s root, called backup.sh and add the below, making sure to update the source and destination path varaibles and database name. To run the script, do this:

MySQL command line cheat sheet

Selecting a database Listing databases Listing tables in a db Describing the format of a table Creating a database Creating a table Inserting one row at a time Retrieving information (general) Fixing all records with a certain value Retrieving unique output records Sorting Date calculations MONTH(some_date) extracts the month value and DAYOFMONTH() extracts day. Pattern […]

Reset all user passwords in Joomla!

I found myself needing this script for some nonsense reason involving tech-averse users an an intranet. I decided to document it below for posterity. It’s real dirty, so use at your own risk.

Change the default Joomla! database table prefix

Don’t be a sucker. The easiest way to give a hacker a head start on your Joomla installation is to use the default table prefix for your database. In the 1.5 days, the installation process always defaulted to “jos_”, but nowadays, I think they’ve eliminated this security risk by generating a unique prefix for you. […]

MySQL backup and restore

Backing up Restoring a backup