使用AMP项目中的Node.js配置MySQL

我正在尝试将现有的MySQL + PHP项目(使用phpMyAdmin)迁移到服务器端的javascript(Node.js) 和快递)。 我想知道如何最好地与Node建立MySQL连接,因为当前设置是在phpMyAdmin上? 也就是说,是否可以配置node-mysql连接,以便在phpMyAdmin上找到主机? </ p>

如果无法满足上述要求,我希望允许协作者访问此数据库。 设置到我的localhost MySQL数据库的远程MySQL连接似乎是一个解决方案,但由于两个原因,我在这篇文章中遇到了困难:如何允许远程连接到mysql 。 </ p>


  1. 我的系统上没有/ etc / mysql文件夹(找不到my.cnf)</ li>
  2. 授予远程访问权限后,我 我不确定如何为远程连接到我的localhost MySQL db的其他用户指定主机和/或IP地址。 </ li>
    </ ol>
    </ div>

展开原文

原文

I am trying to migrate an existing MySQL + PHP project (with phpMyAdmin) to server-side javascript (Node.js and Express). I am wondering how best to establish a MySQL connection with Node, given that the current setup is on phpMyAdmin? That is, is it possible to configure the node-mysql connection such that it finds the host on phpMyAdmin?

In case the above is not possible, I would like to allow collaborators access to this database. Setting up remote MySQL connections to my localhost MySQL database seems to be one solution, but I have run into difficulty in following this post for two reasons: How to allow remote connection to mysql.

  1. An /etc/mysql folder does not exist on my system (cannot find my.cnf)
  2. Upon granting remote access, I'm unsure how to specify the host and/or ip address for other users that will be connecting remotely to my localhost MySQL db.

dsfgdsjfd78773
dsfgdsjfd78773 我已经浏览了这两个。对不起,我原来的帖子不清楚,我改述了我的问题。
2 年多之前 回复
duanmiyang6201
duanmiyang6201 23秒的谷歌搜索带我到stackoverflow.com/questions/5818312/mysql-with-node-js和stackoverflow.com/questions/14779104/...他们有帮助吗?
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐