For new instance data dir:
mysqld --initialize
mysqld: Can't create directory '/xxxx/mysql/' (Errcode: 13 - Permission denied)
add to file /etc/apparmor.d/ usr.sbin.mysqld new location
# Allow data dir access
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/xxxx/mysql/ r, /xxxx/mysq/** rwk,
and reload apparmor
service apparmor reload
other way
apt install appamor-utils
aa-disable /usr/sbin/mysqld
Disabling /usr/sbin/mysqld.
mysqld --initialize
You can find password for root in /var/log/mysql/error.log
A temporary password is generated for root@localhost: xxxxxxxx
Комментариев нет:
Отправить комментарий