Results 1 to 2 of 2

Thread: MySql and php

  1. #1
    Join Date
    Oct 2009
    Posts
    5

    Unanswered: 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?

  2. #2
    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';

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •