From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B8E67BC37 for ; Mon, 17 Aug 2009 23:19:36 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAF9miUrOe3NG/2dsb2JhbADVWIQZBYFN X-IronPort-AV: E=Sophos;i="4.43,398,1246831200"; d="scan'208";a="44773171" Received: from spoomusic.com ([206.123.115.70]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Aug 2009 23:19:36 +0200 Received: (qmail 8943 invoked by uid 89); 17 Aug 2009 21:18:49 -0000 Received: from localhost (127.0.0.1) by 0 with ESMTPS (DHE-RSA-AES256-SHA encrypted); 17 Aug 2009 21:18:49 -0000 Date: Mon, 17 Aug 2009 14:18:49 -0700 (MST) From: Dave Benjamin X-X-Sender: ramen@spoomusic.com To: tumenjargal tsagaan Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Connecting to Mysql using Ocaml In-Reply-To: <493613.88575.qm@web28507.mail.ukl.yahoo.com> Message-ID: References: <493613.88575.qm@web28507.mail.ukl.yahoo.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam: no; 0.00; ocaml:01 ocaml:01 inserting:01 bindings:01 ocaml-mysql:01 phoenix:98 sourceforge:01 wrote:01 caml-list:01 benjamin:01 benjamin:01 debian:04 dave:09 dave:09 aug:10 On Mon, 17 Aug 2009, tumenjargal tsagaan wrote: > has someone with experience tell me how to access mysql database using > ocaml? > Any help would be appreciated. > > It would be great when posting a small snippet for connecting a mysql > database and inserting something. See the second half of this example (dbusers): http://pleac.sourceforge.net/pleac_ocaml/dbaccess.html#AEN784 You can get the MySQL bindings here: http://raevnos.pennmush.org/code/ocaml-mysql/ Or, if you're using Debian or Fedora, there should be a package available. -- .. Dave Benjamin - Software Developer - Phoenix, Arizona .. http://ramenlabs.com | http://twitter.com/ramenlabs