24 lines
684 B
Markdown
24 lines
684 B
Markdown
|
В файле `/etc/mysql/mysql.conf.d/mysqld.cnf` (или `/etc/mysql/mariadb.conf.d/50-server.cnf`) задать параметр:
|
|||
|
|
|||
|
```shell
|
|||
|
bind-address=0.0.0.0
|
|||
|
```
|
|||
|
|
|||
|
Перезагрузить конфиги #mysql или весь mysql:
|
|||
|
|
|||
|
```shell
|
|||
|
systemctl reload mysql
|
|||
|
# или
|
|||
|
systemctl restart mysql
|
|||
|
```
|
|||
|
|
|||
|
Подключиться к БД и выполнить:
|
|||
|
|
|||
|
```SQL
|
|||
|
update mysql.user set host='%', plugin='' where user='username';
|
|||
|
flush privileges;
|
|||
|
```
|
|||
|
|
|||
|
> [!seealso]
|
|||
|
> [Under MySQL 8.0. Give the new user all permissions for all privileges, and then cancel the error ERROR1227 : SYSTEM_USER privilege(s) for this operation](http://programmersought.com/article/26621841193/)
|