Nagios error – Mysql

  

mysql

create database nagios;
grant all privileges on nagios.* to nagios@63.247.77.234 identified by ‘123dsa’;


mysql setup in client server

mysql> grant all privileges on nagios.* to nagios@63.247.77.234 identified by ‘123dsa’;
Query OK, 0 rows affected (0.00 sec)


nagios is showing the error
Client does not support authentication protocol requested by server: consider upgrading MySQL client

mysql> SET PASSWORD FOR nagios@63.247.77.234 = OLD_PASSWORD(‘123dsa’);
Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(‘123dsa’) WHERE Host = ‘63.247.77.234’ AND User = ‘nagios’;
Query OK, 0 rows affected (0.00 sec)


If we dont know the password of mysql

/etc/init.d/mysqld stop
/usr/bin/mysqld_safe –skip-grant-tables –skip-networking
open a new console
mysql
mysql> UPDATE mysql.user SET Password=PASSWORD(‘d3fault’) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;

vi .my.cnf

[client]
user=root
pass=d3fault

chmod 600 .my.cnf

/etc/init.d/mysqld restart


or

vi /etc/my.cnf
skip-grant-tables
/etc/init.d/mysqld restart
mysql
mysql> UPDATE mysql.user SET Password=PASSWORD(‘d3fault’) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;

vi /etc/my.cnf
#skip-grant-tables
/etc/init.d/mysqld restart

vi .my.cnf

[client]
user=root
pass=d3fault

chmod 600 .my.cnf

/etc/init.d/mysqld restart

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s