Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # mysql
- mysql> UPDATE user set authentication_string=password('secret') where user='root';
- Query OK, 1 row affected, 1 warning (0.00 sec)
- Rows matched: 1 Changed: 1 Warnings: 1
- mysql> flush privileges;
- Query OK, 0 rows affected (0.00 sec)
- mysql> exit
- Bye
- # sudo -u www-data mysql -u root -p
- Enter password:
- ERROR 1698 (28000): Access denied for user 'root'@'localhost'
- mysql> show grants for 'root'@'localhost';
- +---------------------------------------------------------------------+
- | Grants for root@localhost |
- +---------------------------------------------------------------------+
- | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
- | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
- +---------------------------------------------------------------------+
- 2 rows in set (0.00 sec)
- mysql> select USER(),CURRENT_USER();
- +----------------+----------------+
- | USER() | CURRENT_USER() |
- +----------------+----------------+
- | root@localhost | root@localhost |
- +----------------+----------------+
- 1 row in set (0.00 sec)
Add Comment
Please, Sign In to add comment