Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Post Unanswered: [HELP] How to Share 1 Mysql Database to two computers please help thanks

    I Tried to Grant the ip address and use flush privileges of this computer and also tried to turn off the firewall but it still doesn't work can somebody help me with this im using mysql and this it the error that come up

    Run-time error '-2147467259(80004005)';
    [MySQL][ODBC 3.51 Driver]Host' James-PC' is not allowed to connect to this MySQL server

    and this the code that i inputed on mysql

    mysql> Grant ALL ON *.* to root@'ipaddress' IDENTIFIED BY'root';


    Then
    mysql> FLUSH PRIVILEGES;

    please help me i really need this to work to connect 2 computer on 1 database only

  2. #2
    Join Date
    Dec 2012
    Posts
    43
    You don't have to grant the ip address but the user ...

    An example:
    Your client ip address is 192.168.2.123
    your MySQL-Server ip address is 192.168.2.1

    If you want to connect as user 'root' from your client (IP=192.168.2.123) to your server (IP=192.168.2.1) you have to execute the following SQL command:

    Code:
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.2.113' IDENTIFIED BY 'my_secret_password';
    I'm not sure if
    Code:
    FLUSH PRIVILEGES;
    is required by using
    Code:
    GRANT ...
    but it's harmless.

    It's important to set the client's IP address after
    Code:
    'root'@
    .

    Using IPv6 it's required to execute a GRANT statement with the IPv6 address of the client.



    WARNING:
    It's a bad idea in a production environment working as user root. Please create a user without superuser privileges to avoid bad things ...

Posting Permissions

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