How do I start/stop mysql server?

I found this link for MySQL database:

How to start/stop MySql server on Ubuntu 8.04

# To install MySql database:

sudo apt-get install mysql-server

# To start MySql server:

/etc/init.d/mysql start

# To stop MySql server:

/etc/init.d/mysql stop

# To restart MySql server:

/etc/init.d/mysql restart

# To check the status of  MySql server:

/etc/init.d/mysql status


In case you want to investigate why a DB MYSQL can stop or crash you should check the log on the following location:


Eventually the mysql crash happens for the reason of not having enought memory:


And the solution for adding more swap memory is in this link: