Golang Mysql driver for mysql 4.0

141 views
Skip to first unread message

Craig C.

unread,
Mar 5, 2016, 10:54:39 PM3/5/16
to golang-nuts
Hello All,

I've been trying to find a mysql driver for legacy mysql 4.0, if anyone has any suggestions they'd be greatly appreciated.

Thanks!
--Craig

Konstantin Khomoutov

unread,
Mar 6, 2016, 4:18:23 PM3/6/16
to Craig C., golang-nuts
On Sat, 5 Mar 2016 15:31:38 -0800 (PST)
"Craig C." <cmco...@gmail.com> wrote:

> I've been trying to find a mysql driver for legacy mysql 4.0, if
> anyone has any suggestions they'd be greatly appreciated.

It appears, there are none, but provided you have a matching version of
libmysqlclient library installed on your client system (that one which
will do querying), you might have success accessing your server via
ODBC layer using any ODBC database/sql driver and the libmyodbc library
as your ODBC driver [1] (that assumes a POSIX system; on Windows,
you'd install one of MySQL "ODBC Connectors").

In fact, you might even use newer libmysqlclient library if it's able
to use that old protocol from MySQL 4.0. I think it's easy to vefiry:
if you're able to connect from your client system using the `mysql`
binary, ODBC should just work.

Sure, that's not as pretty as using a native Go driver, but at least
could make your connected.

1. https://github.com/golang/go/wiki/SQLDrivers
Reply all
Reply to author
Forward
0 new messages