I recently used this to backup and restore all the databases in one single file. This works for small sized databases very well and is a quick and easy way to backup and restore all local databases. Very useful for testing and quick restore. Issue this command at the command prompt. mysqldump -u <username> -p […]Read more "MySQL – Backup and Restore All Databases"
In case you wanted to list all views in your database, you could use the following mysql statement SHOW FULL TABLES WHERE Table_type = ‘VIEW’Read more "List MySQL Views"
I have not been able to put this post up for quite some time now. Actually this has to do with mysql gem installation issue on Mac OSX 10.6 (or later). Initially there were issues with mysql gem installationl. Once it got installed and I ran my app, I got the not so famous “uninitialized […]Read more "MySQL + Gem – MySQLCompat Error Solution"
Databases are all about saving data. With DBMS and RDBMS, the entire data became relational and all the records became related to each other as in the real world. So came into existence the concepts of primary keys, foreign keys, foreign key constraints and whole bunch of other terms like composite keys, referential integrity, indexes […]Read more "MySQL – Temporarily disable Foreign Key Checks or Constraints"
With the new face of Rails (Rails 2.1 and beyond), came the change in the way migrations used to work. So lets see some of the changes that went into migrations (that is when Rails was 1.2.3)… the then and now changes … First of all, serial numbers for migrations are gone and they have […]Read more "Migrations: Did they mature with Rails 2.1.#"
I am back on track .. track of writing something new here… and this time it is Migrations .. Rails Migrations .. As you must be knowing (u all Rails enthusiasts) that migrations allow you to make changes to your database schema. In doing so, you also get the facility of moving from version x […]Read more "Migrations"
You must have fired those select statements tons of times. So you hit a query, get your results and you are done. But what if the next day you felt like going through the results you found the other day. Simple.. hit the query again. But what if the query was complex and you need […]Read more "SQL query results into CSV file"