logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Russ  
#1 Posted : Wednesday, September 11, 2013 2:01:33 AM(UTC)
Russ
Rank: Newbie

Reputation:

Groups: Member
Joined: 9/11/2013(UTC)
Posts: 5
United States
Location: Minnesota

Was thanked: 1 time(s) in 1 post(s)
I used the Website panel to create two users, both users are able to log in the phpmyadmin screen. I can work from the admin screen to create tables and work on it. I want to connect from a php script and am receiving an error. I'm thinking the host information is not correct, what should I be using as the host to connect to the MySQL database?

In another post I saw that the server was being moved to 67.15.128.18, when I tried that I got the message:

Access denied for user 'GEby'@'216.38.17.122' (using password: YES)

When I try localhost:

No connection could be made because the target machine actively refused it.

<?php
$db_name = "db_Name";
$un = "user";
$pw = "password";
$host = "localhost";

$conn = mysql_connect($host, $un, $pw) or die (mysql_error());
echo("Connected to mySQL Database");

mysql_select_db($db_name) or die(mysql_error());
echo("Connected to videocollect");

?>

Edited by user Wednesday, September 11, 2013 2:47:19 AM(UTC)  | Reason: Not specified

Russ  
#2 Posted : Wednesday, September 11, 2013 6:27:39 AM(UTC)
Russ
Rank: Newbie

Reputation:

Groups: Member
Joined: 9/11/2013(UTC)
Posts: 5
United States
Location: Minnesota

Was thanked: 1 time(s) in 1 post(s)
http://forums.hostingfes...ataBase-Server-Move.aspx

Found it!!! The host should be 'mysql.server'!!

thanks 1 user thanked Russ for this useful post.
Eminempk on 9/11/2013(UTC)
Eminempk  
#3 Posted : Wednesday, September 11, 2013 1:42:35 PM(UTC)
Eminempk
Rank: Administration

Reputation:

Groups: Administration, Member
Joined: 1/17/2013(UTC)
Posts: 13

Thanks: 2 times
Thank you for this useful post, i will add this in our knowledge base.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.054 seconds.