MySql Tips

Posted by Scratches on June 12, 2022

reset mysql root password

1. Stop Service
2. mysqld_safe --skip-grant-tables &
    mysql
    UPDATE mysql.user SET Password=PASSWORD('the-pw') WHERE User='root';
    FLUSH PRIVILEGES;
    \q
3. mysqladmin -u root -p shutdown
     enter new pw
4. Start service