Categories
Learning Journal

Is MySQL Up?

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.

Categories
Learning Journal

Managing sshd Brute-force Attacks with iptables

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.

Categories
Learning Journal

Running Linux Programs at Boot Time

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.

Categories
Learning Journal

PHP Timer Script

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.

Categories
Learning Journal

Create a MySQL Table with PHP

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.