0

Hello guys i had a problem with node.js and socket.io so i did that :

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'

And that solve my problem ! But now i can't connect to localhost:8000/...

An exception occurred in driver: SQLSTATE[HY000] [2006] MySQL server has gone away

What password did that request change ? How can i change it to default because that need one uper case, lower, and special one ... or were i have to put the password that i change for make work the website ... (i am using symfony3.4 i put the same password there but nothing change

database_host: 127.0.0.1
database_port: null
database_name: db
database_user: root
database_password: password
mailer_transport: smtp

EDIT : And i have a part of js :

var mysql = require('mysql');
var connection = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: 'password',
    database: 'db'
});

connection.connect(function(err){
    if(err){
        console.log("Hello i am an error", err);
     }
});

AND that part is working .... i have an error when i change the password and when i put the real one the js part is working ... but the website still not working

  • Note; you should not even be using the `root` user in your code. (In most circumstances) – GrumpyCrouton Oct 22 '18 at 12:47
  • where can i change that and config ? –  Oct 22 '18 at 12:48
  • Have you tried setting the value of `database_port`? If you don't know, you can try default port first `3306` – Yohanes Gultom Oct 22 '18 at 12:51
  • No .. Nothing change ..? i that possible to set the password to root or nothing without having this : "Your password does not satisfy the current policy requirements" –  Oct 22 '18 at 13:01

0 Answers0