简体   繁体   中英

How to connect mobile app using node js to a remote mysql database on Godaddy cPanel?

<-- ErrorPacket { fieldCount: 255, errno: 1045, sqlStateMarker: '#', sqlState: '28000', message: 'Access denied for user \\'eazy_db\\'@\\'122.179.102.170\\' (using password: YES)' }

Problem with MySQLError: ER_ACCESS_DENIED_ERROR: Access denied for user 'eazy_db'@'122.179.102.170' (using password: YES)

Getting this error when node server is started. 122.179.102.170 is the router ip address instead of my server ip address.

  • If you can SSH into your server that is hosting your DB, type in the following Linux command to get your server's IP Address: ifconfig
  • The response from that command will look like this: ifconfig命令的输出
  • Notice the eth0 block. I highlighted it in a blue box.
  • That is the IP address of your MySQL server.

If you cannot SSH into the server that is hosting your MySQL database, I recommend following these steps and obtaining the Database Host name from the GoDaddy Console: Setting up an Access Database for Your Hosting Account

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM