MySQL who: See who is connected to your MySQL server with this script

February 29, 2016

Need to determine who is connected to your MySQL server and how many connections they have open? I tossed together this little script to display the information. [bash] #!/usr/bin/perl use DBI; use 5.010; use Getopt::Long; # Set defaults my $host = ‘localhost’; my $db = ‘information_schema’; my $user = ”; my $pass = ”; #

Script to convert MySQL collation from utf8mb4 to utf8

May 11, 2015

I ran into a strange situation with WordPress where the MySQL server did not support utf8mb4. I needed to quickly convert the tables back to utf8 to get the site running again. Though this script does work I highly recommend if you are running WordPress that you upgrade your MySQL server to support utf8mb4 for

Script to convert MySQL from InnoDB to MyISAM

May 11, 2015

If you need to convert all the MySQL tables in a database from InnoDB to MyISAM here is a handy script to automate the process for you. [bash] #!/bin/bash DB=’your_database_name’ USER=’your_db_user’ PASS=’your_db_pass’ TABLES=$(mysql -p$PASS -u $USER –skip-column-names -B -D $DB -e ‘show tables’) for T in $TABLES do mysql -p$PASS -u $USER -D $DB -e

List column names in a MySQL table

March 17, 2015

This will allow you to quickly and easily select a list of column names from a MySQL table. SELECT distinct column_name FROM information_schema.columns WHERE table_name='{YOUR TABLE NAME}’

First Experiences with WebMatrix 2 and Windows Azure Website

February 16, 2013

WebMatrix is a free web development tool produced by Microsoft. WebMatrix is a complete development environment that not only provides a code editor, it also creates a new private instance of IIS Express to debug your project in, and downloads any dependencies your project may need, I.E. SQL Server Express, MySQL, PHP, etc. I was