Useful Hint for DBAs:Tired of re-typing a long SQL command after making a typo?Add the following line in your home directory's .inputrc file, you will be able to use vi style editing mode inside mysql shell.e.g. ESC k to recall the last command you typed, or ESC j to travel down the command line history .. cheers!

set editing-mode vi

#6.Troubleshooting:

#a. My initial (failed) installation of DBD::mysql#cpan DBD::mysql

Cannot find the file 'mysql_config'! Your execution PATH doesn't seemnot contain the path to mysql_config. Resorting to guessed values!Can't exec "mysql_config": No such file or directory at Makefile.PL line 464.Can't find mysql_config. Use --mysql_config option to specify where mysql_config is locatedCan't exec "mysql_config": No such file or directory at Makefile.PL line 464.Can't find mysql_config. Use --mysql_config option to specify where mysql_config is locatedCan't exec "mysql_config": No such file or directory at Makefile.PL line 464.Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located

#b. The root cause is it needs a file mysql_config which comes with MySQL-devel-community-5.x.x-0.rhel4.

You may get errors like below, that’s non-critical, it merely complains the DBD::mysql test can’t access the ‘test’ database with root account and password “NO”. You can always manually force the installation by entering the working directory ~.CPAN/build/module_name/ and type “make install”.

#e. Clean up:If your server is installed RHEL 4.0 and it already has MySQL, Perl installed, you may need to do some cleaning work to make sure you are using the correct versions of the package for each components. The sooner you do the cleaning job, the better. Once you installed/configured Perl, MySQL, Python, PHP, etc, etc, you find out you need to upgrade a package that’s required by 100 packages, you will feel the pain. That’s why platform engineering is very important for open source technology.

On my system, I have RHEL 4.0, which installed very early version of mysqlclient and perl-DBD-mysql. In fact, the old version perl-DBD-mysql-2.9xx is not compatible with MySQL server 5.x. I need to remove all those obsolete packages without damaging the system.