Results 1 to 11 of 11

Thread: Help me please with MySQL

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2006
    Location
    Czech Republic
    Posts
    52

    Arrow Help me please with MySQL

    Hi, Help me, please.

    I need connect to my Database on the Internet from home. I have a web with mysql database and I want she read from home.

    - When I read database over my home-net then I write:
    mysql_connect(IP ADRESS,"root")
    and all is OK.

    - When I read database in the Internet then i write:
    mysql_connect("mysql.webzdarma.cz","username","password")
    and all is OK.


    Help me please how can connect to mysql-server over intenet from my computer when I have username and password.

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help me please with MySQL

    What is it your asking? how to setup remote access so you can connect to your computer from the internet? Firewall problem? or using a Dynamic DNS service so that you can use a hostname instead of remebering your IP adddress?

    Your question was a little vague

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2006
    Location
    Czech Republic
    Posts
    52

    Arrow Re: Help me please with MySQL

    No, I need connect FROM HOME to Internet.

    I have database on the Internet and I need she read from HOME (my computer)

  4. #4
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help me please with MySQL

    Well if thats the case you need to talk to the people who are hosting the mysql database and get them to open up the port on the firewall.

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Help me please with MySQL

    Quote Originally Posted by john tindell
    Well if thats the case you need to talk to the people who are hosting the mysql database and get them to open up the port on the firewall.
    Which I doubt they will do. Many database servers (for security reasons) only allow connections from the localhost(127.0.0.1). If your host gives you SSH access, you can tunnel the connection through SSH. If not, you'll have to either replicate the databse on your own machine or ask if your host will open up the mysql port and allow connections from your IP address.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help me please with MySQL

    Quote Originally Posted by visualAd
    Which I doubt they will do. Many database servers (for security reasons) only allow connections from the localhost(127.0.0.1). If your host gives you SSH access, you can tunnel the connection through SSH. If not, you'll have to either replicate the databse on your own machine or ask if your host will open up the mysql port and allow connections from your IP address.
    My host does, which is one of the main reasons im still with them, apart from being lazy.

    You could easily write a PHP script that generates a SQL file which can be run locally on your computer.

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Help me please with MySQL

    Quote Originally Posted by john tindell
    My host does, which is one of the main reasons im still with them, apart from being lazy.

    You could easily write a PHP script that generates a SQL file which can be run locally on your computer.
    They leave the mysql port open?

    The reason it is kept closed is because the connection is unencrypted.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help me please with MySQL

    Isn't from MySQL 5 encrypted? Well like i said about my host, im lazy.

  9. #9
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: Help me please with MySQL

    Most hosters make it so that user can only connect from localhost, if you ask them I'm sure they will add your access host.

    Offtopic:
    Btw, visualAd, I don't understand why leaving the port open would be bad (setting aside hackers who use brute force), wouldn't they have to have your MySQL username and password to do anything? Also, if your worried at like a coffee shop stealing your username/password, its common sense that doing stuff like that isn't the smartest. But connecting from your home computer to your remote MySQL server, is pretty safe for the most part (again setting aside keyloggers ect.).
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  10. #10
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help me please with MySQL

    The connection, like visualAd said, is send in not encrypted so anyone can "listen" in and get your username and password. Without having to perform a Brute Force attack. Though I have to say I have seen in a lot cases people have written some really bad code so the vulnerabilities lie in the code not in the server setup.

  11. #11
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Help me please with MySQL

    Aconnection can be intercepted. This would require someone between the two enpoints to install packet logging software one of the routers (gaining access to an ISP's router isn't easy).

    If the information you'll be transferring via the queries is not sensitive and people are not likely to want to make the effort, it is not worth the worry. A host won't want to open the MySql port because:
    • Anyone who does gain access to a user name and password can access an d gian information about the system. They may alxso be ableto execute system command and read ot write files.
    • It opens up the server to more vulnerabilities. An exploit discovered in the software would need to be patched quickly to prevent any one from taking advantage.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width