decho Posted May 19, 2011 Posted May 19, 2011 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?
jje Posted May 19, 2011 Posted May 19, 2011 What error are you getting? What username are you using? What language are you using to connect?
decho Posted May 19, 2011 Author Posted May 19, 2011 I am using the user witch I created for database, I am trying connection with MYSQL-Front program. And I am getting "I cannot connect to MYSQL server on "johnny.heliohost.org""
jje Posted May 19, 2011 Posted May 19, 2011 I am using the user witch I created for databaseWhat is that username? I am trying connection with MYSQL-Front programCould 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.orgUnfortunately 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?
decho Posted May 19, 2011 Author Posted May 19, 2011 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.
Guest Geoff Posted May 19, 2011 Posted May 19, 2011 The Queued Page is showing on all johnny accounts right now. See http://wiki.helionet.org/wiki/MySQL_Datab...ecting_Remotely
decho Posted May 20, 2011 Author Posted May 20, 2011 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"); } } } }
Ice IT Support Posted May 21, 2011 Posted May 21, 2011 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?
decho Posted May 21, 2011 Author Posted May 21, 2011 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.
Guest Geoff Posted May 21, 2011 Posted May 21, 2011 Oh! Sorry, I didn't realize you were connecting locally. What version of MySQL Client are you using?
decho Posted May 21, 2011 Author Posted May 21, 2011 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now