# Установка mysql

### Настройка MySQL PPA

Загрузите конфигурационный пакет MySQL PPA с официального сайта MySQL. Нижеприведенные команды автоматически установит настройку PPA MySQL на Debian&#x20;

```
wget http://repo.mysql.com/mysql-apt-config_0.8.9-1_all.deb
```

```
dpkg -i mysql-apt-config_0.8.9-1_all.deb
```

С установкой вышеуказанного пакета это предложит выбрать версию MySQL для установки в вашей системе. Выберите MySQL 5.7 или 5.6 для установки в вашей системе.

![](https://3688341453-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LFBORxsnIqRC2ilyIql%2F-LJos-uEGd2T5obFBUea%2F-LJooKxW_xjGhH2QTb5w%2Fmysql-select-version-on-debian.png?alt=media\&token=77563644-c7d1-41ac-a801-413093111782)

### Установите MySQL

Устанавливаем сам пакет mysql:

```
apt update
```

```
apt install mysql-server
```

Возможно спросит пароль и его подтверждения.

### Открытия БД извне

Если Вам нужно подключаться к MySQL не с localhost, то нужно отредактировать **/etc/mysql/my.cnf** найти строку **bind-address** , что бы он выглядила : &#x20;

```
#bind-address = 127.0.0.1
```

Перезагружаем MySQL:

```
service mysql-server restart
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://evenhost.gitbook.io/ru/ustanovka-mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
