Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I Am using an external mysql-server to work with akonadi. (using KDE4). Now I could solve all problems with it, but I still have to apply some settings to the "mysql-global.conf"-file of the server. That's what is suggested for example:

# wait 365d before dropping the DB connection (default:8h)


So I tried to change this setting via the mysql console. But it's not reflected anywhere in the /etc/mysql/my.cnf file.

(etc/akonadi/mysql-global.conf seems to have no effect on the mysql-server either!)

My question: Where to put these (or similar) settings to apply them in a way that akonadi won't drop the connection with an external server (globally I guess?)?

share|improve this question
up vote 1 down vote accepted

Setting a variable in the mysql console will not update the my.cnf - it is reflected only until the mysql daemon exits.

/etc/mysql/my.cnf is the correct place to put it though, under the [mysqld] heading.

It will be loaded in after a restart, alternatively to do it immediately in mysql console as well (this sounds like what you tried already):

SET GLOBAL wait_timeout = 31536000;

Update in response to "doesn't work" comment:

Quote from docs [1]:

On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()).

So changing it does work, but you can't see the result in a mysql console session. Try changing interactive_timeout for that.

To see that it is taking effect, use SHOW GLOBAL VARIABLES instead:



share|improve this answer
Thx! I will fill in all the akonadi mysql settings into the global file and hope (!) that it will not affect other database apps in a bad way ... – piedro Nov 21 '11 at 22:25
The entry in my.cnf shows no effect at all! When I look at the actual values with SHOW VARIABLES it says it's still 28800! Yes I have restarted the service and even the whole system! – piedro Nov 22 '11 at 9:35
It does work. Your variable isn't being adjusted because you are an interactive session. You want interactive_timeout for your console session, and wait_timeout for your script. – Caesium Nov 22 '11 at 9:43
See my update to the answer. Can I have my green tick back now please? ;) – Caesium Nov 22 '11 at 9:49
thx, but still it seems that kmail with akonadi is still loosing the connection after 8 hours ... – piedro Nov 24 '11 at 0:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.