In addition since 0.38 it's available libmysqlclient, I had some problems while using 0.41 with mysql so I updated to the last 1.1.4 and now, on Ubuntu 12.04, it works fine, these are my steps:

[code]sudo wget
tar zxfv gearmand-1.1.4.tar.gz
./configure --disable-libdrizzle
make install[/code]

and then just start the server:

[code]gearmand --verbose DEBUG -l stderr --queue-type=MySQL --mysql-host=localhost --mysql-user=username --mysql-password=something --mysql-table=table_name --mysql-port=3306[/code]

as suggested by Kim the table will be created automatically.. I had few problems with this because after the install, the job server worked fine, but by restarting it, it was outputting these errors:

[code] INFO 2013-02-02 13:24:28.405948 [ main ] Initializing MySQL module
INFO 2013-02-02 13:24:28.410278 [ main ] MySQL module: creating table jobqueue
ERROR 2013-02-02 13:24:28.410620 [ main ] MySQL module: create table failed: Table 'jobqueue' already exists -> libgearman-server/plugins/queue/mysql/
ERROR 2013-02-02 13:24:28.410704 [ main ] Failed to initialize mysql initialize(QUEUE_ERROR) -> libgearman-server/
DEBUG 2013-02-02 13:24:28.411245 [ main ] Shutting down all threads -> libgearman-server/
INFO 2013-02-02 13:24:28.411304 [ main ] Shutdown complete[/code]

By running:
[code]mysql> drop table jobqueue;[/code]
gearmand was creating the table and working well, but again the same error when restarting the job server. So I restarted the machine and now it seems to work fine. Hope is useful, bye!