There are times when CRON doesn’t simply fill in the necessary requirements needed for a recurring task. Here’s the problem, let’s say I have a script that should run immediately after it has completed. In other words, a routine. For instance, I’d like to keep the script running without it overlapping with itself. My issue with CRON is that it runs the script again even if the previous execution is still in progress and this is not a good thing as there may be implications to the data due to integrity failure.
I decided to use a bash script to instead run the script. Here’s how I did it:
Though this approach works, I am still unaware of the implications that may occur. As of now, this solves my problem.
More info: http://linuxconfig.org/Bash_scripting_Tutorial
I’ve heard a lot of things like ‘prevention is better than cure’ or ‘live long, start walking’. Until then I just kept ignoring statements and advises from people that urge me to get out of my seat and start doing some activities that will help provide a better lifestyle.
While it is true that I don’t drink nor do I smoke, but the point is, like other people who enjoy being solitary and keep still most of the time I gain weight and eat like there’s no tomorrow.
Lately, I’ve been thinking – The outdoors is quite fun! So I decided to take a walk, and before I knew it I started jogging. Quite the initiative you might say, but it is the environment that took me away from my seat.
I decided to join a race recommended by a friend. He told me that, unlike a mountainous region where we live – the road is flat and easier to route. I joined the 21k or 21-kilometer category, a half-marathon run. Look what I got!
I’ve never been into any sport in my life so I’m pretty useless when it comes to physical activities. I only slack around and keep still until I find something to do worthwhile, that is, if I’m not in front of the computer working or playing.
I managed to get out of my seat and start running. Its fun! It perhaps gives me a reason to find more meaning in life – not so sure about this but I’m willing to find out!
I have seen a lot of versions of this in the web but I decided to create my own copy for ease of setup and simplicity.
First, download the file “mysql55rev.rar” as seen in this post then extract it somewhere in your harddrive.
Follow these steps:
note: extract-dir is the location which you extracted the archive
edit [extract-dir]\my.ini to match your prefernces
# SERVER SECTION
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# The TCP/IP Port the MySQL Server will listen on
#Path to installation directory. All paths are usually resolved relative to this.
#Path to the database root
commands via the windows command line (cmd)
[extract-dir]\bin\mysqld.exe --install "mysql3307" --defaults-file="[extract-dir]\my.ini"
net start mysql3307
use this code if you wish to disable and uninstall the mysql instance
net stop mysql3307
[extract-dir]\bin\mysqld.exe --remove "mysql3307"
Credentials needed to access the database are included in the archive.
If you wish to create just a separate instance and you already have the binaries, you don’t have to copy the binaries again, instead, just create a new my.ini and specify a different port and data directory. On a side-note, if you encounter an error like “Could not locate mysql.user” when trying to start the server, you need to copy the mysql folder and the performance_schema folder located in the [extract-dir]\data folder from your existing mysql instance to the new instance data folder.
After you have installed the mysql instance as a service via mysqld.exe –install, you can now see the installed service in windows, you can start/stop them manually from here as well.
open the services window:
manually configure the installed mysql instances:
If you have downloaded the mariadb, you can install a new instance keeping the existing binaries following the instructions at the beginning of this configuration file. You may also use this configuration file as basis of your default my.cnf.