Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@s15745022 /]# /etc/init.d/mysqld stop
- Stopping MySQL: [ OK ]
- //here i change the my.cnf, adding skip-grant-tables=1 under [mysqld]
- [root@s15745022 /]# /etc/init.d/mysqld start
- Starting MySQL: [ OK ]
- [root@s15745022 /]# mysql -u root
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 2
- Server version: 5.0.77 Source distribution
- Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
- mysql> use mysql;
- Reading table information for completion of table and column names
- You can turn off this feature to get a quicker startup with -A
- Database changed
- mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE User = 'root';
- Query OK, 0 rows affected (0.01 sec)
- Rows matched: 0 Changed: 0 Warnings: 0
- mysql> Aborted
- [root@s15745022 /]# /etc/init.d/mysqld stop
- Stopping MySQL: [ OK ]
- //here i change the my.cnf, removing skip-grant-tables=1 under [mysqld]
- [root@s15745022 /]# /etc/init.d/mysqld start
- Starting MySQL: [ OK ]
- [root@s15745022 /]# mysql -u root -p
- Enter password:
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- [root@s15745022 /]# mysql -u root -p
- Enter password:
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- [root@s15745022 /]#
Add Comment
Please, Sign In to add comment