Tag: magic

Toolbox page launched

You may have noticed there’s a new tab on the site: Toolbox. This is a simple list of various tools I use in my day-to-day work and in running the business. There’s no need to keep the fact that I use them secret, so I thought I’d start maintaining a page of said tools. It will also hopefully help me generate some affiliate income.

So check it out, and if any of the tools on it interest you, check them out!

Quick Drush Tip – Import database SQL with drush sql-cli (sqlc)

I discovered something awesome today just on a hunch and wanted to share. I’m not the first one to blog about this, but it isn’t widely mentioned on the ‘net, at least not as far as I can see.

Basically, it’s the drush sql-cli command, or drush sqlc for short. If you type just that, you will be logged into a database shell. Did you know, however, that you can actually import a database this way, much in the way you would with mysql database < database_file.sql? Swap out the mysql stuff and drop in drush sqlc < database_file.sql – and it works! It grabs the DB information from your settings.php file, and magic happens! This was an awesome find for me, and it’s going to save me a decent amount of time in the future.

NOTE: This might be MySQL-only. If a PostgreSQL user could chime in and let me know if it works for that or any other DBMSes, I’d appreciate it!