I am facing an error of "Broken Pipe" in mysql database connection. That error appear when the server isn't accessed by anyone till 8 hours, the connection is timeout and can't connect to mysql database server. I find and try many way for that error. In that, setting wait_timeout variable from 28800 to 86400 (means 8 hours to 24 hours). In that, I had copied my.cnf file from etc/mysql/my.cnf to etc/my.cnf to set user specification value and add variable like :
[mysql]
wait_timeout = 86400
interactive_timeout = 86400
But when I login to mysql with command mysql -u root -p, the following error is shown: mysql: unknown variable 'wait_timeout=86400'
How can I set wait_timeout variable in ubuntu linux server. Pls
Try placing
wait_timeout = 86400
interactive_timeout = 86400
under [mysqld] ie,
[mysqld]
wait_timeout = 86400
interactive_timeout = 86400
and restart mysql server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With