Recreate mysql data dir (without backup)
systemctl stop mysql
(rm -r /var/lib/mysql)
mkdir /var/lib/mysql
chown mysql. /var/lib/mysql
mysqld --initialize
You can find password for root in /var/log/mysql/error.log
~A temporary password is generated for root@localhost: xxxxxxxx~
mysql -u root -p
systemctl start mysql
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
среда, 22 августа 2018 г.
Подписаться на:
Сообщения (Atom)