Problem with connection do MySQL

Status
Not open for further replies.

koziol_mail

New Member
Messages
6
Reaction score
0
Points
0
Hallo,
with PHP i've connected without any problem "Connection succesful"
I hav problem with connection from ASP.NET
on PageLoad i added
PHP:
            string connStr = "Server=localhost;Connect Timeout=90;Username=koziolma_jakar;Password=****";
            MySql.Data.MySqlClient.MySqlConnection conn = new MySql.Data.MySqlClient.MySqlConnection(connStr);
                conn.Open();
and then i get
Connection refused

Description: HTTP 500. Error processing request.

Stack Trace: System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end) [0x00000]
at System.Net.Sockets.Socket+Worker.Connect () [0x00000]

Maybe someone can halp me pliss.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Have you created the user and assigned it to a database with all privilegies?
 

koziol_mail

New Member
Messages
6
Reaction score
0
Points
0
Tried, the same result.
I'm sitting on this problem from 3hours.

http://koziolmail.x10hosting.com/

PHP:
     using System;
using System.Data;

using MySql.Data;
using MySql.Data.MySqlClient;

namespace JakarAuto
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string connStr = "Server=localhost;Database=koziolma_jakar;Username=koziolma_jakar;Password=jakar_pwd";
            MySql.Data.MySqlClient.MySqlConnection conn = new MySql.Data.MySqlClient.MySqlConnection(connStr);
            try
            {
                TextBox1.Text = "Connecting to MySQL...";
                conn.Open();
                TextBox1.Text = "ServerVersion: " + conn.ServerVersion + "\nState: " + conn.State.ToString();
                conn.Close();
            }
            catch (Exception ex)
            {
                TextBox1.Text = ex.ToString();
            }
        }
    }
}
PHP:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JakarAuto._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server" Width="934px"></asp:TextBox>
    </div>
    </form>
</body>
</html>
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Mono uses different libraries to connect to MySQL. I'll investigate on their site and post back here.

Here is some information on MySQL : http://www.mono-project.com/MySQL
 
Last edited:

koziol_mail

New Member
Messages
6
Reaction score
0
Points
0
ok ill try
"Please download and use the 1.0.7 release of MySQL Connector/Net which works on Mono on Windows and Linux."
I downloaded mysql.data.dll for Mono project from MYSQL. added it to Reference once again, copied dll to bin on ftp. But that didn't changed a thing.

Ok i found the same topic
http://forums.x10hosting.com/programming-help/96877-problem-using-mysql-asp-net.html
Is it realy not working on x10hosting??
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
I'll give a word to an admin about it.
 
Status
Not open for further replies.
Top