Tag Archives: script

MySQL: Execute Source

28 Oct

Given you have no GUI client for MySQL, executing multiple CREATE/INSERT/UPDATE queries using the CLI would be troublesome. So preparing a valid SQL script file is advisable.  This command also works for dump files run for recovery or duplication.

mysql> source /path/to/source.sql;

Back Online

15 Sep

After eight hours of downtime, I found out that the site was down. The site went down at 12:32:44 and I realized it was down at 8:32:56PM I hardly access the website when I’m at work that’s why I wasn’t given urgent notice of the situation. I failed to change my alert notice for Hotmail, so again I did not receive the notice of suspension from my host. So what happened?

My other domain which I’ve been planning to resurrect was hacked because of my negligence towards it. I did not pay attention to the site and without knowing, the scripts running in it were compromised. Because the script showed the path and other critical information of the server, the intruder was able to upload his phishing scripts. Luckily, a concerned netizen reported the phishing activity to my host and my host immediately acted on the situation that caused temporary lockdown of the whole account. As you may know, only one account hosts all my domains, so a series circuit is always at play.

I’ve had a few encounter with my site being locked down without me knowing instantly. It’s not because of incapability in my host’s part. They inform me instantly. It’s on my part that’s slacking. I need to device an instant notification system if my site goes down without having to use a SmartPhone. And for that, you may want to stay tuned because you may be able to use it in the future.

My WordPress Upgrade Bash Script

5 Apr

I’m not a UNIX guru, so I can’t really memorize all commands. When upgrading my WordPress version, I only run four lines of commands, but I can’t remember the parameters. Today, I was in the mood to write a simple bash shell script so that next time all I have to do to upgrade my site are: backup, run the script, relax… The script does not backup data and design files. If you are to use the code, make sure to backup before running the script. Check out WordPress for backup solutions.
(more…)