Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 15 of 15
  1. #1
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  

    Need help. remote access to my MySQL database.

    This is the first I will try to manage a MySQL database remotely, so I have no idea.

    I have LAMPP setup, Plesk is my management software which I find out with limitation to open large queries through phpmyadmin. I previously used cPanel and no problem with it.

    I want to use a third party MySQL database software to connect remotely to my database, so I can perform quick table queries, monitoring and backup.

    Questions:
    How to connect remotely to my MySQL Database, I already configured the port in firewall. But still can't connect remotely. I can login to MySQL through SSH.

    What do I need to configure in my Linux/Plesk/MySQL so I can connect remotely?

    Thanks in advance.
    EM @ KING.NET
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  2. #2
    mvl's Avatar
    Join Date
    Sep 2006
    Location
    Netherlands
    Posts
    1,179
    DNF$
    7,343
    Bank
    0
    Total DNF$
    7,343
    Donate  
    First check if you can make a connection. If you have a Linux client machine you can do this by trying:

    telnet [your.mysqlserver.hostname.or.ip] 3306

    assuming that you have a standard MySql instance running on port 3306.

    If you can't connect check if the option 'skip-networking' in your MySQL config is off. If you skip networking you will not be able to connect from a remote host.

    Then you should check if your firewall allows access on port 3306.

    If everything else fails, but you can make an ssh connection to you server, you can do port forwarding and bypass the firewall:

    Download putty (I like the Putty-tray version)

    Now configure a connection with port forwarding as follows:

    1. fill in the MySql server hostname or ip address
    2.click open the connection->ssh->tunnels categroy (left-hand panel)
    3.choose a source port, if you are NOT running a MySQL server on your pc, just use 3306
    4.for the remote port choose 'localhost:3306'
    5.choose the 'remote' radio button
    6.click the 'add' button

    Now go back to the 'session' category in the left-hand panel and type a name to remember this connection in the text field 'Saved sessions'. Now press the 'save' button.
    Now as long as you have an ssh connection to your remote host, your MySql client can be configured to 'localhost' port 3306 as your MySql host and Putty will automagically forward it to the remote database at port 3306.

  3. #3
    Country hopper
    katherine's Avatar
    Join Date
    Jul 2005
    Location
    Free World
    Posts
    7,502
    Country

    Iceland
    DNF$
    30,552
    Bank
    0
    Total DNF$
    30,552
    Donate  
    You will need to add permissions for the user. By default users may only connect though localhost.
    First step is to verify that you can connect to mySQL remotely. If the user does not have permission to connect mySQL will tell you.
    NameNewsletter.com - free lists of available domain names
    ZoneFiles.net (beta) - ccTLD and gTLD droplists

  4. #4
    mvl's Avatar
    Join Date
    Sep 2006
    Location
    Netherlands
    Posts
    1,179
    DNF$
    7,343
    Bank
    0
    Total DNF$
    7,343
    Donate  
    Quote Originally Posted by sdsinc View Post
    You will need to add permissions for the user. By default users may only connect though localhost.
    First step is to verify that you can connect to mySQL remotely. If the user does not have permission to connect mySQL will tell you.
    That is true. My assumption was that you were unable to connect to MySql from a remote client. But if you are able to connect but unable to authenticate you should GRANT permissions to the remote user (username@'your.hostname.or.ip' or username@'%' for connections from any remote host). Don't forget to FLUSH PRIVILEGES after setting the correct permissions.

  5. #5
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  
    I think this is the missing link. Will you please give me step by step instruction on how to add permission to the user "admin"?

    I can connect locally, checked the ports 3306 open using network query tool (http://www.netstumble.com/whois-hist...workquery.html)

    Thank you everyone, almost there.
    EM @ KING.NET

    ---------- Post added at 09:37 AM ---------- Previous post was at 09:31 AM ----------

    To grant user "admin" at 123.123.123.123 (remote my IP)

    mysql> flush privileges;
    mysql> grant all on *.* to 'admin'@'%';
    mysql> flush privileges;
    mysql> exit

    I'm using the wildcard % to allow all host.
    is this correct?
    Last edited by TheWatcher; 02-07-2010 at 09:10 AM.
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  6. #6
    mvl's Avatar
    Join Date
    Sep 2006
    Location
    Netherlands
    Posts
    1,179
    DNF$
    7,343
    Bank
    0
    Total DNF$
    7,343
    Donate  
    You only have to flush the privileges after setting them. The permissions that you grant or revoke will not be used until you flush the privileges or restart the MySql server.
    Although the syntax is correct (it will work) I consider setting privileges for remote hosts with a public ip insecure and I prefer tunneling or port forwarding over ssh combined with local permissions instead.

  7. #7
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  
    Can you give me an example on how to do this task?

    Thanks in advance,
    EM @ KING.NET
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  8. #8
    mvl's Avatar
    Join Date
    Sep 2006
    Location
    Netherlands
    Posts
    1,179
    DNF$
    7,343
    Bank
    0
    Total DNF$
    7,343
    Donate  
    For the port forwarding you can read my first reply. I don't have the time now, but maybe later today I will write down a little tutorial.

  9. #9
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  
    Thank you. I will try the port forwarding.
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  10. #10
    Platinum Lifetime Member

    Join Date
    Jul 2009
    Location
    California
    Posts
    59
    DNF$
    1,645
    Bank
    0
    Total DNF$
    1,645
    Donate  
    There is a great free program called eskuel that has tons of mysql functionality and is super easy to install and use. It operates as a website, not ssh.

  11. #11
    DNF Addict
    south's Avatar
    Join Date
    Dec 2006
    Location
    33143/04930
    Posts
    4,997
    DNF$
    8,216
    Bank
    0
    Total DNF$
    8,216
    Donate  
    http://www.toadsoft.com/toadmysql/Overview.htm

    Freeware. Excellent. Can connect through ssh to remote mysql. I use it (almost) daily.
    All offers good for 72 hours except running auctions

    Progeria Research | Pulmonary Fibrosis | Dammit!

  12. #12
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  
    I need something that I can connect through SSH so I don't have to make the necessary permission changes for MySQL users access. I tried MVL suggestion but I can't make it work, maybe a detailed step by step will help me.

    Thank you in advance.
    Em @ king.net
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  13. #13
    DNF Addict
    south's Avatar
    Join Date
    Dec 2006
    Location
    33143/04930
    Posts
    4,997
    DNF$
    8,216
    Bank
    0
    Total DNF$
    8,216
    Donate  
    Quote Originally Posted by TheWatcher View Post
    I need something that I can connect through SSH so I don't have to make the necessary permission changes for MySQL users access. I tried MVL suggestion but I can't make it work, maybe a detailed step by step will help me.

    Thank you in advance.
    Em @ king.net
    You just need to be able to work on a single mysql database at a time, correct? And this is for you to work on in, not for a (php) script to access it remotely, so basically just modify/create tables, insert data, etc? If so, try the link I posted. It does this, including making the connection through ssh built into the program. It really sounds like what you need, unless I'm reading it wrong.
    All offers good for 72 hours except running auctions

    Progeria Research | Pulmonary Fibrosis | Dammit!

  14. #14
    last known as TheWatcher
    KING dot NET's Avatar
    Join Date
    Sep 2002
    Location
    KING.NET
    Posts
    5,490
    Country

    United States
    DNF$
    13,362
    Bank
    0
    Total DNF$
    13,362
    Donate  
    I can use the tool to download my MySQL data too? I will try it.

    Thank you,
    EM
    <a href=http://sqit.com/codes/cache/k.png target=_blank>
    KING.NET
    add your products and services : MultiForums.com Yet Another Forum : SQIT.com create your QR Codes and Microsoft Tag.

  15. #15
    DNF Addict
    south's Avatar
    Join Date
    Dec 2006
    Location
    33143/04930
    Posts
    4,997
    DNF$
    8,216
    Bank
    0
    Total DNF$
    8,216
    Donate  
    Quote Originally Posted by TheWatcher View Post
    I can use the tool to download my MySQL data too?
    And much much more

    If you want to be able to easily change database permissions, take quick backups, etc, you also might consider installing webmin on the server if you are able. If so, I would suggest you change the default port, and set the allowed IP addresses in the webmin configuration.

    Cheers!
    All offers good for 72 hours except running auctions

    Progeria Research | Pulmonary Fibrosis | Dammit!

Bookmarks

Posting Permissions

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

Domain name forum recommended by Domaining.com