Using the MySQL command line tool

MySQL has a useful command line tool which can be used to query and manage databases and users. This command is simply "mysql" and will usually be in the command path on Linux and BSD distributions, although to use it on Windows you would normally first need to change to the directory/folder that the MySQL binary applications are before running "mysql". This post gives a brief overview of logging in and a couple of commands for listing and changing databases, and running queries

Reverse Mapping Checking – Possible Break-in Attempt Error with SSH

When you connect to a host using SSH or SFTP it does a series of checks to ensure you are connecting to the host you are expecting to connect to. One of these is a reverse lookup on the IP address to check the hostname is the same as the hostname you are connecting to. If it’s not, you’ll get an error message like "reverse mapping checking getaddrinfo for … POSSIBLE BREAK-IN ATTEMPT!". The post looks at a solution to this message.

Howto Restart Apache

If you have made changes to the Apache configuration file httpd.conf, or one of the other included configuration files (eg vhosts.d files), you need to reload the Apache service for the changes to take effect.

Change the timezone on CentOS

I recently needed to set up a CentOS 5 box and completely forgot how to set the timezone. There’s apparantly a nice easy text GUI for doing it in RHEL but I couldn’t find the same thing on the CentOS box so here’s how to do it. It should also work for most Linux systems.

Find the length of the longest string in MySQL

There are a number of string functions in MySQL for extracting text, working out the position of a substring, calulating the length of text and so on. This post looks at how to work out the length of the longest string in a field in a MySQL table.

Set the default font size for phpMyAdmin

phpMyAdmin is a web based administrative tool for the MySQL database server. After logging in to phpMyAdmin there’s a drop down box to select the font size as a percentage which always defaults to 100% and is too big for my liking. After changing the value, the font size is remembered as a cookie so the next time you log in the font size chosen is remembered. However the font size cookie drops off eventually and when logging into a phpMyAdmin that I haven’t logged into for a while I find it annoying having to change the font size each time. This post looks at how to change the default phpMyAdmin font size.

Categories PHP