I'm making a new project on heroku, using mysql (they have an addon called JawsDB, which gives me a mysql host, username, password). (Update: I've also tried using their other mysql addon, ClearDB, and I have the exact same issue)
I can connect to the database like so (and I can 'show databases' to see what's there):
mysql -h izm96dhhnwr2ieg0.cbetxkdyhwsb.us-east-1.rds.amazonaws.com -u knu81lzn5m79u3rx -p[given_password]
Problem: When I do create database nptest
, I get:
Access denied for user 'knu81lzn5m79u3rx'@%' to database 'nptest'
I've tried granting all privileges, like this:
grant all privileges on *.* to 'knu81lzn5m79u3rx'@'%' identified by '[given_password]';
but that gives me:
Access denied for user 'knu81lzn5m79u3rx'@'%' (using password: YES)
I also tried create user to make a fresh one, but of course then it's "Access denied" because I don't have create user privileges either.
What's the correct way to grant access to this user?
Ah! The answer was that the preliminary plan on jawsDB gives you one specific database (that has a cryptic name) on a shared server with other people, so you don't have permissions to make a new one. It wasn't clear in the instructions, so now I'm humming away with good old database "tbkrv66g085ulngi" :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With