I've got a local mysql server running on my system, which I'm trying to load a massive existing database into from an sqldump file.
The first time I tried this after about an hour (or so) I got the following error
'ERROR 2013 (HY000): Lost connection to MySQL...
It seems I might be able to sort this out be rectified by increasing the --wait_timeout
command line option.
My question is - how can you start mysql server as a service and pass it command line options in Ubuntu?
To start and stop normally I use
sudo service mysql [start|stop]
but passing arguments here doesn't work. Alternativly, if I start it as a daemon process
sudo mysqld --wait_timeout <#>
How do I then shut it down in a safe way (I'd imagine 'CTRL-C' or `kill -9'ing it would be bad).
System info (if relevant):
mysqld Ver 5.5.31-0ubuntu0.12.04.1 for debian-linux-gnu on x86_64 ((Ubuntu))
Ubuntu 12.04 LTS