0

i am using Mac Machine. and using Bitnami MAMP stack 7.2 for create Database in MYSQL , here is link for that Mysql database access : http://localhost:8080/phpmyadmin/db_structure.php?server=1&db=liodb

its working fine , my requirement is connect this local database to my node application here is my connection code in node js

    var mysql = require('mysql');
    var con = mysql.createConnection({
    host: "localhost",
    port: '3306',
    user: "lio_user",
    password: "lio123456",
    database:  'liodb'
   });

but i am not able to connect getting error

  code: 'ER_HOST_NOT_PRIVILEGED',
  errno: 1130,
  sqlMessage: "Host '127.0.0.1' is not allowed to connect to this 
  MySQL server",
  sqlState: undefined,
  fatal: true
xMayank
  • 1,875
  • 2
  • 5
  • 19

0 Answers0