I'm using Ubuntu Lucid Lynx (10.04) and installed MySQL server through aptitude. The installation automatically added a user called mysql (it didn't exist in /etc/passwd file at the beginning and it exists there after the installation.) and started MySQL server.
Then I needed to modify my.cnf (in order to enable remote access to the MySQL server). When I restarted MySQL server with
$ sudo /etc/init.d/mysql restart
it hang. But displaying processes by "top" command in another terminal indicated that MySQL server was running with root user. But my.cnf clearly sets
user = mysql
Then I tried
$ sudo service mysql restart
And the result was even worse. It didn't start the MySQL server at all.
As far as I remember, I have never encountered such a problem in the previous versions of Ubuntu.
So my questions are:
How can I start MySQL server with a user called mysql in Ubuntu Lucid Lynx (10.04)?
Which is the most reliable way to start MySQL server in Ubuntu Lucid Lynx (10.04),
/etc/init.d/mysql start
or
service mysql start
or
start mysql
and what is the difference?
Thank you in advance.
Tadatoshi