Programming - Code

Move a table from one database to another - MySQL

The reason for my lack of posting is directly related to the workload that I currenly have. A big project that I love working on had me consumed for the past 2 weeks, but within that time, I've learned a ton of new things and I'll be posting more about this in the coming days.

One of the first things I had to do for a project was move a few tables form different database together, into one database. It’s a simple enough command:

RENAME TABLE database1.table1 TO database2.table1;

MYSQL - Moving data and database properly

Having to move data from one location to another, or one drive to another in a database can be quite a hair-raising expericene. With MySql, it’s really not that bad. I have a database on a Window 2003 server, but the steps for Linux and Mac OSX are very similar.

But just to be sure that we won’t be shooting ourselves in the foot, lets make a backup of our databases. Whichever way you choose to do it is your call… ( mysqldump, using a 3rd party tool to create a csv files of your tables…etc)

First, lets shutdown the database:

Working with JSON - Making Flex and PHP talk - Painlessly

While working on a project; designing a RIA in Adobe Flex, I was using the a Data Grid, and populating it using a HTTP Service that ran PHP.

It was a painful process.

PHP - Installing CURL

Trying to retrieve data from a webpage shouldn't be that hard in PHP, and it isn't. I've been using Curl to do just that. It comes with tons of options and lots of help and references.

List of Useful MySQL Commands

Here is a list of some important queries that I have had to use with MySQL. Some of these are very helpful, others are plain invaluable.

View all the queries/threads/process that are running:

SHOW PROCESSLIST;

Link to MySQL reference manual

Kill a certain query that is long running:

Bring up the the processlist by using the SHOW PROCESSLIST; command, then
KILL <thread_id>;

Syndicate content