connecting to mysql server on another PC in LAN

That was a very useful question! Since we need to run the application with a centralized database, we should give the privileges to that computer in LAN to access the particular database hosted in LAN PC. Here is the solution for that!

  1. Go to MySQL server
  2. Type the following code to grant access for other pc:
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root_password';
    
  3. then type:
    FLUSH PRIVILEGES;
    

Replace % with the IP you want to grant access for!

Leave a Comment