Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Signup for Free!
-More Features-
-Far Less Ads-
About   Users   Help
Users & Guests Online
On Page: 1
Directory: 1 & 420
Entire Site: 6 & 1041
Page Staff: pokemon x, pennylessz, Barathemos, tgags123, alexanyways, supercool22, RavusRat,
04-26-24 01:41 PM

Forum Links

Related Threads
Coming Soon

Thread Information

Views
1,125
Replies
6
Rating
0
Status
CLOSED
Thread
Creator
Lazlo Falconi
03-08-12 12:03 AM
Last
Post
RequiemHaunt
03-10-12 09:41 AM
Additional Thread Details
Views: 324
Today: 0
Users: 2 unique
Last User View
02-13-17
pokemon x

Thread Actions

Thread Closed
New Thread
New Poll
Order
 

PHP Thread v2.0

 

03-08-12 12:03 AM
Lazlo Falconi is Offline
| ID: 548975 | 178 Words

Lazlo Falconi
Level: 99


POSTS: 818/2750
POST EXP: 199963
LVL EXP: 9665976
CP: 3100.7
VIZ: 182754

Likes: 0  Dislikes: 0
Sorry to post something that's already in the stickies, but the old one was closed. Anyway, I have a question for those of you who may be PHP savvy--although this question actually refers more to SQL than PHP.

I have an SQL database, let's say that it's on localhost and the username is user and the password is pass. Now, when I try I get the output Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'remotehost' (using password: YES) in /home/content/47/9044447/html/new/index.php on line 12

Line 12 being, of course, the mysql_connect() function. And of course, remotehost is the actual IP address of the remote mySQL host.

phpMyAdmin seems to think that the SQL server is fine, and I KNOW the user name password and everything are correct, because I copied and pasted them from plain text into phpMyAdmin when I was creating the database, but it still isn't working. Is there something I have to do to enable PHP to connect to an outside server? If it makes any difference, I'm using GoDaddy as a host.
Sorry to post something that's already in the stickies, but the old one was closed. Anyway, I have a question for those of you who may be PHP savvy--although this question actually refers more to SQL than PHP.

I have an SQL database, let's say that it's on localhost and the username is user and the password is pass. Now, when I try I get the output Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'remotehost' (using password: YES) in /home/content/47/9044447/html/new/index.php on line 12

Line 12 being, of course, the mysql_connect() function. And of course, remotehost is the actual IP address of the remote mySQL host.

phpMyAdmin seems to think that the SQL server is fine, and I KNOW the user name password and everything are correct, because I copied and pasted them from plain text into phpMyAdmin when I was creating the database, but it still isn't working. Is there something I have to do to enable PHP to connect to an outside server? If it makes any difference, I'm using GoDaddy as a host.
Vizzed Elite
The Shake Zula


Affected by 'Laziness Syndrome'

Registered: 01-07-12
Location: Cartoon Hell
Last Post: 1410 days
Last Active: 1284 days

03-08-12 10:41 AM
is Offline
| ID: 549044 | 72 Words


JigSaw
Level: 164


POSTS: 6541/7936
POST EXP: 584185
LVL EXP: 57411187
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
There are multiple reasons why its not working:
1. Most of the time you should be using localhost, or at least that is what I use most the time.
2. You didn't specify a database to connect to so you should add mysql_select_db("Database Name Here");

I can't remember if I used remote host on shared godaddy hosting or not but try localhost and add the query I gave you listed in #2.
There are multiple reasons why its not working:
1. Most of the time you should be using localhost, or at least that is what I use most the time.
2. You didn't specify a database to connect to so you should add mysql_select_db("Database Name Here");

I can't remember if I used remote host on shared godaddy hosting or not but try localhost and add the query I gave you listed in #2.
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1735 days
Last Active: 1729 days

03-08-12 03:26 PM
Lazlo Falconi is Offline
| ID: 549118 | 115 Words

Lazlo Falconi
Level: 99


POSTS: 819/2750
POST EXP: 199963
LVL EXP: 9665976
CP: 3100.7
VIZ: 182754

Likes: 0  Dislikes: 0
JigSaw : Hmm, no change with either, and then both of those. I installed a couple of other softwares one the site, and they were able to connect just fine, and create tables and such all over the place, but my own custom code won't do it for some reason, and at this point, all I want to do is connect. It's a very simple script with just some html and the connect string.

Edit: Well, I'm not sure WHY it was happening, but it seemed to be a problem with the database I was trying to connect to, I've since made a new db and it connects just fine. Thanks for the help anyway!
JigSaw : Hmm, no change with either, and then both of those. I installed a couple of other softwares one the site, and they were able to connect just fine, and create tables and such all over the place, but my own custom code won't do it for some reason, and at this point, all I want to do is connect. It's a very simple script with just some html and the connect string.

Edit: Well, I'm not sure WHY it was happening, but it seemed to be a problem with the database I was trying to connect to, I've since made a new db and it connects just fine. Thanks for the help anyway!
Vizzed Elite
The Shake Zula


Affected by 'Laziness Syndrome'

Registered: 01-07-12
Location: Cartoon Hell
Last Post: 1410 days
Last Active: 1284 days

(edited by Lazlo Falconi on 03-08-12 08:32 PM)    

03-09-12 07:22 PM
RequiemHaunt is Offline
| ID: 549541 | 27 Words

RequiemHaunt
Level: 77


POSTS: 760/1503
POST EXP: 138087
LVL EXP: 4034033
CP: 2040.4
VIZ: 84769

Likes: 0  Dislikes: 0
Since your question has been answered can I close this thread? Or would you like to keep it open if others have questions relating to this topic?
Since your question has been answered can I close this thread? Or would you like to keep it open if others have questions relating to this topic?
Vizzed Elite
Vizzed #1 Galerians fan!


Affected by 'Laziness Syndrome'

Registered: 03-13-11
Location: New York
Last Post: 4222 days
Last Active: 4184 days

03-09-12 07:39 PM
Lazlo Falconi is Offline
| ID: 549550 | 37 Words

Lazlo Falconi
Level: 99


POSTS: 822/2750
POST EXP: 199963
LVL EXP: 9665976
CP: 3100.7
VIZ: 182754

Likes: 0  Dislikes: 0
RequiemHaunt : Well, I'm pretty sure this isn't the last question I'll ask, and I don't think I'm the only person who will ever ask a question, so I'd prefer not, unless you reopen the original PHP sticky.
RequiemHaunt : Well, I'm pretty sure this isn't the last question I'll ask, and I don't think I'm the only person who will ever ask a question, so I'd prefer not, unless you reopen the original PHP sticky.
Vizzed Elite
The Shake Zula


Affected by 'Laziness Syndrome'

Registered: 01-07-12
Location: Cartoon Hell
Last Post: 1410 days
Last Active: 1284 days

03-09-12 08:10 PM
RequiemHaunt is Offline
| ID: 549575 | 21 Words

RequiemHaunt
Level: 77


POSTS: 761/1503
POST EXP: 138087
LVL EXP: 4034033
CP: 2040.4
VIZ: 84769

Likes: 0  Dislikes: 0
I'll keep this thread open then unless told otherwise. I just wanted to make sure that it still had some use.
I'll keep this thread open then unless told otherwise. I just wanted to make sure that it still had some use.
Vizzed Elite
Vizzed #1 Galerians fan!


Affected by 'Laziness Syndrome'

Registered: 03-13-11
Location: New York
Last Post: 4222 days
Last Active: 4184 days

03-10-12 09:41 AM
RequiemHaunt is Offline
| ID: 549811 | 20 Words

RequiemHaunt
Level: 77


POSTS: 766/1503
POST EXP: 138087
LVL EXP: 4034033
CP: 2040.4
VIZ: 84769

Likes: 0  Dislikes: 0
I know bad me double posting but I decided to reopen the original sticked thread and to close this one.
I know bad me double posting but I decided to reopen the original sticked thread and to close this one.
Vizzed Elite
Vizzed #1 Galerians fan!


Affected by 'Laziness Syndrome'

Registered: 03-13-11
Location: New York
Last Post: 4222 days
Last Active: 4184 days

Links

Page Comments


This page has no comments

Adblocker detected!

Vizzed.com is very expensive to keep alive! The Ads pay for the servers.

Vizzed has 3 TB worth of games and 1 TB worth of music.  This site is free to use but the ads barely pay for the monthly server fees.  If too many more people use ad block, the site cannot survive.

We prioritize the community over the site profits.  This is why we avoid using annoying (but high paying) ads like most other sites which include popups, obnoxious sounds and animations, malware, and other forms of intrusiveness.  We'll do our part to never resort to these types of ads, please do your part by helping support this site by adding Vizzed.com to your ad blocking whitelist.

×