Tag Archives: mysql server

MySQL and XAMPP: Change Your Server’s Max Allowed Packet Limit CodeUnit 01 OCT 2010

Just a quick note on how to permanently change your MySQL server’s configuration to allow for a bigger max_allowed_packet limit, basically the variable that controls how long a SQL statement can technically get.

First, locate your my.cnf file, the config file that MySQL generally uses as a default. If you are using XAMPP as your development stack, you’ll find it under C:xamppmysqlbinmy.cnf. Open it up in any text editor (PSPad always works well for me!) and run a search on max_allowed_packet. You should get a result under the #The MySQL Sever heading that reads max_allowed_packet = 1M.

Now it becomes a simple matter of changing that line to whatever you want (limit is 1 GB), e.g. max_allowed_packet = 16M, saving it and then firing up your Services tab and restarting the MySQL service.

Done.

How to Start or Stop MySQL Server on Ubuntu via the Command Line CodeUnit 07 JUL 2010

To stop a MySQL server instance on an Ubuntu linux install via the command line is as simple as entering:

sudo /etc/init.d/mysql stop

Alternatively, to start a MySQL server instance you can simply submit a start command like so:

sudo /etc/init.d/mysql start

Incidentally, if you want to check on the status of a currently running MySQL server instance, you can make use of the status switch:

sudo /etc/init.d/mysql status

Oh, and if you want to install MySQL on the ubuntu machine, simply make use of the usual apt-get suspect and enter:

sudo apt-get install mysql-server

Useful little things to remember if you are working in a terminal only environment, don’t you think? :P

Monitor Your MySQL Database: Spotlight on MySQL CodeUnit 24 MAY 2010

Spotlight on MySQL, or Spotlight for short, is a fantastic tool for monitoring the status of all your MySQL databases via one single screen display.

It basically allows you to specify a number of MySQL connection strings to various databases that you control and once connected, displays a host of valuable, real time information on a nice big black and green screen. It highlights essentially all database activity, from data flowing to and from the database, the number of active sessions, sql statments being executed and a host of more, indepth views of just what exactly is going on inside your MySQL server installation.

On top of all this, it also features a number of other graphical reports detailing various aspects of the MySQL server’s usage and allows you to set certain thresholds, triggering alarms when those thresholds do get crossed if you so wish.

An essential tool in monitoring the performance and stability of your MySQL installation, this really is one of those indispensable applications that you beg your boss to put up on a big screen over your work area, just so that someone at least can keep an eye on the all important backbone of your operation!

Oh, and in case you were wondering, Spotlight works on MySQL server versions 5.0.3 and up (or else basically any that employ the InnoDB storage engine).

Also, although you can purchase the product for Commercial usage, there is a freeware version available for download which you can grab here.

Related Link: http://www.quest.com/spotlight-on-mysql/