2014-01-23 3 views
0

Я забыл пароль root, поэтому последовал несколько различных методов для сброса, которые в конечном итоге сработали.MySQL работает только с: skip-grant-tables

Теперь я не могу создавать новые базы данных на PHPmyAdmin, отображается сообщение «no privileges».

Поэтому я стараюсь, чтобы добавить все разрешения на ROOT снова с помощью:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; 

Но тогда я получаю ошибку:

#1290 - The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement 

Так я удалить «Скип-грант столы» от my.ini, то мои сайты на базе MySQL перестают работать.

Я официально поработал?

+3

Вы пытались запустить 'FLUSH PRIVILEGES' или перезапустить сервер MySQL. – Cyclonecode

+0

@KristerAndersson Я не запускал FLUSH PRIVILEGES, но я перезапустил. – MRC

+0

@KristerAndersson Флеш работал. Спасибо, добавьте в качестве ответа, и я его выберу. – MRC

ответ

2

Убедитесь, что вы смывать привилегии:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; 
FLUSH PRIVILEGES; 

От documentation:

Reloads the privileges from the grant tables in the mysql database.

The server caches information in memory as a result of GRANT and CREATE USER statements. This memory is not released by the corresponding REVOKE and DROP USER statements, so for a server that executes many instances of the statements that cause caching, there will be an increase in memory use. This cached memory can be freed with FLUSH PRIVILEGES.

Смежные вопросы