Is there a way that I can connect mySQL database to local machine,

Discussion in 'Programming' started by stock_post, Dec 16, 2006.

  1. #1
    Is there a way that I can connect mySQL database to local machine.

    Basically we can connect to Oracle from local machine.


    So, there should be a way for us to connect to mySQL database from my local machine.

    Any suggestions please!

    Thanks
     
    stock_post, Dec 16, 2006 IP
  2. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Where is your MySQL server installed? It's definitely possible but MySQL users can be set for particular IP addresses. You probably just need to tell MySQL to allow connections from your machine.
     
    TwistMyArm, Dec 17, 2006 IP
  3. JsnTech

    JsnTech Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i think you would just need to edit the config file and put the ip in there of the mysql server
     
    JsnTech, Dec 17, 2006 IP
  4. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #4
    Yeah you'll certainly need to change something, like TwistedArm said, users are created per host, you can edit users in root phpmyadmin, or in cpanel, or whatever control panel you use.....
     
    krakjoe, Dec 17, 2006 IP
  5. stock_post

    stock_post Prominent Member

    Messages:
    5,213
    Likes Received:
    249
    Best Answers:
    0
    Trophy Points:
    310
    #5
    Any additonal info - I did not get it.

    My idea is that I have to have a ODBC driver for MySQL and then know the ip address and database name and port number and I should be able to connect.

    I really need this as it helps you connect through MS Access to your database.

    That way I can look at the data and do a quick edit etc.

    We could do some of the edits with the MySQL admin but Access is more usre friendly.

    any help is appreciated.
    Thanks
     
    stock_post, Dec 18, 2006 IP
  6. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    OK: I'm still confused about your situation... am I right in assuming that you have MySQL running on a remote server (not your local machine) and you want to connect to it (via an ODBC driver) from your local machine (or another computer... but not the same one that MySQL is running on)?

    If this is correct, you need to set up a user / password within the MySQL server / service itself. When you do that, you have to tell it to allow remote connections and give the IP address of the computer that is going to connect to it.

    Note that this username / password is not for the computer running MySQL but for MySQL itself. If you've installed on of the GUI managers alongside MySQL it's pretty simple to set up...

    I'm also assuming that this isn't on a remote host that is going to kill connections via a firewall or whatever.
     
    TwistMyArm, Dec 18, 2006 IP
  7. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #7
    No mater what your situation or what drivers you use to connect to mysql the username you're connecting with needs to have permission to connect form the ip address, so whatever you use to administer the mysql server, execute something like the follwing

    GRANT ALL ON * TO krakjoe IDENTIFIED BY 'password';
    FLUSH PRIVILEGES;

    you can change * for a static ip if you got one, or a hostname if it never changes, or a block of ips like 10.*.*.*

    You will then be able to use drivers @

    http://dev.mysql.com/downloads/connector/odbc/3.51.html

    to connect using mysql as a data source.....

    Hope this clears it up for you.
     
    krakjoe, Dec 18, 2006 IP
    stock_post likes this.
  8. stock_post

    stock_post Prominent Member

    Messages:
    5,213
    Likes Received:
    249
    Best Answers:
    0
    Trophy Points:
    310
    #8
    Thanks for the info: This is exactly what i am looking for.

    Not sure how it work, I will test this and let you know if I have any questions.

    Thanks
     
    stock_post, Dec 18, 2006 IP
  9. pixel_perfect

    pixel_perfect Banned

    Messages:
    238
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    to connect remote host mysql goto its admin panel and "add host" and local server use localhost and same for oracle.
     
    pixel_perfect, Dec 21, 2006 IP