We use cookies to keep our site relevant and easy to use, your continued use of this site is consent that we may set several cookies (see our Privacy & Cookie Policy), click to always allow cookies from our site (and not see this notifcation on your next visit) or read more.Allow Cookies

EU legislation requires that all websites clearly specify if cookies are being used and their purpose, You can read more about how we use cookies (and which cookies we use) in our Privacy and Cookie Policy.

You will see this notification the first time you visit our website unless you accept cookies (in which case we'll set a cookie to remember thay you're happy for us to to set cookies!).

MyTop broken!

In a post way back in January of 2005, I discussed the software MyTop for monitoring connections on your MySQL server. I’ve had it installed and use it semi-regularly – however, it doesn’t always work – often I am greeted with the following error:

Cannot connect to MySQL server. Please check the:

* database you specified “test” (default is “test”)
* username you specified “root” (default is “root”)
* password you specified “” (default is “”)
* hostname you specified “localhost” (default is “localhost”)
* port you specified “3306″ (default is 3306)
* socket you specified “” (default is “”)

The options my be specified on the command-line or in a ~/.mytop
config file. See the manual (perldoc mytop) for details.

Here’s the exact error from DBI. It might help you debug:

Unknown database ‘test’

A pain in the butt, as I get it quite regularly and normally get one of the techs to tinker with it… Here’s the fix!

Simply enter the following command:

echo “db=mysql” > ~/.mytop

This entry was posted on Thursday, July 5th, 2007 at 5:22 pm and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed.