Skip to content Skip to sidebar Skip to footer

How To Give Permission To Other Pc To Add Data To My Database In Mysql.in My Computer

I made a python program here and i wanted to send the code to my friend and he was unable to add values through the program to my database, is there a way i can allow his access. C

Solution 1:

This is happening because you are running MySQL locally on your computer (as given by your use of 127.0.0.1). In other words, you have a process/program (MySQL) running in the background of only your computer. For your friend to have access to this database, you will need to either of two things:

  1. Expose your MySQL instance (running on your computer) to the world.
    • This has its limitations. If you turn off your computer, or don't have access to the internet, you are effectively shutting down the MySQL instance from the rest of the world.
    • Involves port-forwarding and the sort -- which can be cumbersome.
  2. Use an external service (website provider) to run an instance of an MySQL database that can be accessed by anyone on the internet.
    • Google: "free mysql provider." You'll find a few results that allows you to create free MySQL databases with limitations (usually size limitation).
    • Instead of connecting to 127.0.0.1, you would connect to a mysql://website.com:33060/path/to/your/database

Method 2 is the easiest. You can use free services online to create a MySQL server that you and your friend can access.

Post a Comment for "How To Give Permission To Other Pc To Add Data To My Database In Mysql.in My Computer"