After installing MySQL 5.6 with rpm on RedHat5.5, see
The following message is displayed when you use mysqladmin to change the password (mysqladmin-u root password "mysql ").
Mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege forthis operation'
Solution:
Modify mysql Logon Settings
Vi/etc/my. cnf (we found no my. cnf file under etc)
The query shows that after MySQL is installed,/etc/my. the cnf file does not exist by default and can be found in/usr/share/doc/MySQL-servercommunity my-huge.cnf, my-innodb-heavy-4G.cnf, my-large.cnf, mymedium. cnf, my-small.cnf and other files, according to the memory size of the file which is suitable for your machine configuration copy to/etc/my. cnf (for general applications, select mymedium. cnf)
Edit the my. cnf File
Add skip-grant-tables to the [mysqld] segment
Save and restart the mysql service.
/Etc/rc. d/init. d/mysql restart
After the mysql service is restarted, modify the mysql password
[Root @ shiyue] # mysql
Welcome to the MySQL monitor. Commands endwith; or \ g.
Your MySQL connection id is 3 to server version: 3.23.56
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-
Database changed
Mysql> UPDATE user SET Password = password ('mysql') WHERE User = 'root ';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0
Mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Mysql> quit
Bye
After exiting mysql, change the modified configuration file back (vi/etc/my. cnf)
Restart mysql Service
Mysql-u root-p log on to mysql
Login successful!
Connect to the mysql database through navicat and prompt Can't get hostname for your address
The solution is to modify the my. cnf file, add a line under [mysqld]: skip-name-resolve, and save and restart mysql (/etc/init. d/mysql restart)
Authorization:
Mysql-u root-p mysql
Show databases
Use mysql
Grant all on *. * to 'root' @ '192. 168.1.254 'identified by 'mysql ';
Quit
OK. The test passes!