What Should I Do If All Users Except User root Cannot Access RDS for MySQL?
Solution
- Log in to the server, run the mysql -u root –p command to access the database, and enter the password.
- Run the mysql>use mysql command.
- Authorize users to access the database:
For example, if you want to enable user root to access the MySQL server from any host using password 123456, run the following command:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
If you want to enable user abc to access the MySQL server from a host whose IP address is 10.10.50.127 using password 654321, run the following command:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'abc'@'10.10.50.127' IDENTIFIED BY '654321' WITH GRANT OPTION;
- Run the mysql>FLUSH PRIVILEGES command to refresh permissions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot