Installing MySQL Server in Kali Linux

4

1

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?

Suz Aann shrestha

Posted 2017-04-25T05:02:32.370

Reputation: 157

Answers

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.

harrymc

Posted 2017-04-25T05:02:32.370

Reputation: 306 093

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. – user2656851 – 2020-01-10T09:57:16.910

3

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

SuperCode

Posted 2017-04-25T05:02:32.370

Reputation: 47

1OK 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. – ytpillai – 2018-07-01T01:21:23.057

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! – alexanderjsingleton – 2019-09-14T16:48:43.290

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 https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/ verify the checksum!
  4. Now the command will work
– user2656851 – 2020-01-10T10:06:16.650