If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > MySql and php

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-09, 23:16
Dr. Pariolo Dr. Pariolo is offline
Registered User
 
Join Date: Oct 2009
Posts: 5
MySql and php

Hello
I dont know if my sql or php is wrong.. Im trying to establish a connection, but it fails, with the following code
Code:
<?php
$link = mysql_connect('host', 'user', 'pass');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
and the result is...:
Untitled Document
And that user has ALL privileges granted.. What am i missing?
Reply With Quote
  #2 (permalink)  
Old 10-31-09, 16:20
mnirwan mnirwan is offline
Registered User
 
Join Date: Sep 2009
Posts: 64
You need to check if the username and password is correct. If they do, then the next thing to check is if that username/password has access from offshore1.x12host.com.

One way to do this (modify the command below to match your needs) is to run this command on MySQL:

Code:
GRANT ALL PRIVILEGES ON *.* TO 'dreamare_doc'@'offshore1.x12host.com' IDENTIFIED BY 'some_password';
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On