First of all, the easiest way to install mysql on Ubuntu/Debian is with the help of APT:
sudo apt-get install mysql-server
If you do not have internet connectivity, or if you really want to install the version downloaded from mysql.org, then you should read the doc from mysql.org, especially this section:
Installing MySQL on Linux
For many Linux installations, you will want to set up MySQL to be started automatically when your machine starts. Many of the native package installations perform this operation for you, but for source, binary and RPM solutions you may need to set this up separately.
The required script, mysql.server, can be found in the support-files directory under the MySQL installation directory or in a MySQL source tree. You can install it as /etc/init.d/mysql for automatic MySQL startup and shutdown. See Section 2.10.1.2, “Starting and Stopping MySQL Automatically”.
Basically, it says that if you install via apt-get
, everything is smoothly integrated within your init system. But if you install from a debfile, you have to integrate it yourself.
mysqld
as well, and try runningsudo initctl reload-configuration
beforehand. You may also need to installmysql-server
withsudo apt-get install mysql-server
.