If you just need a quick way to get some data from a mysql database in your shell (bash), you could do something like this in one line: mysql -h your.server.edu -u db_username -p`cat /path/to/your/homedir/secretpasswordfile` -e “;use databasename; SELECT tablename.columnname FROM tablename where id like ‘421111’ and something like ‘1’ and option like ’23’;”; >

We had a lot of spam users in our multisite wordpress system. This was because we had self-registration enabled for a period. Not a smart thing to do… anyway, I wrote a bash script in order to find which users id’s from the Mysql database that could potentially be spam users. With this list of

I had to send emails to all the Blog admins in our WordPress Multisite installation. This is how I did it: [code lang=”php”] <?php # Alert Blog Admin php script # connect to blog db, select from, find all blog admin email adresses # get subject, body from pre-created local files, send the email #