Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Connection String of a MySql Database from another computer via LAN

Connection String of a MySql Database from another computer via LAN

Scheduled Pinned Locked Moved Database
helpdatabasemysqlcomsysadmin
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Biplob Singha Shee
    wrote on last edited by
    #1

    Hi all, I want to connect a MySql Database. Suppose..... Database Name is mydb Database located on PC-1 (IP- 192.168.0.10) PC-1 user id = abc PC-1 password= 123 MySQL Server user ID = root MySQL Server password= mypassword now what will be the connection string for PC-1 to connect to the database ? now I want to connect the database(mydb) from another pc (suppose this pc name is PC-2 and the IP is 192.168.0.11) what will be the connection string for PC-2 to connect the PC-1 database ? I searched connectionstrings.com[^] and found ... Standard

    Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

    and Specifying TCP port

    Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
    Pwd=myPassword;

    but nowhere found if the server pc (PC-1) is protected by user id and password. In this case what should I do ? I Tried both the above connection string. They are Ok for PC-1 to connect its own database (localhost) but when I tried to connect the database from PC-2, I got the error**

    Quote:

    Host '192.168.0.11' is not allowed to connect in this mysql server

    **Can anybody help me ?

    G 1 Reply Last reply
    0
    • B Biplob Singha Shee

      Hi all, I want to connect a MySql Database. Suppose..... Database Name is mydb Database located on PC-1 (IP- 192.168.0.10) PC-1 user id = abc PC-1 password= 123 MySQL Server user ID = root MySQL Server password= mypassword now what will be the connection string for PC-1 to connect to the database ? now I want to connect the database(mydb) from another pc (suppose this pc name is PC-2 and the IP is 192.168.0.11) what will be the connection string for PC-2 to connect the PC-1 database ? I searched connectionstrings.com[^] and found ... Standard

      Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

      and Specifying TCP port

      Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;
      Pwd=myPassword;

      but nowhere found if the server pc (PC-1) is protected by user id and password. In this case what should I do ? I Tried both the above connection string. They are Ok for PC-1 to connect its own database (localhost) but when I tried to connect the database from PC-2, I got the error**

      Quote:

      Host '192.168.0.11' is not allowed to connect in this mysql server

      **Can anybody help me ?

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      well, you dont say what platform you're running MySQL on, but this would be a start http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html[^] 'g'

      B 1 Reply Last reply
      0
      • G Garth J Lancaster

        well, you dont say what platform you're running MySQL on, but this would be a start http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html[^] 'g'

        B Offline
        B Offline
        Biplob Singha Shee
        wrote on last edited by
        #3

        Hi, thank you for your reply. For your information I am using Windows 7 Ultimate and I am coding in VB.NET 2010. I checked the link but I can not understand what they are saying... maybe it is because for other platform they are saying about...

        G 1 Reply Last reply
        0
        • B Biplob Singha Shee

          Hi, thank you for your reply. For your information I am using Windows 7 Ultimate and I am coding in VB.NET 2010. I checked the link but I can not understand what they are saying... maybe it is because for other platform they are saying about...

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          well, Im pretty sure you're a smart guy and you can google for MYSQL Windows Connection for example, and get a result .. this came up pretty quickly for example >> http://richbui.com/2009/03/06/how-to-enable-remote-access-to-mysql-server-on-windows-server/[^]

          B 2 Replies Last reply
          0
          • G Garth J Lancaster

            well, Im pretty sure you're a smart guy and you can google for MYSQL Windows Connection for example, and get a result .. this came up pretty quickly for example >> http://richbui.com/2009/03/06/how-to-enable-remote-access-to-mysql-server-on-windows-server/[^]

            B Offline
            B Offline
            Biplob Singha Shee
            wrote on last edited by
            #5

            I tried on google but found many results except mine.

            G 1 Reply Last reply
            0
            • B Biplob Singha Shee

              I tried on google but found many results except mine.

              G Offline
              G Offline
              Garth J Lancaster
              wrote on last edited by
              #6

              was the link I posted any good ?

              B 1 Reply Last reply
              0
              • G Garth J Lancaster

                was the link I posted any good ?

                B Offline
                B Offline
                Biplob Singha Shee
                wrote on last edited by
                #7

                yes but I cannot do that or I cannot find mysql directory as I am using xampp server(phpmyadmin) and mysql workbench

                1 Reply Last reply
                0
                • G Garth J Lancaster

                  well, Im pretty sure you're a smart guy and you can google for MYSQL Windows Connection for example, and get a result .. this came up pretty quickly for example >> http://richbui.com/2009/03/06/how-to-enable-remote-access-to-mysql-server-on-windows-server/[^]

                  B Offline
                  B Offline
                  Biplob Singha Shee
                  wrote on last edited by
                  #8

                  Hello, I tried the process but an error message is coming....

                  Error Connecting to database: Authentication to host '192.168.0.101' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'CLT'(using password: YES)

                  ... Where 192.168.0.101 is the server (in which I am trying to connect) ... Where 'root'@'CLT' is the client (from where I am trying to connect) I tried the command...

                  shell> mysql --default-auth=mysql_native_password ...
                  shell> mysql --default-auth=mysql_old_password ...

                  from http://dev.mysql.com/doc/refman/5.5/en/native-authentication-plugins.html[^] but failed... Please help

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups