Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    4

    Unanswered: how does phpmyadmin know where the mysql is installed?

    hello im new to this forum so i have checked through the FAQ
    and searched for anyone else posting the same thing and i cant find it
    so im making a new post.

    i've got installed apache/php/mysql/phpmyadmin
    they all work perfectly fine on my own localhost and webhost.

    my question is where or how does phpmyadmin actually know
    what location or directory mysql is installed too?

    if i change the directory to anything else or a different location
    it still knows exactly where i've changed it too without specifying it.

    so does anyone know how it knows what folder/dir the mysql is in
    as when you setup any of them you dont specify where its installed.
    you only specify where php is installed not the server.

    Also as a quick add-on what other tools is there besides phpmyadmin
    that basically does the same thing?

    Thanks

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    There is an config.inc.php file that contains the settings. It actually connects to the mysql server in the same way that any PHP script (or any other client) would, using a host name/host IP address, user name, and password. It does not actually need to know any directory information on mysql.

    See the mysql Administrator and Query browser for alternate tools that do the same thing - http://www.mysql.com/products/tools/

  3. #3
    Join Date
    Sep 2006
    Posts
    4
    hmm thanks for the reply but could you go a bit more in depth
    just how it knows where the mysql is.

    reason im asking is imagine i installed mysql 5 and say phpmyadmin v1 say
    and this was done via using apachefriends (all in 1)

    if i wanted to change versions of phpmyadmin say how would i tell the
    new installation where to point to the mysql server/installed dir
    as the new phpmyadmin installed cannot find the db, but the old one can.

  4. #4
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    The config.inc.php file contains lines similar to the following with this information -
    PHP Code:
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'yourrootpwd'

  5. #5
    Join Date
    Sep 2006
    Posts
    4
    hmm yep all that infomation is saved and is identical to the old version of the phpmyadmin which when installed it finds the db,table,data the lot

    installed a newer version added the same info but it cant find the mysql server
    so there must be a setting somewhere to point to where the sql server is installed too as if i change the folder name of the mysql installed directory
    it can't find the sql server with new or old.

    maybe this is something that no-one seems to know about

  6. #6
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Mysql servers run as a service and listen to TCP/IP traffic on port 3306 (default.) As long as the mysql server is running, any client (PHP, Administrator...) can connect to it with the a correct host name, user name, and password.

    If you have installed a mysql server in a different directory, so long as the server is configured and running you can connect to it.

  7. #7
    Join Date
    Sep 2006
    Posts
    4
    hmm will check this out when im back home

    want to thank you for being the only person here good enough to reply and help out in over 15 views your the only one to reply and offer help and advice.

    pathetic

Posting Permissions

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