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)

wait_timeout=31536000

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?)?

1 Answer
1

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 mysql.com 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.

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 ...
–
piedroNov 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!
–
piedroNov 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.
–
CaesiumNov 22 '11 at 9:43

See my update to the answer. Can I have my green tick back now please? ;)
–
CaesiumNov 22 '11 at 9:49

thx, but still it seems that kmail with akonadi is still loosing the connection after 8 hours ...
–
piedroNov 24 '11 at 0:45