-
Notifications
You must be signed in to change notification settings - Fork 550
no ipv6 support #279
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
Comments
Works fine for me. I created an ipv6-only user account, and can only connect to it when host => ::1.
|
same problem :( ... its 2013 and there're still problems with ipv6 ... |
@sommero more details pls. |
@sommero I too am able to connect to MySQL over ipv6 just fine. Could you provide us with all of the details about your environment so we can try to reproduce it ourselves? |
Its 3 years later and I still can't connect to ipv6 mysql server. There are no problems (on same server) with php, no problems with python (connection libs compiled agains exacly same mysql lib) but gem mysql and mysql2 in ruby still don't support ipv6 connections to server. |
@naox interesting... We're just handing the host string passed in directly to libmysqlclient to do with it what it will. And as @sodabrew and I have both tested, ipv6 connectivity has definitely been verified and working. Maybe there are some other connection options being passed that are somehow conflicting? Is there also an A record for that domain that libmysqlclient is maybe attempting to use first? Have you tried passing the ipv6 address directly instead of a hostname? |
I have both php libs and python libs compiled against var/mysql-5.5.29/lib/libmysqlclient.so.18 and ipv6 works. Does ipv6 really work for you in mysql2 gem? If so I don't know what I can be doing wrong
Only reasonable explanation whould be that gem is not likled to /var/mysql-5.5.29 (but to old mysql libs in system) even though it says it is
|
fwiw that ipv6 host is globally accessible:
Connecting appears to be working, but I got an auth error which I expected. |
And using the latest from master:
|
Thanks. To bad there seem to be no way to check compiled in mysql lib version - other then by ldd which I did it showed proper version. example from php:
|
The |
Unfortunetly I have no idea how to display this return value of "Mysql2::Client#info" because I don't program in ruby :( I'm only a guy that set ups mysql and ensures it always accessible
|
Oh sorry haha ;) The hash character syntax in ruby is a documentation pattern for showing a method is an instance method. The hash character itself in Ruby syntax is the start of a comment, so in your example code above Ruby interpreted I'm not realizing that you have to have a successfully connected client in order to call this Let me get a patch ready for that so you can get this info without needing to connect to a server first. I'll also add the libmysqlclient version that was linked against (what PHP is reporting as "header version" above). I'll cc you on the pull request once I have it open. |
My problem was some old version in /home/naox/.gems/2.1/extensions/x86_64-linux/2.1.0-static/mysql2-0.3.18/mysql2 which was not replaced after running "gem install mysql2". Deleting it solved this problem. However why was it there and why it was not replaced by "gem install mysql2" efectively blocking any updates to a gem? some old mysql2.so compiled against old mysql lib but always used regardless of new "gem install mysql2":
also i can confirm that #594 is now working for me after removing this old mysql2.so |
That's really strange. Maybe rubygems saw the existing version on disk, and since the gem you were trying to install had the same version number it just reused the cached copy? Nothing about the mysql2 gem build process should have been an issue there. |
I've submited detailed issue on this to rubygems on github: rubygems/rubygems#1192 "gem install mysql2" does re-make file /home/user/.gems/2.1/gems/mysql2-0.3.18/ext/mysql2/mysql2.so while it does not (if file already exist) |
I've compiled mysql2 gem against newest mysql version
ldd mysql2.so
and still there is no ipv6 support. I've compiled php against same mysql version and there are no problems.
My mysql server is at ipv6 adress. I connect to it by hostname that is translated by /etc/hosts
Gem mysql2 only gives error
Can't connect to MySQL server on 'mysql5' (111) (Mysql::Error)
cat /etc/hosts|grep mysql5
2a01:4f8:561:5165::c12 mysql5
Like I said there is zero problems with this configuration and php+mysql
The text was updated successfully, but these errors were encountered: