[Mono-bugs] [Bug 74998][Wis] New - Npgsql can't connect to database
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu May 19 19:10:01 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by javierdiazm at yahoo.com.mx.
http://bugzilla.ximian.com/show_bug.cgi?id=74998
--- shadow/74998 2005-05-19 19:10:01.000000000 -0400
+++ shadow/74998.tmp.8920 2005-05-19 19:10:01.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 74998
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Sys.Data
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: javierdiazm at yahoo.com.mx
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Npgsql can't connect to database
+
+I can't get Npgsql to connect to my database
+
+this is the code:
+-------------
+string connectionString = "Server=localhost;" +
+"Database=ipco-scripting;" + "User ID=dba;" +
+ "Port=5432";
+
+Console.WriteLine (connectionString);
+IDbConnection dbcon = new NpgsqlConnection(connectionString);
+dbcon.Open();
+----------
+$ mono db.exe
+Server=localhost;Database=ipco-scripting;User ID=dba;Port=5432
+
+Unhandled Exception: System.Net.Sockets.SocketException: Connection refused
+in <0x0010c> System.Net.Sockets.Socket:Connect (System.Net.EndPoint)
+in <0x00016> System.Net.Sockets.TcpClient:Connect (System.Net.IPEndPoint)
+in <0x000cb> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector)
+in <0x000d6> Npgsql.NpgsqlConnector:Open ()
+in <0x0025a> Npgsql.NpgsqlConnectorPool:GetPooledConnector
+(Npgsql.NpgsqlConnection
+
+I'm able to connect using psql...
+[javier at radeon javier]$ psql ipco-scripting dba
+
+Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
+
+Type: \copyright for distribution terms
+ \h for help with SQL commands
+ \? for help on internal slash commands
+ \g or terminate with semicolon to execute query
+ \q to quit
+
+The log file only shows connection attempts done by psql....
+
+May 19 18:02:58 radeon postgres[5479]: [1-1] LOG: connection received:
+host=[local] port=
+May 19 18:02:58 radeon postgres[5479]: [2-1] LOG: connection authorized:
+user=dba database=ipco-scripting
+
+Postgres is configured to trust to all users on localhost ...
+
+host all all ::1
+ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust
+
+everywhere,
+
+
+local all all trust sameuser
More information about the mono-bugs
mailing list