Ever been handed a new server only to wonder whether it is 32-bit or 64-bit? Well, it is rather simple to tell without having to ask! On a Linux server one of the following commands could just give you the answer very easily!
We remember being given a supposed "64-bit" server once and being assured by a manager that it was "definitely" 64-bit. After trying a few times to install a MySQL binary, it became obvious something was wrong. We checked and sure enough the "64-bit" server was actually "32-bit!"
If you want to be sure, the easiest thing to do is run the "gentconf" utility in Linux:
getconf LONG_BIT
The above will display either 32 or 64. It doesn't get any easier than that!
Another method is below though this output is less obvious:
uname -m
You might also want to check all of the output of the "uname" command which can give you some great information!
uname -a
Anyway, that's it for this post. If you have any other great simple methods, let us know. We would love
to hear about them!
Dearly beloved, we are gathered here today to remember MySQL 3.23...
Is anyone still running it I wonder? We held out for a long time before ugrading to 4.0 and finally 4.1. By that time, we were so smitten with MySQL, we were ready for 5.0, 5.1, 6.0, and whatever is next. After a while, we couldn't wait until there was a new version! But, it is nice to remember our roots sometimes...
Where you around when MySQL 3.23 was released? We certainly were.
Many of us remember thinking about this new open-source hotrod, known as MySQL that was transforming dynamically-driven Web sites. We downloaded it immediately and started "playing" with it. Within no time, we found that we were building all of our sites with a MySQL back-end, even the ones that would have been fine as static sites!
We soon began work on a custom PHP backend to allow our clients to access their database and make updates. This was before the days of other such products available now. After writing a custom back-end countless times, we decided it was time to write a common one with a simple configuration file that we could simply plug-in to their site. We acheived our goal and kept maintaining it for several years! We will occassionally pull this out if we are putting together a site for friends or some other small project since we are not as active developing Web sites today as we are being MySQL DBA's.
Anyway, back to MySQL...
Do you remember when MySQL was entirely open-source and Monty's baby? Do you remember when there was no such thing as MySQL Enterprise version? Yes, we know that offering "Enterprise" support has made MySQL viable to larger companies who are not open-source lovers. We embrace that as well. It is just amazing how much has changed with MySQL over the years. How much it has matured!
Do you remember MySQL back when replication was still a rudimentary system that seemed to crash regularly and had to be manually fixed? Do you remember what it was like to do development and not even think about normalizing code, writing stored procedures, triggers, and such? We sure do. Sometimes we look at the current feature set of MySQL and think about how far it has come. And, we often wonder how we made it back then!
Do you remember when there was no real monitoring solution for MySQL? We remember writing so many custom plugins for things like WhatsUp to try to catch issues with the database. Now they are everywhere for almost every monitoring system on the planet, not to mention there is MySQL Enterprise Monitor.
Remember when MySQL had no real High-Availability? We remember when we thought replication was HA and not merely redundency! When LVS (Linux Virtual Server) came along, we remember scrambling to figure out how to make our databases clustered. And now, there is MySQL Cluster!
Apparently others have thought the same way -- that there are cases when MySQL is too much horse-power for the task. After looking at Drizzle, although it is based on version 6.0, it's lack of "features" reminded me of those old days. I can remember ranting about the "bloat" of some major Operating System code that we all know and love/hate. Yet, the same has happened with MySQL over the years. As new features have been added, "bloat" is a matter of fact, regardless of how good or bad the code is.
Naturally, Drizzle is capable of far more! Please don't think I am saying it is in any way inferior! Far from it! The cloud capabilities of Drizzle are very intriguing! I think it has a real future and cannot wait to see how it plays out! I have been amazed what the Drizzle team has done and is still doing!
For those needing a far less sophisticated database, there is SQLite. We came across it years ago when we were looking for a simple way to integrate a small database into a small Web site. For tasks such as this, SQLite may be a great aid. As we were refreshing our knowledge of it recently, we realized that it was more powerful than we remembered! With some of the smaller sites we had developed, it might have even been a really good solution to their needs.
Did everyone need MySQL 3.23 all those years ago? Probably not. But, we sure are glad that we got the experience working with it!
Of all of the technologies that would cause us late night calls, MySQL was on the bottom of the list of offenders! We almost never got paged out for MySQL issues it seems. The product was (and is) rock-solid in most all cases with a proper installation and configuration. We went with it somewhat because we didn't have a lot of options at that time, but we are so glad we did!
Many of the DBA's at Valcora, began their careers as PHP Programmers, or before... We remember times sitting in a small office together writing PHP code before there were even books on the subject! We were scouring the web looking for examples and such and relying heavy on the documentation at the php.net site!
We wrote custom shopping carts before the days of oscommerce, zencart, and such. We wrote code to interface with payment gateways and process credit cards live. We also wrote code to pull products from MySQL databases, show staff members, and such. We worked for a newspaper group and were writing news "engines" to pull the articles, archive data, etc.
Why am I reminiscing about all of that? Well, because frankly, we have been there. We know a lot of other developers are still there doing the kind of work that we began with. We know that we can help others not to make the same mistakes we have seen some of our clients make. Sometimes we reflect back and think if only we knew then what we know now. I know it sounds like a cliche, but true nonetheless. That is why we believe we can help so many businesses out with our hard-earned experience.
And too, we remember doing things that we would like to forget. Making mistakes with the programming and especially the databases that no one ought to be making. But, we learned from those as well. Fortunately, we saw far more mistakes by companies we partnered with than we were making ourselves. As with our own, we learned from those bad decisions and decided never to make them ourselves.
As we go along, we will be sharing some of those mistakes with you. Though it may be painful to remember what we saw done wrong and the late night hours we worked because of it, we hope that those experiences will be of value to others like ourselves today. If we can save another programmer or developer from losing their job because they made the same mistake we have seen before, then we have accomplished our goals.
Look forward to reading some of those exploits and learning from the mistakes we have experienced first-hand. While we didn't make the majority of the mistakes ourselves, we certainly did benefit by learning how to avoid such problems and have done well in steering clear of such mishaps.
Ah, those were the days, we sometimes want to forget...
After years of doing work for companies of all sizes from small startups to large corporations, we decided to launch our business under the name Valcora. We have talked about consolidating our individual clients for some time into one business. Being good friends, we have all worked together for as long as we can remember, building off each others' strengths and experience. But, now we have made it official!
We determined that together we are stronger than working independently. Sounds like it would make a good object lesson, doesn't it? Anyway, we decided we finally had the business models in place and created one central repository for our individual efforts.
Where did we get our name? Well, to be perfectly honest, it has gotten really difficult these days to come up with a name that isn't thirty characters long. We spent weeks agonizing over names only to find out that practically every Greek, hero, fantasy, etc., name was already registered. Then, we started talking about what defines our individual businesses and then it became obvious -- "Core Value!" With a little more work and more searching the registrars, we decided upon Valcora, "Value at the Core!" This has been our quasi-motto for years. We want our clients to see that we add value to everything they do and we take that to the core of their business!
Will we make it together? I sure hope so! At least, we have made it many years cooperating with one another in business and expect we will only grow larger as a real team! Our DBAs have worked for some of the large companies gaining real-world production experience. We are used to living on-call 24x7x365 and working remotely. What has changed?
Not much really, excpet we have a name! That is about all. Our existing clients will continue to receive the same great service we have always strived to provide independently, except now we can offer even more!
Keep an eye out for us. Maybe we can help your business as well!
Some time back, when a client wanted us to setup MySQL Enterprise Monitor, we were surprised to find out that disk monitoring was not available! We worked hard to come up with a solution. Eventually, we decided to setup a custom agent to monitor the disk. Below is the result of that.
While this script may not work as-is for everyone, it should at least provide a basis for such a script. This script has been modified to send an email instead of plug directly into the MySQL Enterprise Monitor. But, it hopefully will get our creative juices flowing...
#!/bin/bash
#
# This script does a very simple test for checking disk space.
#
# Valcora: http://www.valcora.com
#
CHECKDISK=`df -h | awk '{print $5}' | grep % | grep -v Use | sort -n | tail -1 | cut -d "%" -f1 -`
ALERT_VALUE="80"
MAIL_USER="root@localhost.com"
MAIL_SUBJECT="Daily Disk Check"
if [ "$CHECKDISK" -ge "$ALERT_VALUE" ]; then
echo "At least one of my disks is nearly full!" | mail -s "$MAIL_SUBJECT" $MAIL_USER
else
echo "Disk space normal" | mail -s "$MAIL_SUBJECT" $MAIL_USER
fi
This would be a simple process to cron. Let us know if this has been of any help to you!