[REBOL] Re: Mysql Driver to REBOL, anyone?
From: tim-johnsons::web::com at: 4-Feb-2005 10:15
* Carlos Lorenz <carlos.lorenz-gmail.com> [050204 09:49]:
> Hi list,
>
> I am experiencing some trouble using mysql driver from SoftInnov
> (http://softinnov.org/rebol/mysql.shtml)
>
> Here is what I get when try to connect my REBOL script to the MySQL
> host at localhost (127.0.0.1):
>
> ** Access Error: Cannot connect to localhost ** Where: open-proto **
> Near: db: open mysql://root:pass-localhost/test insert db
You will likely get a better explanation from DocKimbel, but in
the meantime:
With Linux:
-----------
I have in my mysql table a host entry the same as my computer alias
and a host entry the same as my machine's hostname.
I'm not inclined to use root from a script. Not being a linux
expert, I just play it safe and avoid it.
I hope this helps in the interim ....
regards
tim
> I had the same trouble with PHP scripts but I have solved it based on
> the following information extract from www.php.net:
>
> User Contributed Notes
> mysql_connect
> 20-Jan-2005 03:38
>
> ---------------------------------------------------------------
> Debian (and "flavors" of Debain such as Ubuntu Linux) installations of
> mysqld place the socket file on a directory OTHER than /tmp/mysql.sock
> causing php connection problems. A quick workaround, as described in
> the docs above, is to specify ":/path/to/socket in the server
> parameter in db_connect. Here is an example where mysql socket is
> located at /var/run/mysqld/mysqld.sock:
>
> function open_connection() {
> $host = "localhost:/var/run/mysqld/mysqld.sock";
> $user = "root";
> $passwd = NULL;
> $db_name = "ipd";
> return db_connect($host, $user, $password, $db_name);
> }
> --------------------------------------------------------------
>
> I would like to have some advice on how to fix this inside MySQL
> scheme from SoftInnov
>
> Thanks
>
> --
> *:-.,_,.-:*'``'*:-.,_,.-:
> Carlos Lorenz
> *:-.,_,.-:*'``'*:-.,_,.-:
> --
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
--
Tim Johnson <tim-johnsons-web.com>
http://www.alaska-internet-solutions.com