mySQL connection issue after upgrading Chopin on 01-18-2010

Status
Not open for further replies.

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I would ask you if you are running Wordpress or something similar, but your website simstock.x10hosting.com looks totally empty.
 
Last edited:

chrislynk

New Member
Messages
2
Reaction score
0
Points
0
So I had the same problem and ran thru the same resolution attempts. Finally found that adding my account panel username to my sql user worked. Something like this ...

Was: $con = mysql_connect("localhost","myuser","XXXXXXXX");
Now: $con = mysql_connect("localhost","chrislynk_myuser","XXXXXXXX");

I canot say why <sqluser> failed but <accountuser>_<sqluser> works but gift horse and all.

I hope this hepls.
 

simstock

New Member
Messages
7
Reaction score
0
Points
0
Hi, descalzo

Thanks for your reply.
I deleted my website files because I'm just doing some investigation.
And I've uploaded a test page simstock.x10hosting.com/Default.aspx. And I've already grant the database user simstock_user access to the database simstock_db.
And I'm pretty sure that my code works fine before the chopin server upgrade.

Please help to resolve the issue.

Thanks!
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
use 'localhost' as your mysqlhost instead of 'chopin.x10hosting.com'
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
Set the host to localhost. After the upgrade, it seems that [server].x10hosting.com as the host no longer works, which forces many users to have to reconfigure their scripts. It looks like you might be one of them, based on the error message.

So I had the same problem and ran thru the same resolution attempts. Finally found that adding my account panel username to my sql user worked. Something like this ...

Was: $con = mysql_connect("localhost","myuser","XXXXXXXX");
Now: $con = mysql_connect("localhost","chrislynk_myuser","XXXX XXXX");

I canot say why <sqluser> failed but <accountuser>_<sqluser> works but gift horse and all.

I hope this hepls.
You make it sound like it hasn't always been this way. This was implemented so no users/databases on the mysql server would have the same name.

Just to add, databases also must be accessed with the cPanel username prefix:

[cPanel Username]_[DB Username]
[cPanel Username]_[DB Name]
 
Last edited:

simstock

New Member
Messages
7
Reaction score
0
Points
0
use 'localhost' as your mysqlhost instead of 'chopin.x10hosting.com'

The MySQL server should be mysql-chopin.x10hosting.com, not chopin.x10hosting.com.
I trid to use localhost, and I got this error msg: Unable to connect to any of the specified MySQL hosts.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Sorry! I just forgot to add mysql- at start. anyways Which script you are using!

Post your config.php file like chrislynk`s post. Remember to Hide you password.

I just want to check what is wrong with the connection.
 

simstock

New Member
Messages
7
Reaction score
0
Points
0
Thank you for you response.

I'm using ASP.NET, not php.

I think the web server and the MySQL server are not the same one. The connection is from the web server to the MySQL server, and the user is denied by the MySQL server.

Here is my c# code:

string connectionString = "Server=mysql-chopin.x10hosting.com;Database=[cPanel_username]_[DB_name];Uid=[cPanel_username]_[DB_username];Pwd=[hide pwd];Charset=utf8";
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
conn.Open();
}

The code works well before the upgrade.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Have you tried this.
Code:
string connectionString = "Server=localhost;Database=[cPanel_username]_[DB_name];Uid=[cPanel_username]_[DB_username];Pwd=[hide pwd];Charset=utf8";
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
conn.Open();
}

Because After MYSQL server upgrade mysql-[server].x10hsoting.com is not working. Only localhost is working.
 
Last edited:

simstock

New Member
Messages
7
Reaction score
0
Points
0
Yes, I tried.

When using localhost, I got the error msg: Unable to connect to any of the specified MySQL hosts.
Looks that MySQL host can not be found. I believe the web server and mysql server are two different servers, so localhost does not work.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
I think an Admin can better guide you!!!

So I am escalating this to staff. They will look into your problem. Please wait for staff reply in ticket section
 
Last edited:
Status
Not open for further replies.
Top