FAQ Database Discussion Community

Mysql and NodeJS can't connect remotely to deployed app

I am trying to connect from a NodeJS app to a MySQL database (already deployed, not in a localhost), currently it throws an error saying: Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'user'@'' (using password: YES) at Handshake.Sequence._packetToError (C:\wamp\Respaldo Linux\Documentos\WebDev\misGastosApp\node_modules\mysql\lib\protocol\sequences\Sequence.js:48:14) at Handshake.ErrorPacket (C:\wamp\Respaldo Linux\Documentos\WebDev\misGastosApp\node_modules\mysql\lib\protocol\sequences\Handshake.js:101:18) at...

golang editing previously set flag. MySQL error 1045

I'm having trouble setting a flag after user input to use as a connection parameter to a MySQL Database. Below is a snippet of my code: func init() { flag.StringVar(&flagUser, "user", "root", "User") reader := bufio.NewReader(os.Stdin) fmt.Print("Enter username: ") inputUser, _ := reader.ReadString('\n') f := flag.Lookup("user") if inputUser != f.Value.String()...