In our software, I am using some scripts that execute mysql queries.
mysql -s "<<query>>
Until recently, it was working fine. But now, it is throwing
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
But when i update my script to
mysql -uroot -pxxxx -s "<<query>>
it works fine.
But when i installed the same software in a different server (linux – same version).
mysql -s "<<query>>
is working fine in this machine.
What is the reason for the different behavior in different m/c? Is it because of any system configuration?
I found the reason, there was different values for password for the root user in the two servers.