

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 −
FLUSH PRIVILEGES;
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 −
- Related Questions & Answers
- 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
Advertisements