I have a problem with mysql module This is my share of code for trial connection:
var Express = Required ('Express'); Var mysql = Required ('mysql'); Var FS = Requirement ('FS'); Var app = express (), http = expected ('http'), server = http.createServer (app), io = require ('socket.io'). Listen (server); Io.sockets.on ('connection', function (socket) {// en connection: socket.on ('info', function (host, user, MDP, MDP1) {var connection = mysql.createConnection ({host: Host, user: user, password: MDP, database: '',}); connection.connect (function) {if (err) {console.log ('Erreur de connexion au serveur'); socket.emit (' Erreur If there is any error of connection I;); will emit a message to display the message of error, otherwise I will display the message of success.
- Mer Host: Local Host
- User: Root
- Password: ''
- If I enter the local host and route the message "Ok "Test"
- If I enter the local hostflow and rootflas message "not test" (this is normal)
- If I enter the local host and the rootflas message is "test-oc".
So why 'there is no test for the root' '
I want to understand my problem Thank you
Is it possible that your database configuration accepts any user ?
No comments:
Post a Comment