I'm trying to grant privileges to my IP address for MySQL server. I don't know how can I say it exactly because of my english too, so please be patient.
xx.xxx.xxx.xx - My IP
CREATE USER 'root'@'xx.xxx.xxx.xx' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'root@xx.xxx.xxx.xx' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
This error I got:
#1227 - Access denied; you need the CREATE USER privilege for this operation
Could anyone help me please?
EDIT:
I made a command
SHOW GRANTS;
Grants for sukup-parkety@localhost
GRANT USAGE ON *.* TO 'sukup-parkety'@'localhost' IDENTIFIED BY PASSWORD 'somepassword'
GRANT ALL PRIVILEGES ON `sukup\_parkety`.* TO 'sukup-parkety'@'localhost' WITH GRANT OPTION
EDIT2: Ok, so I made other command
GRANT ALL ON sukup_parkety.* TO 'root@xx.xxx.xxx.xx' IDENTIFIED BY 'mypassword';
But it reports the length error?
#1470 - String 'root@xx.xxx.xxx.xx' is too long for user name (should be no longer than 16)
尝试'root'@'xx.xxx.xxx.xx'而不是'root@xx.xxx.xxx.xx'
Yes the exact query to grant is:
GRANT ALL ON sukup_parkety.* TO 'root'@'xx.xxx.xxx.xx' IDENTIFIED BY 'mypassword';
Just repeating already spoken and hoping for upvote.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.