LMSouq
database Open

How to grant all privileges to root user in MySQL 8.0

PR
Praveen
1 month ago
3 views
Problem Description
Tried mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Getting > ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'root' WITH GRANT OPTION' at line 1. Note: The same is working when tried in previous versions. Also tried mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; Getting > ERROR 1410 (42000): You are not allowed to create a user with GRANT MySQL (8.0.11.0) username/password is root/root.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base