how to find mysql socket and port

Discussion in 'Web Design and Development' started by jordanste, Mar 29, 2009.

  1. jordanste macrumors member

    Joined:
    Feb 25, 2006
    #1
    hey everyone, i am trying to set up a connection to a mysql database on a remote server through sequel pro on my desktop. Its just a huge hassle for me to have to log into cPanel and then into phpMyAdmin to edit my databases. plus i would rather work on my desktop then through another window in my browser.

    so anyway, is there a way that I can get the mysql socket info and port number from phpMyAdmin? or do i need to e-mail my host? I dont want to e-mail him if its something I can find myself, I dont believe this information was listed in the new account e-mail I got when I set up my hosting account. And a quick browse through phpMyAdmin and cPanel have revealed nothing... I have the IP, username and password (the only required fields) but its saying it cant connect. Maybe the socket and port number (optional fields) would help it along?

    Any help, as always, is greatly appreciated!

    Thank you so much!
     
  2. jamesarm97 macrumors 65816

    Joined:
    Sep 29, 2006
    #2
    TCP Port #3306 is the default. You might have to set it up in your firewall if on a remote computer and possible port forwarding if on a network.
     
  3. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    #3
    Your hosting provide may have also restricted what IPs the daemon listens on. This is usually done to prevent external machines from accessing the database.
     
  4. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #4
    @OP:

    You don't need to justify why you want the socket/port :) I follow you.

    To find out the actual values for each, not just the most common/default, go back into phpMyAdmin then on into "Show MySQL System Variables" and use your browser find feature to look for "socket" and "port" and you'll see the settings for each, or just scroll down as the listing is alphabetical. Ignore the commas in the port setting, that's referring to a TCP/IP port (i.e. 3306)

    On top of that, as belvdr astutely noted, remote access usually is restricted by IP or hostname, so check the privileges in phpMyAdmin to ensure you can access from remote. It's very easy to make changes and flush/reload privileges via that interface to setup the remote connection.

    -jim
     
  5. jordanste thread starter macrumors member

    Joined:
    Feb 25, 2006
    #5
    Hey guys, thanks a lot. I went ahead and e-mail my host about it and yeah, he had it blocked. But he was kind enough to add me to a list where I can now access the database from here. I didn't even need the port/socket.

    Thanks Jim, now I know where I can find it later!
     

Share This Page