#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    3
    Rep Power
    0
    hi

    I hope someone can help me here?

    my hosting ISP imposes access limits on use of Mysql. I have to telnet in and then change directory to /usr/local/mysql and call mysql by typing
    "./bin/mysql DATABASENAME --user=user --password=password" (without the quotes of course)

    just telnetting in and then typing "mysql..." doesnt work, I just get 'file not found' error

    when using php in a webpage I have to call mysql somehow. just using

    "mysql_connect("localhost", "user", "password");" (again, without quotes)

    doesnt work.

    any clues?

    thanks

    lee
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    61
    There are 2 possibilities:

    1. The "localhost" in mysql_connect("localhost", "user", "password") is probably where your problem is. Try substituting it with the IP address of the host you log into with telnet. or the hostname, or the hostname.domainname combo.

    Mysql can be configured to accept connections only from a certain host, which is usually what is meant by 'access restrictions' for mysql.

    BTW the shorthand for the mysql connect syntax is mysql DATABASENAME -u user -p (you are then prompted for the password in standard Unix style (so your password is not visible on the terminal)

    2. PHP is not configured correctly. Your ISP should fix this. Also, if your ISP thinks it's imposing 'access limits' simply by making people cd to another directory, that's idiotic. I think it's more likely that #1 is the answer to your problem.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    3
    Rep Power
    0
    Thanks rycamor, I will give this a go.

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rycamor:
    There are 2 possibilities:
    ....
    [/quote]

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    3
    Rep Power
    0
    I tried using rycamor's suggestions above and still got rejected.

    In case anyone else hits the problem, the appears is to replace "localhost" with "127.0.0.1:/path/to/socket", it works fine!


Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 06:02 PM
  2. Slow Logins with Active Directory & Windows server 2000
    By ubers0ldat in forum Windows Help
    Replies: 16
    Last Post: May 28th, 2004, 11:11 AM
  3. How to block images except those in a specific directory
    By krugar in forum Apache Development
    Replies: 1
    Last Post: January 26th, 2004, 05:44 PM
  4. server root must be valid directory
    By kennyg in forum Apache Development
    Replies: 1
    Last Post: January 23rd, 2004, 07:59 AM
  5. SSL with IBM Directory Server 5.2
    By LukeTJM in forum LDAP Programming
    Replies: 0
    Last Post: January 14th, 2004, 02:49 AM

IMN logo majestic logo threadwatch logo seochat tools logo