Как сменить пароль root к MySQL + добавить GRANT привелегии?

  1. service mysql stop (debian way — /etc/init.d/mysql stop)
  2. mysqld_safe —skip-grant-tables & (debian way — /usr/bin/mysqld_safe)
  3. mysql -u root
  4. UPDATE mysql.user SET Password=PASSWORD(‘PASS12345′) WHERE User=’root’;
  5. FLUSH PRIVILEGES;
  6. GRANT ALL PRIVILEGES ON *.* TO ‘root’@’localhost’ IDENTIFIED BY ‘PASS12345’ WITH GRANT OPTION;
  7. exit
  8. service mysqld stop
  9. service mysqld start
  10. mysql -u root -p
  11. PASS12345

Указать новый пароль для панели Vesta CP:
/root/.my.cnf
/usr/local/vesta/conf/mysql.conf

kupereal