Hello I am on a Centos VPS with nginx + mysql + php-fpm installed. I am trying to allow remote access to a database on this machine from another of my VPS.
I tried out the following steps.
- Modified the
/etc/my.cnffile and then within the
[mysqld]block added the lines
bind-address = *
- Saved and restarted the mysql service using the command
- Logged into mysql and created an user by the name remote and password say pass
- Typed the 'use social' command and tried to run the command
GRANT ALL PRIVILEGES ON *.* TO remote@'22.214.171.124' IDENTIFIED BY 'pass';Where 126.96.36.199 is the IP of the VPS I want to remote access the social database from.
The error is get is
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Can someone let me know why I am encountering this error when I can log in and create users even operate on the database using the same username, root and the same password even after this error!!