-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error importing DB due to passwords #27
Comments
+1 |
For me that did not work :( mysqldump: "mysqldump -h <%= host %> -u<%= user %> -p"<%= pass %>" <%= database %>", |
The correction made it! Thanks. |
This solution did not work for me either. I get the error: 'MYSQL_PWD' is not recognized as an internal or external command, operable program or batch file. Any ideas? I'm running cgywin on Windows 7. |
Neocamel-> did you try the solution in my comment? |
Yes I did herbie, it didn't work for me either unfortunately. What DID work for me was tomvdv's solution here: |
For anyone having similar DB issues, another thing to check is your DB passwords. Mine had a semicolon in the actual password which was causing issues with the dump. I guess these aren't always properly escaped, something to look for. |
This was a problem with grunt-deployments, so was probably not fixed at the time you forked that project.
In at least some versions of MySQL, if you put the DB password on the command line with the -p argument, the first line of the resulting .sql file will be:
"Warning: Using a password on the command line interface can be insecure."
When you then try to load this into another DB, it fails because of invalid SQ syntaxL.
A solution is to change the templates as follows:
mysqldump: "MYSQL_PWD=<%= pass %> mysqldump -h <%= host %> -u<%= user %> <%= database %>",
mysql: "MYSQL_PWD=<%= pass %> mysql -h <%= host %> -u <%= user %> <%= database %>",
The text was updated successfully, but these errors were encountered: