[Mono-list] ByteFX

Julien Sobrier julien at sobrier.net
Fri Jul 29 10:34:28 EDT 2005


Hello,
I have issues to use ByteFx with Mono 1.1.6/Linux:
using System.Data;                              // needed?
using ByteFX.Data.MySqlClient;

string connectionString = "Server=localhost.localdomain;" + 
                                                               "User 
ID=xxx;" + 
                   "Password=xxx;" + 
                                 "Database=db;";

IDbCommand dbcon = new MySqlConnection(connectionString);
Console.WriteLine("connection created");

dbcon.Open();
Console.WriteLine("connection opened");

I got the exception:
ByteFX.Data.MySqlClient.MySqlException: Unable to connect to any of the 
specified MySQL hosts
in <0x00345> ByteFX.Data.MySqlClient.Driver:Open 
(ByteFX.Data.MySqlClient.MySqlConnectionString settings)
in <0x00039> ByteFX.Data.MySqlClient.MySqlInternalConnection:Open ()
in <0x000b1> ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection ()
in <0x0018a> ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection ()
in <0x00042> ByteFX.Data.MySqlClient.MySqlPool:GetConnection ()
in <0x000cf> ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection 
(ByteFX.Data.MySqlClient.MySqlConnectionString settings)
in <0x0004b> ByteFX.Data.MySqlClient.MySqlConnection:Open ()


But I have no problem connecting directly to mysql with "mysql -u xxx -p";

Messages on internet point out to a bad MySQL configuration. It looks 
like ByteFX use a TCP/IP connection. I checked /etc/my.cnf, I don't have 
anyuthing like "skip-network" enabled:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Default to using old password format for compatibility with old and
# shorter password hash.
# Reference: http://dev.mysql.com/doc/mysql/en/Password_hashing.html
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I guess ByteFX should use the loopback interface. I did a "tcpdump -s 0 
-i lo -w /tmp/mysql.pcap" but I ddin't see any traffic.

Any idea on why I cannot connect to MySQL with ByteFX?

Thank you
Julien Sobrier


More information about the Mono-list mailing list