Category Archives: MySQL

Mysql: Duplicate a Database

I needed to duplicate one of my mysql magento databases today. Instead of dumping it to my computer, then sending it back into a different database, I figured there’s got to be a more efficient way to do it. Fortunately … Continue reading

Posted in MySQL | Leave a comment

Magento Install: Mysql Error – SQLSTATE[HY000] [2002] No such file or directory

I recently changed up the configuration of my Mac (running 10.6.4) and I was installing a fresh copy of Magento (1.4.1.1) when I ran into the following error when I got to the database credentials: SQLSTATE[HY000] [2002] No such file … Continue reading

Posted in Magento, MySQL, PHP | Leave a comment

Magento: SQL to Find Missing Images

I just imported a ton of products for new website that I’m working on, and it turns out that the client misnamed a bunch of images, causing Magento to ignore the image import for those ones. I don’t want to … Continue reading

Posted in Magento, MySQL | Leave a comment

Mysql: USING BTREE – Error when dumping from 5.1 and importing to 5.0

I was dumping a database today to put onto a different server. I am currently running 5.1.45 locally, and the server I am moving to has 5.0.58. When trying to import the database to the new server, I was getting … Continue reading

Posted in MySQL | 1 Comment

MySQL & PHP: Convert Strings From All Uppercase to Uppercase Only First Letter of Each Word

I’m not sure if it is possible to make that title much shorter than that… Anyway, I had some old data that I imported to an installation of Magento. All of the product titles were all uppercase, which was quite … Continue reading

Posted in MySQL, PHP | Leave a comment

Magento: Easily and Quickly Delete All Products

If you have ever tried to delete a large amount of products out of Magento, you’ll realize that it takes forever, and in many cases, you have to do it in small quantities at a time otherwise it will freeze … Continue reading

Posted in Magento, MySQL | 13 Comments

Mysqli and Object-Oriented PHP

Sometimes it is easy for me to get stuck doing things the way I know how to do it, rather than finding a better, more up-to-date method. I just had a recent post about making multiple connections to mysql, but … Continue reading

Posted in MySQL, PHP | Leave a comment

Turn Off Word Wrap in Leopard Terminal

As I said in the post prior to this, I have really been enjoying using Terminal for accessing MySQL databases. I found a problem with it though. If you have a table with a lot of columns, or a column … Continue reading

Posted in Mac OS X, MySQL | 1 Comment

Using MySQL Through The Command Line

One of the most popular ways to view and work with a MySQL database is through a web app called phpMyAdmin. There are many other tools out there that you can use, but why use a tool when you’ve already … Continue reading

Posted in MySQL | 1 Comment

Connecting to Multiple MySQL Databases with PHP

I ran into a case where I needed to connect to two seperate databases within the same script, and I didn’t know how to do it without closing one connection, and opening another.  With a little time and effort, I … Continue reading

Posted in MySQL, PHP | Leave a comment