Settings for connecting the Navicat client to the MySQL database

Source: Internet
Author: User

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.