Magento themes and extensions


Posted on February 14th, 2013 | Posted by admin

I’m sure everyone has got to that point where they need to empty a Magento MySQL database and you’ve logged into PHPMyAdmin, selected all the tables, then clicked delete. Only to find out only a small proportion can be deleted because of foreign key constraints. But if you persist, running the “select all” and “drop” process about 6 times in a row normally will end up with a nice clean DB.

There can be a number of reasons why you would choose to drop all tables in a database to clear it out, rather than dropping the whole database and simply re-creating it, so we wrote a quick bash script to automate the process for you.

Copy SQL Server database on same server

Posted on November 21st, 2012 | Posted by admin

Use the following instructions when you need to create a copy of an existing database on the same server.

- Create a backup of the existing database.
- Create the new database and select the task ‘Restore’
- Select the db backup file to restore, however as the backup is for another database on the existing server the option ‘Overwrite the existing database (WITH REPLACE)’ must be selected
- Before restoring the database, just check the filepaths where the database is being restored too!

How do I import or export my MySQL database using SSH

Posted on September 22nd, 2012 | Posted by admin

Your MySQL databases can be administered through an SSH session via command line (especially if you have large sized data to import/export). To access your account using SSH you must subscribe to a hosting plan that supports this feature.

Enable SSH for your account:

  1. Login to your Netfirms Control Panel.
  2. Click Hosting.
  3. Click Settings.
  4. Select Enable in the SSH pull-down menu.

We suggest using Putty to connect to your account as it is a freely available SSH client for windows.

SSH connections can be established with the following login credentials:

Setup for automatic Magento database backup in Git

Posted on July 14th, 2011 | Posted by admin

Well, any version control system is great, at least in compare with none at all. But what’s happening with your database? Today I’ll show you how to create automated solution for backup and insertion of MySQL database into Git repository.

Explanation and Prerequisites


What I did was clone of existing Magento Git repository on development server, and then created cron task that dumps its current development database into local repository, commits changes, and then pushes them back to remote repository.

First of all, I’ll explain this using our development server that runs on Linux. If you wish to follow this article, you’ll need Git, MySQL,SSH,Remote git repository (ours is at beanstalk) and crontab access on it.

Usage of temporary tables in MySQL databases

Posted on June 22nd, 2011 | Posted by admin

Hi! My recent project had some specific requirements regarding the work with database. Since DB server had some limitations (regarding number of queries), and fairly big number of queries that needed to be executed I created a solution that included temp tables. And now, I’d like to explain how to use them and why.

Suppose that in your application, you need to execute a calculation on a set of tables. The usual approach is to create a query that defines the joins between multiple tables, and selects the data from the joined tables. The problem with that approach is that every time you call that the query, the tables have to be rejoined in order to create the result. And that is usually fairly resource hungry. Instead, you can get around the problem by putting the results into temporary table, so the values are there while the database connection lasts.

Page 1 of 212»