Mysql kali linux установка

How to Install MySQL 8.0 on Kali Linux

MySQL is open-source relational database management server and mostly used in web-base technology and is owned by Oracle.

Prerequisites

New Features in MySQL 8.0

  • Transnational Data Dictionary
  • Atomic Data Definition Statement Support
  • Enhanced Security and account management.
  • Persistent runtime configuration
  • Table encryption management
  • MySQL’s JSON functionality Enhancements
  • Support different types of indexes and Query Optimization
  • Supports windows functions
  • Handling client connections on multiple network interfaces

If you want to know detailed features of MySQL 8.0 , go through this link.

Step 1: Download and Install MySQL 8 APT Repository

Below are commands to add/download MySQL APT repository using command line,

sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb

Then, below command is to install above downloaded apt repository,

sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

when we run above command like below prompt will open, click on Ok.

select mysql 8 version

Step 2: How to Install MySQL 8.0 on Kali Linux

Update the System packages

sudo apt-get install mysql-server

Next, you’ll we prompted to enter MySQL root password to access database.

How to Install MySQL 8.0 on Kali Linux 1 How to Install MySQL 8.0 on Kali Linux 2

After entering password , it’s asks for password encryption feature and it is recommended, but here i am selecting Use Legecy Authentication Method.

mysql5.7-password-plugin

Step 3: Secure MySQL Installation

MySQL Server comes with a script mysql_secure_installation this can do multiple security related operations,

Run the below script on command prompt. you’ll first be need to enter the root password which you created during MySQL setup.

You will be asked to opt VALIDATE PASSWORD PLUGIN or not. This enables we to test MySQL Passwords and improve security.

Next, you have to enter yes or No to below security features,

  • Change the password for root ? ((Press Y|Y for Yes, any other key for No)
  • Remove anonymous users? (Press Y|Y for Yes, any other key for No)
  • Disallow root login remotely? (Press Y|Y for Yes, any other key for No)
  • Remove test database and access to it? (Press Y|Y for Yes, any other key for No)
  • Reload privilege tables now? (Press Y|Y for Yes, any other key for No)
$ mysql_secure_installation
Securing the MySQL server deployment. Enter password for user root: Would you like to setup VALIDATE PASSWORD plugin? Press y|Y for Yes, any other key for No: No Change the password for root ? ((Press y|Y for Yes, any other key for No) : No Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done!

We have covered How to Install MySQL 8 on Kali Linux.

Читайте также:  Linux mint запуск android приложений

Step 4: Login to MySQL Database

Use below command to login MySQL database

here , -u flags specifies User Name and -p flags specifies Password.

After entering password , We can see below welcome message,

Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 90 Server version: 8.0.19 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Step 5: Create MySQL Remote User

First, Login to MySQL Server with root user using command line, Login to MySQL using username root and password

Below is command is to create user , here i am creating user “fosstechnix“.

mysql> CREATE USER 'fosstechnix'@'%' IDENTIFIED BY 'fosstechnix@123';

Next, assign the privileges to database with below command , here i am assigning all databases privileges to user fosstechnix, If you want to assign privileges to specific database replace ” .” with database name.

mysql> GRANT ALL PRIVILEGES ON * . * TO 'fosstechnix'@'%';

OR If you want to allow “fosstechnix” user to give privileges to other user.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'fosstechnix'@'%' WITH GRANT OPTION;

To take effect reload the privileges using below command,

Step 6: Enable MySQL Remote Access

By default, In MySQL database server remote access is disabled for security reason. To enable remote connections of MySQL Server, we have to change bind-address in MySQL configuration file. Open the /etc/mysql/mysql.conf.d/mysqld.cnf file

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

Below the [mysqld] section find the Line,

[mysqld] bind-address = 127.0.0.1

And replace it to

Restart the MySQL Server to take effect.

sudo systemctl restart mysql.service

To Enable MySQL 8 on System startup.

sudo systemctl enable mysql.service

Step 7: Start,Stop,Restart and Status of MySQL Service

sudo systemctl start mysql.service
sudo systemctl stop mysql.service

To restart of MySQL Service

sudo systemctl restart mysql.service

To check status of MySQL Service

sudo systemctl status mysql.service

Conclusion

We have covered, How to Install MySQL 8.0 on Kali Linux, Securing MySQL , creating MySQL user, Enable MySQL Remote access and MySQL 8.0 management commands.

Читайте также:  Computers servers windows linux

Источник

How To Install MySQL 8.0 on Kali Linux

How To Install MySQL 8.0 on Kali Linux Databases How To Kali Linux Linux Tutorials mysql

MySQL 8.0 is the latest stable release of MySQL relational database management system. MySQL is a free to use Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL is designed to be stable, reliable, and flexible to use.

We’ll use the available MySQL APT repository to install MySQL 8.0 on Kali Linux. Ensure this repository is added to your system by running the command below.

sudo apt update sudo apt install -y wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

As Kali Linux is not officially supported version, choose the Ubuntu Bionic release.

Mysql kali linux установка

Confirm your root password.

Mysql kali linux установка

When asked for root password, provide the password and confirm it to set.

sudo systemctl enable --now mysql
$ systemctl status mysql ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-03-21 11:15:30 UTC; 2min 31s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Main PID: 2188 (mysqld) Status: "Server is operational" Tasks: 38 (limit: 2377) Memory: 386.5M CGroup: /system.slice/mysql.service └─2188 /usr/sbin/mysqld Mar 21 11:15:29 deb10 systemd[1]: Starting MySQL Community Server… Mar 21 11:15:30 deb10 systemd[1]: Started MySQL Community Server.

Test MySQL 8.0 Database Functionality

You can test if the database server is working fine by creating a test database:

$ sudo mysql -u root -p Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 8 Server version: 8.0.19 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> mysql> CREATE DATABASE test_db; Query OK, 1 row affected (0.01 sec) mysql> SHOW DATABASES; -------------------- | Database | -------------------- | information_schema | | mysql | | performance_schema | | sys | | test_db | -------------------- 5 rows in set (0.01 sec) mysql> EXIT Bye

Install Desktop Database Management Tool

If working with MySQL command line is not your thing, then consider installing a Database Tool to help you. Check out our guide below:

Читайте также:  Восстановление загрузчика альт линукс

You can also see below related Articles:

Источник

Как установить MySQL 8.0 на Kali Linux

hosting.energy недорогой хостинг сайтов

hosting.energy недорогой хостинг сайтов

MySQL 8.0 — это последняя стабильная версия системы управления реляционными базами данных MySQL. MySQL — это бесплатная система управления базами данных (СУБД), в которой используется язык структурированных запросов (SQL). MySQL разработан, чтобы быть стабильным, надежным и гибким в использовании.

Мы будем использовать доступный репозиторий MySQL APT для установки MySQL 8.0 на Kali Linux. Убедитесь, что этот репозиторий добавлен в вашу систему, выполнив команду ниже.

sudo apt update sudo apt install -y wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb

Поскольку Kali Linux не является официально поддерживаемой версией, выберите выпуск Ubuntu Bionic.

Выберите и нажмите клавишу , чтобы подтвердить установку версии.

Установите MySQL 8.0 в Kali Linux

После добавления репо обновите индекс apt и установите mysql-server:

sudo apt update sudo apt install mysql-community-server

Примите лицензионное соглашение на следующих экранах, чтобы начать установку.

Установите пароль root для вашего сервера базы данных MySQL.

Подтвердите свой пароль root.

Выберите плагин аутентификации по умолчанию.

При запросе пароля root укажите пароль и подтвердите его установку.

sudo systemctl enable --now mysql

Проверить статус с помощью:

$ systemctl status mysql ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-03-21 11:15:30 UTC; 2min 31s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Main PID: 2188 (mysqld) Status: "Server is operational" Tasks: 38 (limit: 2377) Memory: 386.5M CGroup: /system.slice/mysql.service └─2188 /usr/sbin/mysqld Mar 21 11:15:29 deb10 systemd[1]: Starting MySQL Community Server… Mar 21 11:15:30 deb10 systemd[1]: Started MySQL Community Server.

Проверка функциональности базы данных MySQL 8.0

Вы можете проверить, нормально ли работает сервер базы данных, создав тестовую базу данных:

$ sudo mysql -u root -p Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.19 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> CREATE DATABASE test_db; Query OK, 1 row affected (0.01 sec) mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | | test_db | +--------------------+ 5 rows in set (0.01 sec) mysql> EXIT Bye

Источник

Оцените статью
Adblock
detector