MySQL

Torbjorn Tornkvist <>
Thu Mar 10 22:02:52 CET 2005


Michael McDaniel wrote:

>I would like to use MySQL as the database backend to my Erlang program.  I am using
>Erlang R10B-3 on x86 Linux.  I would like to use MySQL v5.x (because a PHP program
>needs access to same data populated by Erlang program).
>
>I found a MySQL module written by Magnus Alhtorp at
>http://www.erlang-projects.org/Public/projects/libraries/mysql_erlang_module/view
>It appears that the password routines are failing with MySQL v5.x and I do not
>understand enough about Erlang or encryption routines to modify it.
>
>QUESTIONS:
>1) Has anyone been successful in compiling the Erlang odbc module to work with MySQL?
>   How did you do it? (I haven't been able to get it to compile).
>
>2) Does anyone have an alternative method of using MySQL with Erlang? 
>
>
>thank you for any assistance,
>
>~Michael
>
>  
>
Well, you could try out this code that I wrote for the purpose of
authenticating trapexit.org users:

http://www.trapexit.org/emysql.erl
http://www.trapexit.org/emysql.hrl

and example of how to use it:

http://www.trapexit.org/obfuscate.erl

The implementation is based on this description:

http://www.trapexit.org/MySQL-Protocol.html

The code isn't really ready for release yet. My intention was
to improve especially how data is retrieved from the MySQL
server. This has been done in a better way by Magnus Ahltorp
I belive, and you'll find the code here:

http://www.stacken.kth.se/projekt/yxa/*mysql*-0.1.tar.gz 
<http://www.stacken.kth.se/projekt/yxa/mysql-0.1.tar.gz>

Cheers, Tobbe


 



More information about the erlang-questions mailing list