Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: database ip

  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    419
    Thanks
    18
    Thanked 2 Times in 2 Posts

    database ip

    (I should've put this in the MySQL forum. Still trying to figure out how to move my post if I can)
    I'm getting back into learning some PHP, and transfered my site to a local company's hosting. Unfortunately, it's a husband/wife team with no admin pages to access my database. They're out of town, and I can't access my mySQL database.

    Is there some script I can put on a PHP page for a moment to upload that will give me an alert of what the database ip is so I can log into it?
    Last edited by turpentyne; 09-14-2011 at 03:28 AM.

  • #2
    Senior Coder
    Join Date
    Jul 2011
    Posts
    1,226
    Thanks
    3
    Thanked 171 Times in 171 Posts
    The database address, if you have one, will most likely be localhost. Are you sure one came with your hosting? As someone who runs a hosting service, I find it odd that you weren't given any information about your mysql address, never mind a username and password to use it.

  • #3
    Regular Coder
    Join Date
    Aug 2010
    Posts
    419
    Thanks
    18
    Thanked 2 Times in 2 Posts
    It's localhost to connect in the programming. I've got a username, a password. It definitely is there, or some of my pages wouldn't be working.

    What I'm trying to do is access the database to manage it with Sequel Pro and it's not letting me log in with 'localhost'. Forgive me for possibly missing something, but when I try that, it wants to put my local ip where I'm sitting at a coffee shop in and switch to socket connection.

    Don't I need to know the ip of the database to connect and manage it remotely?

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,476
    Thanks
    63
    Thanked 537 Times in 524 Posts
    IF you're trying to connect remotely yes you need the IP address. You can get it by going to the command prompt and ping <yourdomin> - The ip will be shown (there are plenty of other ways to get it but thats pretty simple).

    Then use that IP. Note however that many hosts disable remote SQL connections.
    I can't really think of anything to write here now...

  • #5
    Regular Coder
    Join Date
    Aug 2010
    Posts
    419
    Thanks
    18
    Thanked 2 Times in 2 Posts
    Do you mean the ip of the main website? I guess I thought databases had their own IP. I already tried that IP with no luck. Maybe they've disabled remote connection then. That means I'm stuck waiting for them to get back in town.

    boy do I miss just looking for the sailboat and logging in

  • #6
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,476
    Thanks
    63
    Thanked 537 Times in 524 Posts
    Does your host not have phpmyadmin then? - this is normally found in the control panel.

    Alternatively you can always upload your own basic php script which uses eval to execute whatever you type into a text box.. just be sure to password protect the script.
    I can't really think of anything to write here now...

  • #7
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Quote Originally Posted by turpentyne View Post
    I already tried that IP with no luck. Maybe they've disabled remote connection then.
    More likely they have just blocked port 3306. Often the databases are on the same server as the web server with shared hosts, so the IP would be the same as your website, and you can generally just use your domain name if remote access is allowed.

    Quote Originally Posted by tangoforce View Post
    Alternatively you can always upload your own basic php script which uses eval to execute whatever you type into a text box.. just be sure to password protect the script.
    Or.... just upload PHPMyAdmin.


  •  

    Posting Permissions

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