Need assistance with accessing mysql database using node.js

后端 未结 6 1620
清酒与你
清酒与你 2021-01-06 03:08

I am trying to run a simple node sample for access a mysql db and am getting the following error-Error: ER_ACCESS_DENIED_ERROR: Access denied for user \'root\'@\'ubuntu.loca

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 03:41

    Actually the solution is easier than you think. Change the host to 127.0.0.1 for the database connection.

提交回复
热议问题