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"
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"
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"
So how do you take backup of your MySQL database? Simple, launch SQLYog or HeidiSQL and export your database. Well its an easy solution on Windows. How would you go about it on Linux or simply put how wud you do it on command prompt. The answer is mysqldump. Its there on your system once […]Read more "MySQL – Dump those tables"
Database is nothing but collection of tables. Tables are useless unless we perform some operations on them. Operations on such tables require time to process. Sometimes these operations are pretty fast, sometimes not. In case of databases these operations get executed when we run some query. So depending on what and how much of information […]Read more "MySQL – Indexing"