These days I’m trying to develop a BASH script to help me copy quickly my MySQL database from my (live) remote site straight into my PC, where I do all my development work. Right at the top of the script I was writing, I needed a way for the script to figure out if the (development PC‘s) MySQL server (mysqld) was already started and running. And if not, to let me know.
One effective method to mitigate brute-force attacks and attempts to break into your public server via the SSH daemon is to use the appropriate iptables rule that will handle such abuse. There are a couple that do the job really well but the one I personally use is one that works on both, dedicated and virtual, servers.
If, like me, you want to easily have some program start every time you boot up your Linux server, you need to find and edit the
rc.local file in your file-system.
/etc/rc.local is really a simple place to put shell commands and/or scripts you want to run when booting up.
This is the only PHP script that I wrote and use nearly everyday but never published! My stopwatch / timer script… I use it to test, benchmark most of the other scripts I write.
One thing I often asked myself, when I first started programming in PHP, was
How do I create a MySQL database table with PHP? Of course, I have come a long way since then, and creating a MySQL table from within a PHP script is no longer a mystery to me.