Recently while trying to run a db query on mysql server from mysql client I faced Error 1049.
I finally managed to resolve the issue by modifying the ruby script that I was trying to execute.
Here is what it was before
mysql -u root -p 'password' -h host.mydomain.com
Upon execution it asked for password and after entering password here is what the terminal spitted at me
ERROR 1049 (42000) : Unknown database ''password''
Here is what I did to mysql command in my ruby script
mysql -u root -ppassword -h host.mydomain.com
Executed the script again and it worked fine.
What really solved the issues was removal of " ' " before and after the password and white space between the -p and password.
Hope that helps someone looking for solution to similar problem
I finally managed to resolve the issue by modifying the ruby script that I was trying to execute.
Here is what it was before
mysql -u root -p 'password' -h host.mydomain.com
Upon execution it asked for password and after entering password here is what the terminal spitted at me
ERROR 1049 (42000) : Unknown database ''password''
Here is what I did to mysql command in my ruby script
mysql -u root -ppassword -h host.mydomain.com
Executed the script again and it worked fine.
What really solved the issues was removal of " ' " before and after the password and white space between the -p and password.
Hope that helps someone looking for solution to similar problem
No comments:
Post a Comment