Jump to content

Problem with remote MYSQL connection


decho

Recommended Posts

Hi

I have problem with remote connection to MYSLQL database. I created new database with a new user assign to it. I add a "%" to remote access host. As server I used johnny.heliohost.org but I get an error while trying to remote connect. What I am doing wrong, or how else I can try to connect?

Link to comment
Share on other sites

I am using the user witch I created for database
What is that username?

 

I am trying connection with MYSQL-Front program
Could you try creating a simple PHP file (eg. dbconnect.php) in public_html on your heliohost website with the following code and navigate to it (eg. http://yoursite.heliohost.org/dbconnect.php) in your browser?

<?php

$server = "localhost";
$username = "FILLIN";
$password = "FILLIN";
$db_name = "FILLIN";

mysql_connect($server,$username,$password) or DIE("Couldn't connect locally.");
mysql_select_db($db_name) or DIE("Couldn't select database.");
echo "Database connection successful.

?>

Replacing FILLIN with your details.

 

I cannot connect to MYSQL server on "johnny.heliohost.org
Unfortunately that error message isn't very specific. Is there any way you could get more details on the error? Could you also try what I have suggested above? :)
Link to comment
Share on other sites

I have not used my account for nearly a month, and i get an e-mail that mu account is about to expire. I log into Cpanel as it was said that I should do it. But I am getting HelioHost Account Queued while i am trying to visit my website. So probably this is the problem? Did my account been suspended? My username is Decho and domain is ampmetal.heliohost.org.

Link to comment
Share on other sites

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using MySql.Data.MySqlClient;

using System.Data.OleDb;

 

namespace AMP

{

public partial class AMP : Form

{

public DataTable tabela_Faktura;

public DataSet data;

Funkcje funkcje = new Funkcje();

Faktury faktury;

String serwer = "johnny.heliohost.org";

String username = "decho_user";

String password = "********";

String db_name = "decho_AMP2";

public AMP()

{

MySqlConnection conn = new MySqlConnection("server=" + serwer + ";database="+db_name+";uid="+username+";password="+password);

InitializeComponent();

this.WindowState = FormWindowState.Maximized;

try

{

conn.Open();

}

catch (Exception ex)

{

MessageBox.Show(ex + "Błąd połączenia z bazą danych");

}

}

}

}

 

Link to comment
Share on other sites

MySqlConnection conn = new MySqlConnection("server=" + serwer+ ";database="+db_name+";uid="+username+";password="+password);

Just thought I would call to your attention that server is spelled incorrectly (highlighted above). Could that have anything to do with it?

Link to comment
Share on other sites

No, serwer is just a name for String variable. (String)serwer value is "johnny.heliohost.org". I used user name, password, and database name the same as I used with test on localhost and it connected without any problem.

Link to comment
Share on other sites

It is working. I deleted databases, users and remote host - %. And created everything again following the same steps as before and it worked. I don't know how it is possible but it is working, Thank You for all Yours help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...