Hello,
I am trying to import a SQL file dumped using MySQL administrator from v5.5.12, first using MysQL8 on Windows 10 then using 5.6.41 on AWS/RDS, the error using MySQL Workbench 8 is:
15:25:12 Restoring C:\path\sql\sqlfile.sql
Running: mysql.exe --defaults-file="c:\users\users\appdata\local\temp\tmpyzknop.cnf" --protocol=tcp --host=awsendpoint.rds.amazonaws.com --user=myuser --port=3306 --default-character-set=utf8 --comments --database=mysql < "C:\\Users\\users\\OneDrive\\Documents\\sqlfile.sql"
ERROR 1044 (42000) at line 21: Access denied for user 'myuser'@'%' to database 'mysql'
Operation failed with exitcode 1
15:25:17 Restoring C:\Users\abell\OneDrive\Documents\\sqlfile.sql
Running: mysql.exe --defaults-file="c:\users\user\appdata\local\temp\tmpvhirjz.cnf" --protocol=tcp --host=awsendpoint.rds.amazonaws.com --user=myuser --port=3306 --default-character-set=utf8 --comments --database=mysql < "C:\\Users\\user\\OneDrive\\Documents\\sqlfile.sql"
ERROR 1045 (28000): Access denied for user 'myuser'@'123.456.78.9' (using password: NO)
Operation failed with exitcode 1
I've established that the username and password with which I logged on to AWS.RDS via Workbench is the master user for this instance, BUT I also notice it doesn't have DBS and maintenance perms and I am not sure if these are required or how to set them from AWS dashboard ? or how to create a new user for the existing RDS instance MYSQL as permission is denied using the master account I created at setup.
I don't see anything obvious but am conscious of syntax differences between Windows and Linux eg paths, but don't think that's the issue as I'm getting consistent permission denial whichever way I go.
It seems the fundamental problem is authentication, so if I cam using the 'correct' login credentials, either it is not the correct account for AWS ?
Lastly, I am assuming that the account used for import does not need to have the same username and password as the box the SQL file was dumped from ?
Any advice on this enormously appreciated, I am more used to data than sysadmin, have trawled through the various sites, docs, but not getting any progress....
Open in new window
You must fix this first.
1) Shell into machine where database instance is running + test your user/pass login.
2) Then test same login from remote.
This will tell you location of your problem.
Keep in mind, once you have this working, be sure to wrap your MySQL connection in SSL or anyone can pull your login credentials off the wire, then hack or steal your data.