2

I installed the mysql-5.6.15-debian6.0-i686.deb file on a MySQL site,and I installed it using the dpkg command but after that when I am writing:

1)sudo service mysql start The Answer is: mysql: unrecognized service

2) dpkg -l |grep server No result came. How shall I attach the service from the /opt/MySQL folder?

1
  • 2
    Does this help? Try it with mysqld as well, and try running sudo initctl reload-configuration beforehand. You may also need to install mysql-server with sudo apt-get install mysql-server.
    – Wilf
    Dec 17, 2013 at 13:21

1 Answer 1

2

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.

1
  • In theory. I downloaded dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb and dpkg -i mysql-apt-config_0.8.12-1_all.deb. After an apt update I've installed with an apt install mysql-server and got the same error unrecognized service when doing sudo service mysql start. I did thin in the LXSS Ubuntu18 Windows 10 Env. Doing the same(!) in an Ubuntu vagrant machine works as expected. Mar 8, 2019 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .