<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://blog.valcora.com/index.php?/feeds/atom10.xml" rel="self" title="Valcora Blog" type="application/atom+xml" />
    <link href="http://blog.valcora.com/"                        rel="alternate"    title="Valcora Blog" type="text/html" />
    <link href="http://blog.valcora.com/rss.php?version=2.0"     rel="alternate"    title="Valcora Blog" type="application/rss+xml" />
    <title type="html">Valcora Blog</title>
    <subtitle type="html">Professional MySQL Consulting</subtitle>
    <icon>http://blog.valcora.com/templates/default/img/s9y_banner_small.png</icon>
    <id>http://blog.valcora.com/</id>
    <updated>2009-05-17T21:02:47Z</updated>
    <generator uri="http://www.s9y.org/" version="1.4.1">Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/16-It-Must-Be-a-Database-Problem....html" rel="alternate" title="It Must Be a Database Problem..." />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-15T12:52:11Z</published>
        <updated>2009-05-17T21:02:47Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=16</wfw:comment>
    
        <slash:comments>6</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=16</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/1-MySQL" label="MySQL" term="MySQL" />
    
        <id>http://blog.valcora.com/index.php?/archives/16-guid.html</id>
        <title type="html">It Must Be a Database Problem...</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                It seems the mantra that we hear from clients most often is "...[it] must be a database problem."  The reality is that it almost never is, in fact, a "database problem!"  It seems that the DBA is most often "guilty until proven innocent," rather than the other way around.  At first, I thought maybe this was how MySQL was viewed because of the whole open-source stigma, but I have seen the same reaction on other DBMS platforms.  After chatting with Oracle, SQL Server, DB2, etc., DBA's, I heard the same thing repeated over and over...<br />
<br />
Let me give you some of the examples I have seen.  Maybe you can identify with some of these.  Either way, perhaps it will generate a little smile.  Naturally, this will be a short list of <u>some</u> of the problems and not the whole list:<br />
<br />
Not too long ago, I was asked to troubleshoot a "problem" with the database where an ESB server could not connect to a MySQL server.  I was told there was an issue with the database since they were getting connection issues!  I logged into the VPN and immediately tried to login via the CLI into MySQL from localhost.  No problem -- as I expected.  Then, I tried to login  from another machine via TCP/IP into the same database server and again no problem.  Since I did not have direct access to the ESB server, I had another techie try a telnet from the same machine and they got a response!  I double-checked the MySQL user table and it was set to allow connections from the ESB server!  After having everything check out, I had them send me the XML config file for the ESB server to see the connect string and guess what!?!?  The connect string was for a SQL Server in another country that was not even on this network!  <br />
<br />
The person who set it up copied a config file from another server and missed changing significant portions of the config!  You would think the client would blush at this point and apologize, but that isn't what happened.  They still insisted it was a MySQL problem!  I was shocked!  I had to copy the configuration section and send it to them color-coded and ask why it was trying to connect to a server in abother country that wasn't even on this network, to a database that was a SQL Server database, on a SQL Server port with MySQL configuration specifics!  I think the ESB person finally saw the problem.  No wonder why there was a problem!  Needless to say, "database problem" solved!  <br />
<br />
There is so much bias out there that sometimes others are blinded to the obvious in their haste to blame someone else!  I presume the same cry can be heard from Development Teams, Unix administrators, and so on...<br />
<br />
I have also seen a number of networking problems mis-diagnosed as database issues.  Perhaps you have been there too.  I have seen ailing network cards that were becoming intermittent cause issues (not to mention switches with bad ports).  While these hit-and-miss errors are hard to diagnose, they are rarely MySQL problems.  But, as always, the other tech people responsible for those platforms have learned the mantra -- "got to be a database problem..."<br />
<br />
Another common issue is when an application person decides to copy the JBoss / Tomcat configuration over from a Dev box to a new UAT server and forgets that we keep user access permissions different on the various environments for security reasons.  As you can imagine, when they start up and get a connection error, it is time to call the DBA and figure out what is wrong with the database!  I have learned to make my first request be for seeing their configuration file!<br />
<br />
Anyway, I could rant on and on, but I was curious whether anyone else noticed the same pattern?  Surely, it isn't just me'!  Am I the only DBA that gets called in every so often in the middle of the night to diagnose someone else's problem?  I sure hope not!  Maybe "misery" really does love company... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/15-BCV-Backups.html" rel="alternate" title="BCV Backups" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-06T15:07:45Z</published>
        <updated>2009-05-06T15:41:13Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=15</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=15</wfw:commentRss>
    
    
        <id>http://blog.valcora.com/index.php?/archives/15-guid.html</id>
        <title type="html">BCV Backups</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A few years back when being engaged in a new position, we were wondering what backup method would be used.  We assumed we would be using something like Zmanda to manage backups centrally for all servers.  Boy, were we in for a surprise!  The enterprise company was using EMC's BCV solution!  None of us were quite sure how this would integrate with MySQL!<br />
<br />
After doing some research and talking with the "BCV guy" we learned that BCV has to establish a "pair" with a drive of the exact same size.  It is a sort of running mirror of the drive for those of you who are not familiar with it.  Then once the backup and the data are synced, you "break the mirror."  Pretty simple idea, but how do we guarantee consistency?  That was the problem!<br />
<br />
We talked with MySQL and asked if they had support for BCV and the technician acted kind of surprised as well and informed us they didn't.  Now what?  We had to create a custom solution!<br />
<br />
After a number of email exchanges, MySQL AB suggested we go with a utility called <a href="http://www.edlsystems.com/shellsql/" target="_new">ShellSQL</a>.  While this is an awesome utility, it requires the DBA to learn one more thing and maintain it.  The boss was not real happy with this solution, so on we went...<br />
<br />
Now you may be thinking, why not just pass the "-e" option to the mysql client.  While we eventually figured out a way to make that work, our first concern was that using multiple statements in this manner would not work for us.<br />
<br />
We needed to lock all of the tables, split the BCV, and then unlock the tables from Bash.  The idea was something like this:<br />
<br />
<pre>mysql -e "FLUSH TABLES WITH READ LOCK"
./split_bcv.ksh
mysql -e "UNLOCK TABLES"</pre>The problem naturally is that when the client disconnects after the lock, MySQL unlocks all of the tables, thus impairing our ability to guarantee a consistent backup.<br />
<br />
The solution for us however was in MySQL's "system" command!  We just had to string all of the commands together into a sort of "wrapper" script using MySQL to fire the split.  Below is that script:<br />
<br />
<pre>
#!/bin/sh
# bcv_backup.sh
#
# Simple Bash script to run BCV Backups
# Valcora: http://www.valcora.com
#

# Configuration
MYSQL="/usr/bin/mysql"
MYSQL_USER="backup"
MYSQL_PASSWORD="mypass"
MYSQL_SOCKET="/tmp/mysql.sock"
BCV_SCRIPT="/opt/emc/BCV_split.ksh"
CMD="FLUSH TABLES WITH READ LOCK; system '$BCV_SCRIPT'; UNLOCK TABLES;"
BACKUP_LOG="/var/logs/cps.log"

# Redirect all output to backup log
exec &>$BACKUP_LOG

echo "Beginning BCV Backups..."
echo "Began: `date`"

# Actual MySQL Client Command That Does It All
$MYSQL -vvv -u$MYSQL_USER -p$MYSQL_PASSWORD -S $MYSQL_SOCKET -e "$CMD"

echo "Ended: `date`"
echo
chown mysql:mysql $BACKUP_LOG

# Reset stdout and stderr back to screen, not logfile
exec >&-</pre><br />
<br />
This script would fire the split script while the tables were locked and then upon completion, would unlock the tables.  <br />
<br />
Naturally, we wanted to keep a log of the activities as well.<br />
<br />
We ran this solution by MySQL AB and they agreed there should be no problem doing it that way!<br />
<br />
Well, we have been running this for over two years now and not a single problem.  We have had on a few occassions needed to restore from the BCV and it has always been perfect!<br />
<br />
In case you are interested, below are examples of the BCV scripts for the establish and split:<br />
<br />
<pre>#/bin/ksh
# BCV_split.ksh
cd /opt/emc
. ./symcli_path
symmir -g SAN_dev split -instant -nop</pre><br />
<br />
<pre>#!/bin/ksh
# BSV_establish.ksh
## ESTABLISH Pairs  **********************************
cd /opt/emc
. ./symcli_path
symmir -g SAN_dev est -full -nop

#!/bin/sh
. /opt/emc/symcli_path
let COUNT=0
echo Run EMC symmir command and check for return code 0
echo
while true
  do
    symmir verify -g SAN_dev
    RC=`echo $?`
    if [ $RC = 0 ]
      then
        echo
        echo
        echo "   <strong> </strong> <strong>  The return code is 0, the BCVs are all established. Exit with return code 0  </strong> <strong> </strong> "
        exit 0
    fi
    sleep 600 # sleep for 10 minutes
    let COUNT=COUNT+1
    echo "  --> Pass $COUNT complete. The BCVs are not established."
    if [ "$COUNT" = "50" ]
      then
        echo
        echo
        echo "  <strong> </strong> <strong>   The BCVs are not established after $COUNT passes. Exit with return code 8.  </strong> <strong> </strong> "
        exit 8
    fi
  done

echo
echo "   <strong> </strong> <strong>    Unexpected error. Exit with return code 12.   </strong> <strong> </strong> "
exit 12</pre><br />
<br />
The configuration file is:<br />
<br />
<pre>#!/bin/ksh
#symcli_path
PATH=$PATH:/usr/symcli/bin
export PATH
export SYMCLI_CTL_ACCESS=PARALLEL
</pre>The BCV_establish.ksh script is called an hour or so before the MySQL script is scheduled so that there is sufficient time for the drives to sync up.  Then the MySQL script breaks the mirror and our backup is complete.  As you can imagine, all of this is scheduled for off-hours.<br />
<br />
Anyway, if you find yourself faced with a similar dilemma, hopefully this may give you some ideas... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/14-Which-App-is-Using-a-Port.html" rel="alternate" title="Which App is Using a Port?" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-06T14:12:39Z</published>
        <updated>2009-05-06T14:12:39Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=14</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=14</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/5-Utilities" label="Utilities" term="Utilities" />
    
        <id>http://blog.valcora.com/index.php?/archives/14-guid.html</id>
        <title type="html">Which App is Using a Port?</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Have you ever tried to start a server like MySQL and been amazed to see an error that the port is already in use?  You rack your brain and try to figure out what it would be to no avail.  Sometimes you do a "ps" in Linux and don't even see anything that you think would be using the port.  Well, forutantely, there are some tricks to help you find out without doing a reboot.  If it is a production server, a reboot may not be an option anyway!<br />
<br />
Below are some methods to help.  We will start by looking at the "fuser" utility provided with many Linux distros:<br />
<br />
<pre>fuser -n tcp 80
80/tcp:               1029  1030  1824  1838  1839  1840  1841 13972 14136 14137 14712</pre>This example shows a simple check of everything using port 80.  What you see above is a list of PIDs that are using that port.  Now we could probably just do a simple "ps" to figure out what it is.  You might also want to get more info by doing something like the following to determine from where it is running:<br />
<br />
<pre>cat /proc/1029/cmdline
/usr/local/apache/bin/httpd-kstart</pre>Now that is useful information!  If you have not used "/proc" information before, you are definitely missing out on some great details!<br />
<br />
Another extremely helpful utility is "netstat."<br />
<br />
<pre>netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:3306                0.0.0.0:<strong>                   LISTEN      30150/mysqld
tcp        0      0 0.0.0.0:4427                0.0.0.0:</strong>                   LISTEN      27775/drizzled
tcp        0      0 0.0.0.0:3307                0.0.0.0:<strong>                   LISTEN      30147/mysqld
tcp        0      0 0.0.0.0:3310                0.0.0.0:</strong>                   LISTEN      30144/mysqld
tcp        0      0 0.0.0.0:1999                0.0.0.0:<strong>                   LISTEN      30126/mysqlmanager
tcp        0      0 0.0.0.0:111                 0.0.0.0:</strong>                   LISTEN      1794/rpcbind
tcp        0      0 127.0.0.1:631               0.0.0.0:<strong>                   LISTEN      2264/cupsd
tcp        0      0 127.0.0.1:25                0.0.0.0:</strong>                   LISTEN      2065/sendmail: acce
tcp        0      0 0.0.0.0:47165               0.0.0.0:<strong>                   LISTEN      1814/rpc.statd
tcp        0      0 :::4427                     :::</strong>                        LISTEN      27775/drizzled
tcp        0      0 :::80                       :::<strong>                        LISTEN      1029/httpd
tcp        0      0 :::22                       :::</strong>                        LISTEN      2029/sshd
udp        0      0 0.0.0.0:697                 0.0.0.0:<strong>                               1794/rpcbind
udp        0      0 0.0.0.0:718                 0.0.0.0:</strong>                               1814/rpc.statd
udp        0      0 0.0.0.0:49625               0.0.0.0:<strong>                               1814/rpc.statd
udp        0      0 0.0.0.0:50147               0.0.0.0:</strong>                               2241/avahi-daemon:
udp        0      0 0.0.0.0:5353                0.0.0.0:<strong>                               2241/avahi-daemon:
udp        0      0 0.0.0.0:111                 0.0.0.0:</strong>                               1794/rpcbind
udp        0      0 0.0.0.0:631                 0.0.0.0:<strong>                               2264/cupsd
udp        0      0 192.168.1.3:123             0.0.0.0:</strong>                               2044/ntpd
udp        0      0 127.0.0.1:123               0.0.0.0:<strong>                               2044/ntpd
udp        0      0 0.0.0.0:123                 0.0.0.0:</strong>                               2044/ntpd
udp        0      0 fe80::21b:fcff:fe40:123     :::<strong>                                    2044/ntpd
udp        0      0 ::1:123                     :::</strong>                                    2044/ntpd
udp        0      0 :::123                      :::<strong>                                    2044/ntpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     7341   2241/avahi-daemon:  /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     8211   2366/gam_server     @/tmp/fam-root-
unix  2      [ ACC ]     STREAM     LISTENING     7445   2280/hald           @/var/run/hald/dbus-tenNNgKqAh
unix  2      [ ACC ]     STREAM     LISTENING     6523   1919/pcscd          /var/run/pcscd.comm
unix  2      [ ACC ]     STREAM     LISTENING     1271784 30147/mysqld        /mysql/mysql/tmp/mysqld2/mysql.sock
unix  2      [ ACC ]     STREAM     LISTENING     1271741 30126/mysqlmanager  /mysql/mysql/tmp/mysqlmanager.sock
unix  2      [ ACC ]     STREAM     LISTENING     6591   1949/audispd        /var/run/audispd_events
unix  2      [ ACC ]     STREAM     LISTENING     1271771 30144/mysqld        /mysql/mysql/tmp/mysqld10/mysql.sock
unix  2      [ ACC ]     STREAM     LISTENING     6732   2008/acpid          /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     6620   1964/dbus-daemon    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     7414   2264/cupsd          /var/run/cups/cups.sock
unix  2      [ ACC ]     STREAM     LISTENING     7049   1976/python         /var/run/setroubleshoot/setroubleshoot_server
unix  2      [ ACC ]     STREAM     LISTENING     6179   1794/rpcbind        /var/run/rpcbind.sock
unix  2      [ ACC ]     STREAM     LISTENING     1271790 30150/mysqld        /mysql/mysql/tmp/mysqld1/mysql.sock
unix  2      [ ACC ]     STREAM     LISTENING     7088   2087/gpm            /dev/gpmctl
unix  2      [ ACC ]     STREAM     LISTENING     7440   2280/hald           @/var/run/hald/dbus-115QUHVqMh</pre>We use this utility all of the time!<br />
<br />
<br />
Another utility that is great is "lsof." <br />
<br />
<pre>lsof -i
COMMAND     PID    USER   FD   TYPE  DEVICE SIZE NODE NAME
httpd      1029  apache    3u  IPv6    6263       TCP </strong>:http (LISTEN)
httpd      1030  apache    3u  IPv6    6263       TCP <strong>:http (LISTEN)
rpcbind    1794     rpc    6u  IPv4    6181       UDP </strong>:sunrpc
rpcbind    1794     rpc    7u  IPv4    6184       UDP <strong>:uuidgen
rpcbind    1794     rpc    8u  IPv4    6185       TCP </strong>:sunrpc (LISTEN)
rpc.statd  1814 rpcuser    5u  IPv4    6231       UDP <strong>:718
rpc.statd  1814 rpcuser    7u  IPv4    6242       UDP </strong>:49625
rpc.statd  1814 rpcuser    8u  IPv4    6245       TCP <strong>:47165 (LISTEN)
httpd      1824    root    3u  IPv6    6263       TCP </strong>:http (LISTEN)
httpd      1838  apache    3u  IPv6    6263       TCP <strong>:http (LISTEN)
httpd      1839  apache    3u  IPv6    6263       TCP </strong>:http (LISTEN)
httpd      1840  apache    3u  IPv6    6263       TCP <strong>:http (LISTEN)
httpd      1841  apache    3u  IPv6    6263       TCP </strong>:http (LISTEN)
sshd       2029    root    3u  IPv6    6778       TCP <strong>:ssh (LISTEN)
ntpd       2044     ntp   16u  IPv4    6813       UDP </strong>:ntp
ntpd       2044     ntp   17u  IPv6    6814       UDP <strong>:ntp
ntpd       2044     ntp   18u  IPv6    6818       UDP localhost6.localdomain6:ntp
ntpd       2044     ntp   19u  IPv6    6819       UDP [fe80::21b:fcff:fe40:2fb6]:ntp
ntpd       2044     ntp   20u  IPv4    6820       UDP localhost.localdomain:ntp
ntpd       2044     ntp   21u  IPv4    6821       UDP 192.168.1.3:ntp
sendmail   2065    root    4u  IPv4    6994       TCP localhost.localdomain:smtp (LISTEN)
avahi-dae  2241   avahi   14u  IPv4    7351       UDP </strong>:mdns
avahi-dae  2241   avahi   15u  IPv4    7352       UDP <strong>:50147
cupsd      2264    root    4u  IPv4    7413       TCP localhost.localdomain:ipp (LISTEN)
cupsd      2264    root    6u  IPv4    7416       UDP </strong>:ipp
httpd     13972  apache    3u  IPv6    6263       TCP <strong>:http (LISTEN)
httpd     14136  apache    3u  IPv6    6263       TCP </strong>:http (LISTEN)
httpd     14137  apache    3u  IPv6    6263       TCP <strong>:http (LISTEN)
httpd     14712  apache    3u  IPv6    6263       TCP </strong>:http (LISTEN)
drizzled  27775   mysql   10u  IPv6 3542261       TCP <strong>:4427 (LISTEN)
drizzled  27775   mysql   12u  IPv4 3542262       TCP </strong>:4427 (LISTEN)
mysqlmana 30126   mysql    4u  IPv4 1271740       TCP <strong>:tcp-id-port (LISTEN)
mysqld    30144   mysql   13u  IPv4 1271770       TCP </strong>:dyna-access (LISTEN)
mysqld    30144   mysql   32u  IPv4 5784887       TCP localhost.localdomain:34779->localhost.localdomain:mysql (ESTABLISHED)
mysqld    30147   mysql   16u  IPv4 1271783       TCP <strong>:opsession-prxy (LISTEN)
mysqld    30150   mysql   14u  IPv4 1271789       TCP </strong>:mysql (LISTEN)
mysqld    30150   mysql   56u  IPv4 5784888       TCP localhost.localdomain:mysql->localhost.localdomain:34779 (ESTABLISHED)
sshd      31040    root    3r  IPv6 5787976       TCP 192.168.1.3:ssh->192.168.1.152:bts-x73 (ESTABLISHED)</pre>Anyway, we hope these will be of some value for you.  While there are probably several ways to do this, these are a few of our favorites.<br />
<br />
Let us know what you think.  You may have some even better tricks.<br />
<br />
<br />
<br />
<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/13-What-it-Takes-to-Be-a-Senior-MySQL-DBA.html" rel="alternate" title="What it Takes to Be a Senior MySQL DBA" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-06T12:31:39Z</published>
        <updated>2009-05-06T13:12:36Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=13</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=13</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/1-MySQL" label="MySQL" term="MySQL" />
    
        <id>http://blog.valcora.com/index.php?/archives/13-guid.html</id>
        <title type="html">What it Takes to Be a Senior MySQL DBA</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Many of us at Valcora were "fortunate" to start our tech careers in a small web development shop where we were expected to be "jack-of-all-trades."  We say "fortunate" because at the time, it doesn't seem so great.  Looking back, however, it is clear that we got a lot of experience that was invaluable that way.<br />
<br />
We were expected to be Linux System Administrators, handle user accounts, Linux installs, manage DNS, install/configure/manage Apache, do custom PHP programming, MySQL Database Administrator, search engine optimization, and on and on...<br />
<br />
As we have worked with various companies over the years, we all have realized that not everyone else grew up in that kind of environment.  The normal that we have encountered is highly specialized individuals who know one thing and know it fairly well.  While there is absolutely nothing wrong with that in many cases, it can be a crutch and a short-coming for anyone wanting to be a senior-level MySQL DBA in our opinion.  Why?  Well, frankly, because a senior-level DBA should know a lot more than just MySQL.<br />
<br />
After chatting with the guys here at Valcora, we all realized that we have been called upon in our careers to do pull some fairly heavy Linux tricks out of our "bag of tricks."  Below are just a few of the things we have had to do and honestly, we are not sure a specialized junior would know what to do in most of these cases.<br />
<br />
We were reminiscing and thought of the time a client wanted to see the queries that are passing through their production MySQL server.  At this point, a junior might be tempted to say, well let's turn on the general query log, but that is not an option when you are running MySQL 4.1 and it would require a server restart!  The DBA who had setup the server did not symlink the general query log to /dev/null so that it could be un-linked and a "flush logs" performed to start capturing logs.  (Some senior DBAs might have missed that trick. <grin>)  <br />
<br />
The only option was to try and capture statements with some other method.  After confirming with the client that they needed SELECT statements as well as writes (DML), we came to the conclusion that we were going to have to "sniff" for those.  Doing a poll of the "SHOW PROCESSLIST" every second was not a n option since so many would be missed.  So, we decided to use tcpdump and capture the queries with some serious grep statements.  Thinking that was the job of the Linux System Administrator?  Guess again.  It was the DBA's job in this company.<br />
<br />
Right about now, if you are thinking that is too heavy duty for a MySQL DBA, remember we are talking about real senior-level DBA's.  <img src="http://blog.valcora.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
We were able to capture the data for a fixed time period and then massage it with more Linux commands into a report of the queries.  For those of you who know about it, this was before the days of mysqlsniffer, which is a great little utility to do basically the same thing!  We wish we had it at that time and it would have made our job easier!<br />
<br />
On other occassions, we all seen at one time or another a problem where we try to start MySQL and Linux reports that the port is already in use.  Now, a reboot, again, is a simple solution to this problem.  But, in some cases, a reboot is not permitted without management approval and if they happen to be running anything else on that server, good luck getting downtime to perform one.  Since there is a process that has that port, we need to find out what is holding onto it.  (That is a rather straight forward process which we will detail in another blog coming soon.)  Again, Linux skills to the rescue.  Find the process and more than likely it will be one that you can kill since it probably shouldn't be using a port used for MySQL such as 3306 and then start MySQL up with no problems.  No waiting for approvals or having to explain to some manager, why you need to reboot the server.<br />
<br />
Custom scripting is another area that deserves mention.  We all recalled how many Bash, Perl, and PHP scripts we have written over the years to perform some maintenance task in MySQL.  In the early days, MySQL did not always have scripts/utilities like mysqlcheck for example.  And speaking of that, one of us commented how we decided to use mysqlcheck to analyze a production server that had been rebooted in a not-so-graceful manner by a System Administrator without shutting down MySQL properly.  This was like a power down by pulling the plug!  Anyway, a few of the InnoDB tables were crashed and mysqlcheck just skipped them and never even reported a problem.  Looking at its "report" made us think that everything was ok, but we knew better.<br />
<br />
Bash scripting to the rescue.  We crawled through every database and table and performed "CHECK TABLE" on each with a simple Bash script.  We submitted a bug report to MySQL and it is supposed to have been resolved by now.  While it probably is safe to use the newer version of mysqlcheck, some of us old-timers are still cautious enough to think our simple Bash script found the problem for sure and is likely to always find the problem, so why change to something that has proven to have problems?<br />
<br />
One of the recurring things, we all joked about was how many times we have battled library issues when installing MySQL.  We have fought with Perl DBI and DBD libs as well as Linux libraries such as glibc and such when compiling MySQL from source.  Yes, some of us still like to compile from source for a variety of reasons, though we also love binaries.  <img src="http://blog.valcora.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
In some companies, it is also helpful to be able to diagnose firewall issues.  We have seen mis-configured firewall rules before where someone inadvertantly missed a rule and the application server could not talk with the database server.  Since in most companies, the general assumption is that "it must be a database problem," (The senior DBAs are nodding their heads now!)  it is critical to be able to diagnose networking issues since we are often guilty until proven innocent!  If you as a DBA have to wait on a networking person to clear you, good luck!  The sooner you can troubleshoot and discover latency or connectivity issues in the network, the sooner you get off the "hot seat" and look like a hero in finding the problem.  Most juniors in this case, are probably thinking "But, that is not my job!  I am the DBA!"  The old-timers realize that it takes more than MySQL skills!<br />
<br />
We have also seen development teams establish connections to the server that seem to terminate unexpectedly.  After having MySQL be blamed by the development team, it took some special skills to start examining the JBoss and Tomcat configurations.  Naturally, the individuals responsible for those applications also afrgued it was a MySQL "problem."  But we knew better!  As you can expect, the problem was with the configuration of connection pooling and timeouts in their configurations.  When we notified them of what needed to be changed and why it was a problem, they finally conceded that this was the real problem.  We tested it and voila, problem solved!  Again, not a MySQL problem, but it was critical for us to diagnose it and clear our name.<br />
<br />
Anyway, we could go on and on, but surely you get our point!  To be a real DBA, we think you have to be well-rounded and be able to perform a lot of Linux Administrator skills to survive in a LAMP environment...<br />
<br />
If you are not a senior DBA, don't worry.  Find yourself a good senior and partner with them.  Soak up all you can from them like a sponge.  Then, one day, perhaps you too can call yourself a senior...<br />
<br />
If you are a senior-level DBA, find yourself a willing junior to take under your wing and return the favor... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/12-Determining-CPU-Information.html" rel="alternate" title="Determining CPU Information" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-05T11:48:04Z</published>
        <updated>2009-05-05T15:04:35Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=12</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=12</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/5-Utilities" label="Utilities" term="Utilities" />
    
        <id>http://blog.valcora.com/index.php?/archives/12-guid.html</id>
        <title type="html">Determining CPU Information</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Have you ever needed to determine details about a particular server that maybe you have never seen before?  Well, in Linux, there is a great utility that not that many novice users have ever used.  It is called "dmidecode."<br />
<br />
From the "man" entry for dmidecode:<br />
<pre>dmidecode  is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description  of  the  system’s  hardware  components,  as well as other useful pieces of information such as serial numbers and BIOS revision.  Thanks to  this  table,  you can  retrieve this information without having to probe for the actual hardware.  While this is a good point in terms  of report  speed  and  safeness, this also makes the presented information possibly unreliable.

The DMI table doesn’t only describe what the system is  currently  made of,  it  also  can  report the possible evolutions (such as the fastest supported CPU or the maximal amount of memory supported).

SMBIOS stands for System Management BIOS, while DMI stands for  Desktop Management  Interface.  Both standards are tightly related and developed by the DMTF (Desktop Management Task Force).
 ... 
 ...
DMI TYPES
       The SMBIOS specification defines the following DMI types:

       Type   Information
       ----------------------------------------
          0   BIOS
          1   System
          2   Base Board
          3   Chassis
          4   Processor
          5   Memory Controller
          6   Memory Module
          7   Cache
          8   Port Connector
          9   System Slots
         10   On Board Devices
         11   OEM Strings
         12   System Configuration Options
         13   BIOS Language
         14   Group Associations
         15   System Event Log
         16   Physical Memory Array
         17   Memory Device
         18   32-bit Memory Error
         19   Memory Array Mapped Address
         20   Memory Device Mapped Address
         21   Built-in Pointing Device
         22   Portable Battery
         23   System Reset
         24   Hardware Security
         25   System Power Controls
         26   Voltage Probe
         27   Cooling Device
         28   Temperature Probe
         29   Electrical Current Probe
         30   Out-of-band Remote Access
         31   Boot Integrity Services
         32   System Boot
         33   64-bit Memory Error
         34   Management Device
         35   Management Device Component
         36   Management Device Threshold Data
         37   Memory Channel
         38   IPMI Device
         39   Power Supply</pre>Go ahead and give it a try.  You may be surprised at the plethora of information available to you with such a simple command.<br />
<br />
<pre>/usr/sbin/dmidecode</pre>Below is the output of "dmidecode" on a small desktop server:<br />
<pre># dmidecode 2.7
SMBIOS 2.4 present.
24 structures occupying 3009 bytes.
Table at 0x000F0000.

Handle 0x0000, DMI type 0, 24 bytes.
BIOS Information
        Vendor: Phoenix Technologies, LTD
        Version:  5.08
        Release Date: 04/27/2007
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 512 kB
        Characteristics:
                PCI is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/360 KB floppy services are supported (int 13h)
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 KB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                LS-120 boot is supported
                ATAPI Zip drive boot is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported
                Targeted content distribution is supported
        BIOS Revision: 5.8
Handle 0x0001, DMI type 1, 27 bytes.
System Information
        Manufacturer: Compaq-Presario
        Product Name: GC662AA-ABA SR5113WM
        Version:
        Serial Number: CNH720064C
        UUID: 80DE8209-206F-1210-BE87-8ECDE0505874
        Wake-up Type: Power Switch
        SKU Number: GC662AA#ABA
        Family: 103C_53316J

Handle 0x0002, DMI type 2, 8 bytes.
Base Board Information
        Manufacturer: ASUSTek Computer INC.
        Product Name: IVY
        Version: 1.01
        Serial Number: MS1C74S30100479

Handle 0x0003, DMI type 3, 17 bytes.
Chassis Information
        Manufacturer: Hewlett-Packard
        Type: Desktop
        Lock: Not Present
        Version: Chassis Version
        Serial Number: BB0001
        Asset Tag:
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000

Handle 0x0004, DMI type 4, 35 bytes.
Processor Information
        Socket Designation: Socket AM2
        Type: Central Processor
        Family: Athlon 64
        Manufacturer: AMD
        ID: B1 0F 06 00 FF FB 8B 17
        Signature: Extended Family 0, Model B, Stepping 1
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                MMX (MMX technology supported)
                FXSR (Fast floating-point save and restore)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                HTT (Hyper-threading technology)
        Version: AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
        Voltage: 1.2 V
        External Clock: 200 MHz
        Max Speed: 3700 MHz
        Current Speed: 1900 MHz
        Status: Populated, Enabled
        Upgrade: Socket 940
        L1 Cache Handle: 0x0008
        L2 Cache Handle: 0x0009
        L3 Cache Handle: Not Provided
        Serial Number:
        Asset Tag:
        Part Number:

Handle 0x0005, DMI type 5, 20 bytes.
Memory Controller Information
        Error Detecting Method: 64-bit ECC
        Error Correcting Capabilities:
                None
        Supported Interleave: One-way Interleave
        Current Interleave: One-way Interleave
        Maximum Memory Module Size: 1024 MB
        Maximum Total Memory Size: 2048 MB
        Supported Speeds:
                70 ns
                60 ns
                50 ns
        Supported Memory Types:
                DIMM
        Memory Module Voltage: 2.9 V
        Associated Memory Slots: 2
                0x0006
                0x0007
        Enabled Error Correcting Capabilities:
                None

Handle 0x0006, DMI type 6, 12 bytes.
Memory Module Information
        Socket Designation: A0
        Bank Connections: 0
        Current Speed: 6 ns
        Type: DIMM
        Installed Size: 512 MB (Single-bank Connection)
        Enabled Size: 512 MB (Single-bank Connection)
        Error Status: OK

Handle 0x0007, DMI type 6, 12 bytes.
Memory Module Information
        Socket Designation: A1
        Bank Connections: 2
        Current Speed: 6 ns
        Type: DIMM
        Installed Size: 512 MB (Single-bank Connection)
        Enabled Size: 512 MB (Single-bank Connection)
        Error Status: OK

Handle 0x0008, DMI type 7, 19 bytes.
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 128 KB
        Maximum Size: 128 KB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Data
        Associativity: 4-way Set-associative

Handle 0x0009, DMI type 7, 19 bytes.
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Not Socketed, Level 2
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 512 KB
        Maximum Size: 512 KB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Unified
        Associativity: 4-way Set-associative
Handle 0x000A, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCI1
        Type: 32-bit PCI
        Current Usage: In Use
        Length: Short
        ID: 1
        Characteristics:
                5.0 V is provided
                PME signal is supported

Handle 0x000B, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCI2
        Type: 32-bit PCI
        Current Usage: Available
        Length: Short
        ID: 2
        Characteristics:
                5.0 V is provided
                PME signal is supported

Handle 0x000C, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIEX16
        Type: x16 PCI Express
        Current Usage: Available
        Length: Short
        Characteristics:
                5.0 V is provided
                PME signal is supported

Handle 0x000D, DMI type 9, 13 bytes.
System Slot Information
        Designation: PCIEX1_1
        Type: x1 PCI Express
        Current Usage: Available
        Length: Short
        Characteristics:
                5.0 V is provided
                PME signal is supported

Handle 0x000E, DMI type 13, 22 bytes.
BIOS Language Information
        Installable Languages: 3
                n|US|iso8859-1
                n|US|iso8859-1
                r|CA|iso8859-1
        Currently Installed Language: n|US|iso8859-1

Handle 0x000F, DMI type 16, 15 bytes.
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 2 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

Handle 0x0010, DMI type 17, 27 bytes.
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 512 MB
        Form Factor: DIMM
        Set: None
        Locator: A0
        Bank Locator: Bank0/1
        Type: DDR2
        Type Detail: None
        Speed: 667 MHz (1.5 ns)
        Manufacturer: 7F7F7F7F7F510000
        Serial Number: None
        Asset Tag: None
        Part Number: 64T64000HU3SB

Handle 0x0011, DMI type 17, 27 bytes.
Memory Device
        Array Handle: 0x000F
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 512 MB
        Form Factor: DIMM
        Set: None
        Locator: A1
        Bank Locator: Bank2/3
        Type: DDR2
        Type Detail: None
        Speed: 667 MHz (1.5 ns)
        Manufacturer: 7F7F7F7F7F510000
        Serial Number: None
        Asset Tag: None
        Part Number: 64T64000HU3SB

Handle 0x0012, DMI type 19, 15 bytes.
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x0003FFFFFFF
        Range Size: 1 GB
        Physical Array Handle: 0x000F
        Partition Width: 0

Handle 0x0013, DMI type 20, 19 bytes.
Memory Device Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x0001FFFFFFF
        Range Size: 512 MB
        Physical Device Handle: 0x0010
        Memory Array Mapped Address Handle: 0x0012
        Partition Row Position: 1

Handle 0x0014, DMI type 20, 19 bytes.
Memory Device Mapped Address
        Starting Address: 0x00020000000
        Ending Address: 0x0003FFFFFFF
        Range Size: 512 MB
        Physical Device Handle: 0x0011
        Memory Array Mapped Address Handle: 0x0012
        Partition Row Position: 1

Handle 0x0015, DMI type 32, 11 bytes.
System Boot Information
        Status: No errors detected

Handle 0x0016, DMI type 11, 5 bytes.
OEM Strings
        String 1: bid=73NAv3PrA1;PROD_MSWORKS;DLED;IS.N60d;ACPwrFail=Off;Chan=Reta
        String 2: il;CPUFan=On;DVDRW;LegacyFloppy=No;TVout=NTSC;PCBRAND=Presario;O
        String 3: S=MSV;R_WM;LScribe;DVDP_STD;Vos.H;PROD_MSOFFHST;MDVD_B;RC_B;FPA=
        String 4: H;C_MAR;.G4;##HPCPC=00000000<90000006020000000420000253514130040
        String 5: 000010001000;5;:0665<;85>18>1<2=1:<55>?4;;=?=19:<8494;>:8011<=31
        String 6: 953=?76?>378139;594701:=;34:;55;9128<7937==0<722<:<1:2489>:088=6
        String 7: :?1;2>8=8>12691>>286:9?;4454>3<3>89909>=738375;02951<;>=??2?70>7
        String 8: 5;04<815:33<20846?312127;?24876>7488457<0;0?39>9;?407;8;8;09>=;=
        String 9: =>231>;?456:100000006;00000000002000840515?454=435<49434=2340534
        String 10: 7594>444?47535020000000000000000000000000000000000000000?24?4195
        String 11: 4<8?4243:463542:9034;??09<31;8951=>:><6>3291=35:7;:7?<0;=973478<
        String 12: 4:062629<>53103<<=4651<3499:7?769::98;357697=:3483>07=6;>1<1?<>7
        String 13: <817?5586>79?5:5?19<87:>=6507148017=835>552096;714776===1=59:5:9
        String 14: ;7?16>;910;6<?>4?;=21?;7975:6660><>729>:9<98<5<=991>7?7>
        String 15:
        String 16:
        String 17:
        String 18:
        String 19:
        String 20:
        String 21:
        String 22:
        String 23:
        String 24:
        String 25:
        String 26:
        String 27:
        String 28:
        String 29:
        String 30:
        String 31:
        String 32:

Handle 0x0017, DMI type 127, 4 bytes.
End Of Table</pre><br />
Many users are aware that you can get a more basic overview in Linux by going to "cpuinfo" in "/proc."  Though you don't get anywhere near as much info, sometimes "cpuinfo" contains enough information.  To get that info execute the command:<br />
<br />
<pre>cat /proc/cpuinfo</pre>Example output below:<br />
<pre>processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 107
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
stepping        : 1
cpu MHz         : 1000.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips        : 2010.87
clflush size    : 64
power management: ts fid vid ttp tm stc 100mhzsteps

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 107
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
stepping        : 1
cpu MHz         : 1000.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips        : 2010.87
clflush size    : 64
power management: ts fid vid ttp tm stc 100mhzsteps</pre><br />
Hopefully these simple Linux utilities will come in handy for you as you get handed new servers to maintain... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/11-Determine-32-or-64-bit-Server.html" rel="alternate" title="Determine 32 or 64-bit Server" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T23:22:22Z</published>
        <updated>2009-05-05T14:03:49Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=11</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/5-Utilities" label="Utilities" term="Utilities" />
    
        <id>http://blog.valcora.com/index.php?/archives/11-guid.html</id>
        <title type="html">Determine 32 or 64-bit Server</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                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!<br />
<br />
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!"<br />
<br />
If you want to be sure, the easiest thing to do is run the "gentconf" utility in Linux:<br />
<br />
<pre>getconf LONG_BIT</pre>The above will display either 32 or 64.  It doesn't get any easier than that!<br />
<br />
Another method is below though this output is less obvious:<br />
<pre>uname -m</pre>You might also want to check all of the output of the "uname" command which can give you some great information!<br />
<pre>uname -a</pre>Anyway, that's it for this post.  If you have any other great simple methods, let us know.  We would love <br />
to hear about them! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/10-Remembering-MySQL-3.23.html" rel="alternate" title="Remembering MySQL 3.23" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T20:55:33Z</published>
        <updated>2009-05-04T21:28:02Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=10</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=10</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/1-MySQL" label="MySQL" term="MySQL" />
    
        <id>http://blog.valcora.com/index.php?/archives/10-guid.html</id>
        <title type="html">Remembering MySQL 3.23</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Dearly beloved, we are gathered here today to remember MySQL 3.23...  <br />
<br />
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...<br />
<br />
Where you around when MySQL 3.23 was released?  We certainly were.  <br />
<br />
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!<br />
<br />
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.<br />
<br />
Anyway, back to MySQL...<br />
<br />
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!<br />
<br />
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!<br />
<br />
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.<br />
<br />
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!<br />
<br />
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.  <br />
<br />
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!<br />
<br />
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.<br />
<br />
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!<br />
<br />
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! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/9-Our-PHP-Experiences.html" rel="alternate" title="Our PHP Experiences" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T20:29:28Z</published>
        <updated>2009-05-04T20:53:07Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=9</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=9</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/4-PHP" label="PHP" term="PHP" />
    
        <id>http://blog.valcora.com/index.php?/archives/9-guid.html</id>
        <title type="html">Our PHP Experiences</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                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!<br />
<br />
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.  <br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
Ah, those were the days, we sometimes want to forget... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/8-About-Valcora.html" rel="alternate" title="About Valcora" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T20:17:51Z</published>
        <updated>2009-05-04T20:17:51Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=8</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/2-Valcora" label="Valcora" term="Valcora" />
    
        <id>http://blog.valcora.com/index.php?/archives/8-guid.html</id>
        <title type="html">About Valcora</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                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!<br />
<br />
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.<br />
<br />
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!<br />
<br />
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?  <br />
<br />
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!<br />
<br />
Keep an eye out for us.  Maybe we can help your business as well! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/7-Monitoring-Disk-Space.html" rel="alternate" title="Monitoring Disk Space" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T18:15:56Z</published>
        <updated>2009-05-05T14:01:36Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=7</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/3-Scripts" label="Scripts" term="Scripts" />
    
        <id>http://blog.valcora.com/index.php?/archives/7-guid.html</id>
        <title type="html">Monitoring Disk Space</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                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.<br />
<br />
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...<br />
<br />
<pre>#!/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
</pre><br />
This would be a simple process to cron.  Let us know if this has been of any help to you! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/6-Export-All-To-CSV.html" rel="alternate" title="Export All To CSV" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T18:00:27Z</published>
        <updated>2009-05-05T14:00:56Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=6</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=6</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/3-Scripts" label="Scripts" term="Scripts" />
    
        <id>http://blog.valcora.com/index.php?/archives/6-guid.html</id>
        <title type="html">Export All To CSV</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Last night I was asked by a client to export all of the tables into CSV format.  I thought no problem.  Then I saw the long list of table names!  They wanted every one of them in CSV format!  At that point, I started thinking about making a backup and then importing them all as CSV storage engine and then I realized CSV was disabled on the sandbox server!  So, I thought well, I could try MySQL Query Browser, but then I figured I would still have to do it on a table-by-table basis.  That is when I decided to go the Bash script route!<br />
<br />
This lead to the formation of the brief script you see below.  It simply connects to a given database, shows the list of tables, and then dumps out the contents in CSV format to individual files named <em>tablename</em>.csv in the current directory.  After just a few minutes of scripting, it was all over and I had a handy little script for the next time they or another client ask for the same thing!<br />
<br />
Hopefully this script will be of some value to everyone else as well.  Just be sure to change the configuration section to meet your needs.<br />
<br />
Name the file something like: export_csv.sh.  Then be sure to make it executable.  In Linux, do something like "chmod a+x ./export_csv.sh" and you should be able to rock and roll.  <br />
<br />
If you want to have all of the scripts in a certain directory, you could either modify the script or just make the cirectory, "cd" into it, and then run the script.  It assumes you want to create the files in the current working directory.  To change that behavior, you could easily modify the "OUTFILE" variable to something like:<br />
<pre>OUTFILE="/my_path/$TABLE.csv"</pre><br />
Anyway, here is the script for your enjoyment and use!<br />
<br />
<pre>#!/bin/bash
#
# Simple script to crawl through all tables in a database and export to CSV format.
#
# Valcora: http://www.valcora.com
#

#### Begin Configuration ####
DB="mydb"
MYSQL_USER="root"
MYSQL_PASSWD="mypass"
MYSQL_HOST="127.0.0.1"
MYSQL_PORT="3306"
MYSQL="/usr/bin/mysql"
#### End Configuration ####

MYSQL_CMD="$MYSQL -u $MYSQL_USER -p$MYSQL_PASSWD -P $MYSQL_PORT -h $MYSQL_HOST"

TABLES=`$MYSQL --batch -N -D $DB -e "show tables"`
for TABLE in $TABLES
do
  SQL="SELECT * FROM $TABLE;"
  OUTFILE=$TABLE.csv
  $MYSQL --database=$DB --execute="$SQL" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > $OUTFILE
done
</pre><br />
As always, be sure to test this script on a non-critical server first to ensure it is working to your satisfaction.  There is no error trapping, so be sure you don't accidentally over-write important files! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/5-Converting-Storage-Engine.html" rel="alternate" title="Converting Storage Engine" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T17:46:21Z</published>
        <updated>2009-05-05T13:59:13Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=5</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=5</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/3-Scripts" label="Scripts" term="Scripts" />
    
        <id>http://blog.valcora.com/index.php?/archives/5-guid.html</id>
        <title type="html">Converting Storage Engine</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Have you ever been asked to convert all of the tables in a given database or on a server to a new storage engine?  Well, we have!  Sometimes, if it is only a few tables, firing off a few "ALTER TABLE ... ENGINE=InnoDB;" is fine.  Other times, it is a nightmare if there are lots of tables and/or databases.<br />
<br />
To make our life easier in such times, we created the following Bash script.  Save the file as something like "convert_tables.sh" and make sure to make it executable.  You can do this in Linux by executing "chmod a+x ./convert_tables.sh."  Take a look at the code and we will give you an example of how to run it!<br />
<br />
<pre>#!/bin/bash
# Crawl through all of the tables in a database or databases and convert all tables to a given storage engine.
# 
# Valcora: http://www.valcora.com
#

#### Begin Configuration ####
DBNAMES="mydb1 mydb2"		# Separate list of Databases by spaces
NEW_ENGINE_TYPE="InnoDB"	# Storage engine to convert all tables to
DBEXCLUDE="information_schema mysql horde bacula vpopmail" # Databases to ignore
MYSQL_HOST="127.0.0.1"
MYSQL_PORT="3306"
MYSQL_USER="root"
MYSQL_PASSWD="mypass"
MYSQL="/usr/bin/mysql"
#### End Configuration ####

# Setup authentication info for mysql client
AUTH="-u $MYSQL_USER -p$MYSQL_PASSWD -P $MYSQL_PORT -h $MYSQL_HOST"

# Get our list of databases to change...
# NOTE: the DBEXCLUDE feature seemed to only work with Linux regex, GNU sed
if [ "$DBNAMES" = "all" ]; then
  DBNAMES="`$MYSQL $AUTH --batch -N -e "SHOW DATABASES"`"
  for i in $DBEXCLUDE
  do
    DBNAMES=`echo $DBNAMES | sed "s/\b$i\b//g"`
  done
fi

# Run through each database and execute our ALTER TABLE command for each table...
for i in $DBNAMES
do
  # to fancy up our log file
  echo ""
  echo "Database: $i"
  echo "---------------------------------------------------------"

  DBTABLES="`$MYSQL $AUTH --batch -N -e "SHOW TABLES" -D $i`"

  for j in $DBTABLES
  do
    echo "ALTER TABLE $j TYPE=$NEW_ENGINE_TYPE;" | $MYSQL $AUTH -D $i
  done
  echo ""
done
</pre><br />
If you want to convert all tables in all databases, you could set the "DBNAMES" variable in the configuration section to "all".  To convert certain databases, simply set it to a list of database names separated by spaces.  And finally to only convert tables in a given database, you could simply list one name there.<br />
<br />
We have foudn this useful over the years when implementing some piece of software that we downloaded.  We love Open Source too mind you!  But, we don't always like their choice of Storage Engines since a lot of developers use MyISAM.  When appropriate, we like to run InnoDB.  Using this script, it is easy to run through all of the tables and make the conversion in a matter of no time.<br />
<br />
Anyway, good luck and as always be sure to test this on a machine that is not critical before implementing.  And of yeah, be sure to make a backup first.  Just in case... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/4-Finding-All-MyISAM-Tables.html" rel="alternate" title="Finding All MyISAM Tables" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T17:31:05Z</published>
        <updated>2009-05-05T14:43:03Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=4</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=4</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/3-Scripts" label="Scripts" term="Scripts" />
    
        <id>http://blog.valcora.com/index.php?/archives/4-guid.html</id>
        <title type="html">Finding All MyISAM Tables</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Below is a small Bash script to crawl through all the tables in a MySQL database and look for any and all MyISAM tables.  We developed this script when we realized that a team of developers were ignoring our requests to create all tables as InnoDB.  We set the default storage engine to be InnoDB, however, the team would declare the Storage Enginge to be MyISAM which caused MySQL to ignore our default declaration.<br />
<br />
Yes, we could run a "SHOW TABLE STATUS," but that would require staring at a lot of table entries in some databases.  Naturally, we could also query the Information Schema database as well.  All of those methods are fine.  For our purposes, we wanted a fairly simple script that would do the scanning for us lazy types and yet work on pretty well all versions of MySQL.<br />
<br />
To solve the problem, we developed this simple script to find any and all tables that were MyISAM format.  With that in mind, all of the values are hard-coded into the script to make cronning it simple!  You could simply define your cron entry to send the output to an email address.<br />
<br />
Save the below code as something like "find_myisam_tables.sh" and make sure it is executable by executing a "chmod a+x find_myisam_tables.sh."  Just be sure to chage the configuration values to match your needs and the locations of the binaries. <br />
<br />
<pre>#!/bin/bash
#
# This is a small bash script that checks all tables in a given database and looks for MyISAM tables.
#
# Written by Valcora
# http://www.valcora.com

DBNAMES=$1

MYSQL="/usr/bin/mysql"
MYSQL_HOST="localhost"
MYSQL_USER="root"
MYSQL_PASSWD="password"
MYSQL_SOCKET="/tmp/mysql.sock"
MYSQLCONNECT="$MYSQL -u$MYSQL_USER -p$MYSQL_PASSWD -h $MYSQL_HOST -S $MYSQL_SOCKET"

echo "=========================================="
echo "=             MyISAM Tables              ="
echo "=========================================="

# Use MySQL 'SHOW DATABASES'
DATABASES="`$MYSQLCONNECT --batch -N -e "show databases"`"

# Loop through each instance of MySQL and check all databases in that instance
for DATABASE in $DATABASES
do
  TABLES="`$MYSQLCONNECT --batch -D $DATABASE -N -e "show tables"`"
  for TABLE in $TABLES 
  do
    STORAGE_ENGINE=`$MYSQLCONNECT -D $DATABASE --batch -N -e "show table status like '$TABLE'" | awk '{print $2}'`
    if [ "$STORAGE_ENGINE" = "MyISAM" ]
    then
      echo "$DATABASE.$TABLE"
    fi
  done
done</pre><br />
To call the script just execute something like:<br />
<pre>./find_myisam_tables.sh <database name></pre><br />
Well, feel free to modify the script in any manner you want.  You may want to search for other storage engine types also.  <br />
<br />
Let us know if this script has been of any help.  We would love to hear from you! 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.valcora.com/index.php?/archives/3-DBA-Scripts.html" rel="alternate" title="DBA Scripts" />
        <author>
            <name>Valcora</name>
                    </author>
    
        <published>2009-05-04T17:23:49Z</published>
        <updated>2009-05-04T17:46:16Z</updated>
        <wfw:comment>http://blog.valcora.com/wfwcomment.php?cid=3</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.valcora.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=3</wfw:commentRss>
    
            <category scheme="http://blog.valcora.com/index.php?/categories/3-Scripts" label="Scripts" term="Scripts" />
    
        <id>http://blog.valcora.com/index.php?/archives/3-guid.html</id>
        <title type="html">DBA Scripts</title>
        <content type="xhtml" xml:base="http://blog.valcora.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Over the years the DBA's have created simple Bash and PHP scripts to make their life easier.  We feel that sharing these with the MySQL community may help our fellow database administrators and make their life a little easier from time to time!<br />
<br />
With that in mind, we will periodically post a new script that we hope will be of some value.  Some of the scripts are meant to perform regular maintenance activity, routine tasks, and/or query the database schema for certain table types, and such.  <br />
<br />
Some of the scripts may work as-is, while others may need to be modified to suit your needs.  Either way, it should provide a starting point for accomplishing your work.<br />
<br />
Naturally, we can make no guarantees as to the effectiveness of these scripts.  It should go without saying that you need to always test them on a non-critical server before you attempt to run them in a critical production environment.  While, we believe our scripts are safe for most applications, you must be the final judge whether they fit your purpose or not as well as whether they would be safe to run on your systems!<br />
<br />
Now that we have our disclaimer out of the way, we hope that you will find these to be as valuable as we have.  Enjoy! 
            </div>
        </content>
        
    </entry>

</feed>