Using Mysqldump to Backup Your Stored Procedures, Functions and Triggers

Now that MySQL has Stored Procedures, Functions and Trigger. I have found myself needing to back them up or make copies to move to a different MySQL server. It’s actually pretty easy to do with mysqldump. Here is the command line for it.

shell> mysqldump –routines –no-create-info –no-data –no-create-db –skip-opt <database> > outputfile.sql

Then if you need to restore it.

shell> mysql <database> < outputfile.sql

more info: http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

Install Git From Source On Linux

If you are like me and want to install git-core core from source instead of one to the many binary packages out or you just have a distro that does have a binary for it. Here is what you will need to get it installed.

  • POSIX-compliant shell
  • GCC – gnu c compiler
  • GNU Interactive Tools
  • Perl 5.8 or Later
  • Openssl
  • Openssh
  • zlib
  • libcurl
  • expat

Once all you have verified or install on the required packages. You can download the source from Git Homepage.

shell$ wget http://git-core.googlecode.com/files/git-1.x.x.tar.gz

shell$ tar -zxf git-1.x.x.tar.gz

shell$ cd git-1.x.x

shell$ ./configure –prefix=[install_path]

shell$ make all

shell$ sudo make install

A little old school and not the hard.

Resources:
http://git-scm.com/
http://ruby.about.com/od/git/a/2.htm

Here is what happens when I recovery from surgery.

After being told that I would need to take five days to recovery from a recent surgery and being informed that they would prefer me not to work on any of the system at work well under the influence of pain killers, I started looking for thing to kill time.

Well trying to find something to do for 5 days and not having much luck, I was surfing the web using Google’s Chrome Web Browser, I started looking at their “New Tab Apps Feature” or whatever it’s called. I started thinking that would be really simple to create a web based version of the application that did roughly the something, but wasn’t dependent on the web browser. It would also be handy for all those table devices that have web browsers. It’s kind of a pain to hit those little links with fat fingers like mine. After doing a quick design in my head, I figured what the heck; I got nothing better to do.

I decided to go old school LAMP on it with Linux, Apache, MySQL, and PERL. I decided to use mod_perl and MASON as my frame work, MASON being a throw back from my short stent at Amazon.com. I went with the old MVC architecture, since it’s the easiest for a one node system and because of my state of the art Dual Pentium Pro 180 MHZ, with 256G of RAM, and 14G 5400 RPM Hard Drive for the server that I was building it on.

After 5 days, a few additional week nights and Saturdays, here is what I came up withhttp://www.myapplinks.com. It is still in the Alpha/Beta stage by not a bad start.

Using CURL to manage Tomcat

The other day I and a few of my colleges were talking about a easy way to deploy and undeploy war files from the command line like you could through the Tomcat Web Application Manager portal and being on a python kick, I started writing it in python. After an hour or two I realized that I had made this way more complex then I need to.  I had been reading theApache Tomcat 6.0 Manager App HOW-TO and I was using curl to test all the commands from localhost.

shell> curl –anyauth -u admin:password http://localhost:8080/manager/start?path=/myapp

So now after slapping myself in forehead and saying “duh!”. I decided I could write this as shell script and have it knock out in 20 minutes.

So here what I came up with tomcat-cli.sh.

–Cheers