- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL new user access denied even after giving privileges?
After creating a user and giving all privileges to the user, you need to FLUSH PRIVILEGES to set up and want the new settings to work correctly.
The syntax is as follows −
Here is the query to create a new user which has the name ‘Bob’ in my case. The query to create a new user is as follows −
mysql> CREATE USER 'Bob'@'%' IDENTIFIED BY '123456'; Query OK, 0 rows affected (0.56 sec)
Now given all privileges to user Bob −
mysql> GRANT ALL PRIVILEGES ON *.* TO 'Bob'@'%' WITH GRANT OPTION; Query OK, 0 rows affected (0.23 sec)
Now flush the privileges. The query is as follows −
mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.14 sec)
Now here I am using user Bob with password 123456. The snapshot is as follows −
- How to create MySQL user with limited privileges?
- How can we grant privileges to a MySQL user?
- How can we revoke privileges from a MySQL user?
- Check privileges (grants) for a specific user in MySQL?
- How can I restore the MySQL root user full privileges?
- Grant all privileges of a database to a MySQL user?
- How to write on selection screen after giving any user input in SAP ABAP
- Resolve error 1045 (28000) access denied for user 'root'@'localhost' (using password: YES)?
- What are the minimum MySQL user privileges to allow optimize and repair?
- Disabling JDBC/ODBC access to SAP HANA system for a new user
- How can a user start new MySQL transaction?
- Create a new user with password in MySQL 8?
- How to check privileges in MySQL?
- Set special characters for password while creating a new MySQL user?
- Authorize a new user in SAP