Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1095  / 2 Years ago, wed, july 20, 2022, 11:56:58

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


More From » 11.10

 Answers
6

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.



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



SHOW GLOBAL VARIABLES LIKE 'wait_timeout';


[1] http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_wait_timeout


[#41909] Thursday, July 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
saucdisr

Total Points: 4
Total Questions: 102
Total Answers: 117

Location: Ecuador
Member since Thu, Jun 4, 2020
4 Years ago
;