6

I tried installing MySQL Server in my Kali Linux but when I ran this command

apt-get install mysql-server

This error comes

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.1

Is there no packages for MySQL Server for Kali Linux rolling?

2 Answers 2

4

MySQL is installed and configured by default in Kali. Are you trying to install a different version?

If the problem is in starting MySQL, one can find very many sources that describe it.

See for example the article Start MySQL and Apache in Kali Linux.

1
  • Your suggestion is to start mysql service which in turn start MariaDB which is not mysql! it is an open source database and might not integrate smoothly using tools like spring JPA which needs conector for example. Commented Jan 10, 2020 at 9:57
7

Actually, for Kali Linux the apt-get install mysql-server command will not work, but try with apt-get install mariadb-server.

This will install MySQL

3
  • 1
    OK so let's make it clear to OP that this will not necessarily install MySQL but instead the MariaDB fork which is more used today. Just to make sure that if he needs to run something on the original MySQL he doesn't get screwed without realising. For that reason I'm downvoting, not a clear answer.
    – rassa45
    Commented Jul 1, 2018 at 1:21
  • I'm currently running KALI-LINUX (version/Codename: kali-rolling) on a Raspberry Pi for some tests; since "v kali-rolling, release 2019.4" is essentially a watered-down version of KALI-LINUX, it's not currently supported by the standard MySQL repository- evidently, installing mariadb server (ie sudo apt-get install mariadb-server) is the only way to run MySQL on KALI-LINUX (kali-rolling) for a Raspberry Pi (eg service mysql start and then standard log-in (eg `mysql -u username -p your-password). Hope that also helps and thanks! Commented Sep 14, 2019 at 16:48
  • Someone need to improve the reputation mechanism of this website so that people like me could write answer instead of comment(If any of you readers has enough please copy paste my comment to be an answer). 1. MariaDB is an open source database developed and maintained by former MySql developers 2. The command "service mysql start" on kali will start MariaDB 3. In order to install anything on Ubuntu which is the base OS kali is built on you need to add MySql repository dev.mysql.com/doc/mysql-apt-repo-quick-guide/en verify the checksum! 4. Now the command will work Commented Jan 10, 2020 at 10:06

You must log in to answer this question.

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