且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何授予其他PC权限以将数据添加到我的计算机中MySQL.my数据库中

更新时间:2022-11-24 18:38:06

之所以发生这种情况,是因为您在计算机上本地运行MySQL(通过使用 127.0.0.1 给出).换句话说,您有一个进程/程序(MySQL)在 only 计算机的后台运行.为了使您的朋友能够访问此数据库,您需要执行以下两项操作之一:

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. 将您的MySQL实例(在计算机上运行)公开.
    • 这有其局限性.如果您关闭计算机,或者无法访问互联网,那么您实际上正在与世界其他地方关闭MySQL实例.
    • 涉及端口转发和排序-这可能很麻烦.
  • Google:免费的mysql提供程序".您会发现一些结果,这些结果使您可以创建具有限制(通常是大小限制)的免费MySQL数据库.
  • 您将连接到 mysql://website.com:33060/path/to/your/database
  • ,而不是连接到 127.0.0.1 >

方法2是最简单的.您可以在线使用免费服务来创建您和您的朋友可以访问的MySQL服务器.

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