I’ve found ruby-mysql
(http://raa.ruby-lang.org/list.rhtml?name=ruby-mysql), its 100% ruby
so I think it will be easier to use it from windows (you do not have
to compile anything). I have only tried it in linux and works fine.
It should be easy to make it work with ruby-dbi as seems to have the
same API as mysql-ruby (the one you have to compile).
I tried that, but the install wants “/tmp/mysql.sock” to exist, which
it
doesn’t on my installation. (Indeed, I couldn’t find that file
anywhere
on my file system.)
Am I doing something wrong with mysql? I’m running the mysqld-nt-max
version which uses named pipes, (I think). Might that be an issue?
···
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
I’ve had this very issue. This is because this lines in mysql.rb:
–8<------
if (host == nil or host == “localhost”) and defined? UNIXSocket then
unix_socket = socket || ENV[“MYSQL_UNIX_PORT”] || MYSQL_UNIX_ADDR
sock = UNIXSocket::new(unix_socket) @host_info = Error::err(Error::CR_LOCALHOST_CONNECTION) @unix_socket = unix_socket
------>8–
you can “fix” this by changing the “if” statement or connect to 127.0.0.1 (or the name of the machine), this will lead to use inet sockets instead unix ones. Hope it helps.
I’ve found ruby-mysql
(http://raa.ruby-lang.org/list.rhtml?name=ruby-mysql), its 100% ruby
so I think it will be easier to use it from windows (you do not have
to compile anything). I have only tried it in linux and works fine.
It should be easy to make it work with ruby-dbi as seems to have the
same API as mysql-ruby (the one you have to compile).
I tried that, but the install wants “/tmp/mysql.sock” to exist, which
it
doesn’t on my installation. (Indeed, I couldn’t find that file
anywhere
on my file system.)
Am I doing something wrong with mysql? I’m running the mysqld-nt-max
version which uses named pipes, (I think). Might that be an issue?