Tunnelling through PuTTY to MySQL, using SQLyog

Let’s say you have a shared web hosting account on a random cheap provider, and the only way to access the MySQL server is to either connect from an SSH command line or use phpMyAdmin. While both of these options are okay, in some circumstances it’s not exactly wise to have a phpMyAdmin installation publically accessible, as it lends itself to repeated bruteforce attacks and is subject to server configuration changes. I know on my personal server, there have often been times that I’ve inadvertently left a myAdmin installation wide open for anyone to monkey with the database.

I also enjoy using an application called SQLyog, which is a Windows GUI tool for managing MySQL databases. The Community Edition of the application has proven to be more than sufficient for my random projects, and I highly suggest anyone doing database work on Windows take a look at the application.

Using some details from this article, with an updated version of PuTTY, here’s how I go about configuring my local system to connect to a remote MySQL server:

Start PuTTY:
PuTTY 01

Define your connection settings and save them:
PuTTY 02

Navigate to the Connection / SSH / Tunnels view, and provide the following settings:

Source Port: 3306
Destination: localhost:3306
(This assumes you don’t have a MySQL server running on your local machine. If you do, change localhost:3306 to localhost:freeport where freeport is the number of a free port on your workstation.)

PuTTY 03

Click the Add button, then save your connection settings. In the Forwarded Ports list, you should see L3306 localhost:3306.
Open the connection and sign in to the remote system.
PuTTY 04
Start SQLyog and define a connection to localhost:3306.
PuTTY 05
Your connection will be tunnelled through SSH to the remote server transparently. Make sure that you close SQLyog before you close the PuTTY tunnel.
PuTTY 06

Let me know how this works for your development situations – even if you have direct access to the MySQL server, you should still check out SQLyog for database development if you haven’t already tried it.

A weekend in PA, USA: No tax on clothing? Sign me up.

It’s Monday, and I’m back from a weekend excursion to the States. While some of my esteemed associates were doing pub crawls and partaking in other local festivities, my entire family opted to head down to an outlet mall in Grove City, PA to acquire some inexpensive American merchandise. As Dave’s Canadian retailers post mentions, there is really no excuse for some of the pricing disparities between Ontario and a comparable state.

And yes, the title of this post is accurate: On most clothing, there is no state sales tax, which is otherwise 6%. When you buy a ridiculously overpriced (yet trendy) sweater from, say, Hollister – the exorbitant price on the tag is the exorbitant price on the receipt, and nothing else goes to the government.

I speak specifically about a retailer like Hollister as I had the opportunity to go into one of these stores (this is in a different mall, not the Grove City outlets) while in the States. For those unfamiliar with them, the store is constructed like a beachfront cabin:

Hollister Storefront

The entire store’s construction is an overabundant exercise in target marketing to the 12-25 year old demographic. As soon as you walk on to the “deck”, there are two sides to the store – one for guys, one for girls. There’s also an immediate assault of their in-house scents, as well as overly obnoxious “surfer dude”-style music. If you’ve heard any pop/rock from Warped Tour – basically any new music produced by RIAA labels that isn’t screamo – that’s about what you’d hear. From memory – I heard songs from Halifax, Fall Out Boy, Paramore, and some group with a surfer-style remix of “Message in a Bottle”.

From a technical perspective, the music is customer-controllable by a touchscreen beside the cash register area, which would make an interesting programming project (think managed queues, plus audio output.) They also have the relevant CD’s for sale at the register, which is a good way to push merchandise from other categories. Hey, if you’ve heard the song in the store, why not pick up the entire album?

After nearly dropping my jaw at the prices of some of the shorts and jeans available there, I went to the clearance section (at the back of the store, obviously) and managed to pick up some decently priced items. I now own a new bathing suit, plus a few shirts that I haven’t gotten for free from software companies!

Next on the list of stores in the mall was a place called Steve & Barry’s, who specialize in incredibly inexpensive clothing, as well as hilariously inappropriate shirts. I purchased several of these items, which you will see in person over the next few weeks. Unfortunately one of the best shirts in the store wasn’t in stock at all: it was a map of the state, overlaid with an Amish buggy and a marker for the town of Intercourse. The caption on the shirt? “Intercourse, PA. Come again!”

The Grove City outlet mall is a haven for decent and cheap merchandise. The trick to the experience is shopping at stores that have “Outlet” or “Factory Store” in the title, and immediately going towards the back of the building towards the deals.

Possibly one of the best deals in the place, besides the ubiquitous clothing, was the Sony outlet store. A set of MDR-EX71SL earbuds that go for $60CDN are available, refurbished, for $19.99 US. The next model up (MDR-EX81SL) goes for $29.99 US. I’ve had the 71SL’s since last year’s trip, and the 81’s available this year are even better. I’d highly recommend these for anyone wanting a high-quality set of earbuds for their MP3 player.

Article Update, January 7, 2009

DEAR CHRIST, READ THIS BEFORE COMMENTING:

The Hollister depicted in the photo above is not the one in your mall. I guarantee it. All Hollister locations look the same in every mall; it’s part of their branding.

Emo bands = owned

Just got this snippet as part of an Amazon recommendations email for Anberlin’s Cities:

Unlike most emo bands that merely offer a laundry list of personal hardships over the sound of loud guitars, the members of Anberlin know that they can seek salvation in a higher power, so the songs on Cities aren’t so much about self-pity as self-preservation. It’s a refreshing twist on the formula, especially when paired with the industrial-strength hooks the spiritual Florida band knocks out on tracks like “Dismantle. Repair.” and “Godspeed.” On the latter, the group’s frontman Stephen Christian lashes out against the bad habits of his secular counterparts: “Tell them who you were, who you really were/Kill yourself slowly over time, fashion statement suicide.” –Aidin Vaziri

Web dev quick tip: Style your INPUT elements by type

One thing I recently found out from looking through some example CSS: when doing web development or design, you may want to apply certain attributes to one type of input field but not another. For example,

is coded:

<input type="button" value="A Button" />

The problem therein is that you may want different borders, backgrounds or sizing attributes for your buttons, text fields, radio buttons, check boxes and password fields. Internet Explorer is an especially aggravating candidate for this, since it enforces border styles around the actual radio button itself. Safari behaves differently than other browsers as well, since it likes to enforce OS X-style control attributes.

In your CSS file or <style> tag section, you can force specific elements with attributes to take certain styles, such as this example from a recent project:

input[type="text"], input[type="password"], textarea {
border: 1px solid #aaa;
background-color: #f5f5f5;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
border: 1px solid #336bc3;
background-color: #ffffff;
}
input[disabled][type="text"] {
border: 1px solid #888;
background-color: #ddd;
}
input[disabled][type="text"]:hover {
border: 1px solid #888;
background-color: #ddd;
}

In this example, text fields and textarea elements will be styled with a specific background color and border, which won’t affect other elements such as buttons.

Another neat trick I’ve learned while working on this project is the ability to put action images inside <button> elements. Instead of the <input type="button" /> tag, using the HTML 4 <button> element allows even more tricks. For example:

<button type="button"><img src="images/rss.gif" alt="" /> RSS</button>

would give something like this:

These are a few of my favourite apps

I’ve had several articles and references to my computer setup and preferred applications written before. I figure the list is due for an update with the latest hotness in technology.

CD/DVD Burning

DVD Video Burning

  • RipIt4Me with DVD Decrypter and DVD Shrink

Virtual DVD Drive

Instant Messaging

BitTorrent

Newsgroups

Graphics Editing

  • Fireworks

Audio/Video Players

File Transfer Clients

Programming and Development

Texas Hold ‘Em for 360 updated with webcam support

As per Major Nelson’s post:

The free update will introduce several significant features, bug fixes and updates based on user feedback, including Xbox LIVE Vision Camera support (player bankrolls will not be reset with this update).

Now with live video, players can put on their best poker face and scrutinize the faces of their opponent’s in true poker fashion. Using the Xbox LIVE Vision Camera also allows players to use a series of game faces using the snapshot mode for all-ins, wins, losses, folds and more. Other features of the update include the following:

· Improved usability such as the addition of Custom Match Lists, which allows gamers to view and select which available Custom Match game they would like to join.

· Improved rich presence in the game, allowing players to not only see what their friends are up to, but also if they just won that big pot!

· Improved matchmaking and user results.

· Scoring and screens are more readable than before.

· Multi-language support including English, French, German, Italian and Spanish.

New premium downloadable content allows players to customize the in-game environment, and access new gamerpics and themes

This update being free almost makes up for the travesty of the Guitar Hero II song pack costing $6.25US for three songs. Didn’t they hear the massive outrage last time? It was even worse than the horse armor scandal with Oblivion.

AAAAAAAAGHHH SONY: E3 reading

I’ve been reading the E3 transcripts since last night to try and figure out what people are doing. Phil has some interesting points about the OMGCOOL games coming out, but this quote from a Singstar developer made me want to throttle someone:

12:10PM PDT – Singstar dev. “When you think about it, it’s like iTunes meets MySpace.”

I have no doubt in my mind that this combination would not only run your computer out of RAM in less than a second, but it’d be full of security holes. Instead of the music store, you’d get twenty popups from Russian brides and Nigerian scammers before having Justin Timberlake and Fergie tracks forcibly entered into your library.

Oh, and the default font would be Comic Sans MS.

Update: This HAD to be Photoshopped. Ads are from Something Awful in case anyone gets uppity about copyrights; I’ll remove them if anyone complains.

iTunes + MySpace LOL OMG

Held in contempt: Woman listens to MP3 player while serving on jury

I find that one of the more interesting parts of the law is any action related to “contempt of court“. The term basically covers any tomfoolery that goes on during the serious legal business of a trial, and most judges are given free will to impose punishments. Generally you don’t see people sent to county jail for more than 30 days for the offense, and that would be a serious situation indeed.

In any event, this woman was caught trying to get out of jury duty, giving lame excuses, and eventually it was discovered that she was wearing an MP3 player under her hijab. Unfortunately this sort of thing could spawn a knee-jerk reaction; especially if it occurred in the States.

I assume it could easily occur again with anyone with long hair, or a cleverly-disguised Bluetooth earbud. One might expect that jurors would have to pass through a metal detector before entering the court, although that might not find certain solid-state devices. Personally, while jury duty might suck for people, I believe that avoiding it is the sign of a self-indulgent jerk. Hell, you could always be serving in the army for your country instead.

What type of measures would you think of that could alleviate this situation? Is it more of a social conditioning angle that needs to be reviewed, or is there any technical prevention process for this sort of thing?

New IllScarlett album, $10 from Future Shop

IllScarlett’s new album was out as of yesterday, and Future Shop has it for $9.99. With shipping and tax, it comes to $13.09 – I’m lazy and want it dropped off at my house, and $1.50 for shipping is worth it. They’re the first artist whose album I’ve bought in a while. Here are my last three CD purchases:

  • IllScarlett – EPdemic (purchased this year, going for $5 on futureshop.ca now: definitely worth it)
  • Halo 2 Original Soundtrack Volume 2 (released Jan 1, 2006)
  • Halo 2 Original Soundtrack Volume 1 (Halo 2 launch, November 2004)

Seriously, pick it up. These guys put on an excellent show when I went to go see their concert at the Wax in Kitchener. On an even more nerdy note, it’s an excellent album to crank and test speakers with.

Weird Al in Toronto (alternate title: Too much construction)

A few friends and I went up to Massey Hall in Toronto last night to attend Weird Al’s concert. As per our usual adventures when going anywhere outside of the K-W area, we managed to get ourselves embedded in a massive number of confusing roads, and found ourselves several times in places of town better known as “Sketchville”.

The show was quite excellent – there were songs from several of his previous albums, and in between the full-length segments there were some fairly hilarious Al TV interviews. The interviews contain clips spliced in from actual interviews, along with Al’s ridiculous reactions. There was an absolutely brilliant segment where he ‘interviews’ Kevin Federline and completely trashes the guy – “Why are you such a colossal failure? How does it feel to have an entire closet full of wifebeaters – and no wife? Are you the world’s biggest douchebag?”

Polkarama! was the first song played, followed by “Canadian Idiot” and several more full-length songs. During about the middle of the show, Al played a mix of about ten songs consecutively, singing about a verse and the chorus and switching to the next one. There was an excellent parody of “You’re Beautiful” called “You’re Pitiful”, as well as nearly everything from the new album (“Confessions Part III” and “Do I Creep You Out” were on the list.)

Overall, it was a very decent show. His stage presence was what you’d expect, and I was equally impressed with the backup band’s performance. Al also played Albuquerque for the encore, which was pretty hilarious – it’s like the epic anthem song that’s a classic “why is this song so long” event.