SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

TWITTER

Stack Overflow


The old fashioned way

  MySQL Articles

March 4, 2010 – 8:31pm MySQL alter table drop constraint…

I often forget how to modify a MySQL table to drop/add foreign key constraints. I usually think it’s: More…

Posted in  Web Development   |     |  No Comments »   |  delicious  Digg

August 12, 2009 – 1:45pm New version of Sequel Pro released

A new version of my favorite MySQL GUI has been released today. Check it out below.

Release Notes – Sequel Pro.

Posted in  OS X Web Development   |     |  No Comments »   |  delicious  Digg

December 16, 2008 – 1:11pm CocoaMySQL finally replaced with Sequel Pro

As much as I love the command line for mysql, sometimes it’s nice to have a GUI to see your tables and columns visually or to do a data dump into CSV. On OS X I’ve always used CocoaMySQL, although it became apparent a long time ago that it was no longer under development. My brother recently told me about Sequel Pro, a “MySQL database management app for Mac OS X 10.5.” You can download it here. So far it’s been working great. It truly does feel like CocoaMySQL with a Leopard interface.

Posted in  OS X Web Development   |     |  No Comments »   |  delicious  Digg

May 22, 2007 – 11:20am How to set up an SSH tunnel to a remote MySQL server

If you have SSH access to your hosting account and want to use a GUI to view your MySQL databases on that remote server, you can set up an SSH tunnel and use a program like CocoaMySQL to manage your remote database. When it works, it can be really userful and is a nice break from a web-based solution like phpMyAdmin.

First, make sure you can login to your host through SSH. After you are certain it works, you can open up a tunnel like this:

ssh -L 3307:[ip address of host]:3306 [username]@[ip address of host] [-p ssh portnumber]

This opens up a tunnel from your local port 3307 to port 3306 on the remote host. Here is the example again with dummy data, using a non-standard ssh port 8022:

ssh -L 3307:192.168.2.1:3306 user@192.168.2.1 -p8022

Once that connection is set up, fire up your MySQL GUI and connect to your local IP address (127.0.0.1) and specify the new port you set up in your tunnel (3307). Here is how it looks in CocoaMySQL.

CocoaMySQL Connection

Posted in  OS X Web Development   |     |  No Comments »   |  delicious  Digg

April 24, 2007 – 10:02am MySQL data dump

Although I love the batch process for loading data into the database within a symfony project, sometimes it can be a bit slow if the dataset is large. I find myself reinitializing the database often while I test, not because I change the schema or add new data, but because I want to reset the data back to its initial state. For this, I run the batch process once loading the data from the yaml fixtures, and then do an SQL dump that will run much, much faster from here on out.

mysqldump -e --add-drop-table -u root -p db_name > ./data/sql/latestdump.sql

To repopulate the database with this dump file:

mysql -u root -p dbname < data/sql/latestdump.sql
Posted in  Web Development   |     |  No Comments »   |  delicious  Digg