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

Issues while connecting #11

Closed
teuio opened this issue Jan 5, 2014 · 5 comments
Closed

Issues while connecting #11

teuio opened this issue Jan 5, 2014 · 5 comments

Comments

@teuio
Copy link

teuio commented Jan 5, 2014

I am assuming that mariadb allow connections from root@localhost only, because I am getting the following error:

mysql -u root -h 172.17.42.1 --port 49163 -p
Enter password: 
ERROR 1130 (HY000): Host '172.17.42.1' is not allowed to connect to this MariaDB server

...or am I doing something wrong?

@Kloadut
Copy link
Owner

Kloadut commented Jan 5, 2014

Did you update the plugin correctly ? You should pull the latest version and rebuild the kloadut/mariadb container with:

git clone https://github.com/Kloadut/dokku-md-dockerfiles /tmp/dokku-md-dockerfiles
docker build -q=true -t kloadut/mariadb /tmp/dokku-md-dockerfiles
rm -rf /tmp/dokku-md-dockerfiles

Then you'll have to rebuild your mariadb container.

Works for me under dokku 0.2.1 and docker 0.7.3 (0.7.2 also)

@teuio
Copy link
Author

teuio commented Jan 5, 2014

Hi,

the problem is in start_mariadb.sh script line 15:

echo "GRANT ALL ON *.* to root@'%' IDENTIFIED BY '$1'; FLUSH PRIVILEGES;" | mysql -u root --password="$1" mysql

I changed this to:

echo "GRANT ALL ON *.* to root@172.17.42.1 IDENTIFIED BY '$1'; FLUSH PRIVILEGES;" | mysql -u root --password="$1" mysql

...and now it's working perfectly.

@Kloadut
Copy link
Owner

Kloadut commented Jan 5, 2014

Wow, ok. Weird anyway.

@Kloadut Kloadut closed this as completed Jan 5, 2014
@AlJohri
Copy link

AlJohri commented Jan 19, 2014

@Kloadut Hey, this problem is extremely weird but I can reproduce it as well. It seems my first mariadb container is fine, but the second one won't allow outside connections.

@AlJohri
Copy link

AlJohri commented Jan 19, 2014

Actually, I changed the line to say the same thing but am still getting the following error

ubuntu@domU-12-31-39-0A-3A-57:~$ mysql -h 172.17.42.1 -P 49227 -paskdfjasdfha -D db -U root
ERROR 1130 (HY000): Host 'ip-172-17-42-1.ec2.internal' is not allowed to connect to this MariaDB server

MariaDB [(none)]> SELECT host FROM mysql.user WHERE User = 'root';
+--------------+
| host |
+--------------+
| 0cdd26b93d68 |
| 127.0.0.1 |
| 172.17.42.1 |
| ::1 |
| localhost |
+--------------+

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

3 participants