Skip to content
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

Can't connect to MYSQL without password #24

Open
ovizii opened this issue Apr 21, 2014 · 3 comments
Open

Can't connect to MYSQL without password #24

ovizii opened this issue Apr 21, 2014 · 3 comments

Comments

@ovizii
Copy link

ovizii commented Apr 21, 2014

I've setup a root password for MYSQL and now I cannot automatically create a user/db via this script. Any ideas short of removing the password?

./setup-debian.sh mysqluser mydomain.tld
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
MySQL Username: username
MySQL Password: password
MySQL Database: mydomainy.tld

@xeoncross
Copy link
Owner

The script assumes you have the password defined in the my.cnf file for MySQL. Just open the file and add your username/password.

[client]
user = root
password = ...

Make sure you chmod 600 the file for security.

@ovizii
Copy link
Author

ovizii commented Apr 21, 2014

doesn't work. sure it works with this mysql version too?

mysql Ver 14.14 Distrib 5.6.17, for debian-linux-gnu (i686) using EditLine wrapper

@ovizii
Copy link
Author

ovizii commented Apr 21, 2014

assuming my.cnf needs to be inside /root ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants