MySQL Server not accepting connections

No. The workbench is for interacting with the server under a gui, but is not necessary to run the server.


Is there a tutorial on how to start a local MySQL server?

After installation it should be kept running even after reboot, so you shouldn’t worry.


Ok, but it is now telling me this:

Error connecting to the database: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Sequence._packetToError (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Handshake.ErrorPacket (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\sequences\Handshake.js:123:18)
at Protocol._parsePacket (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket. (C:\Users\HP\Desktop\server\node_modules\mysql\lib\Connection.js:88:28)
at Socket. (C:\Users\HP\Desktop\server\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:324:12)
at Protocol._enqueue (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (C:\Users\HP\Desktop\server\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (C:\Users\HP\Desktop\server\node_modules\mysql\lib\Connection.js:116:18)
at Object. (C:\Users\HP\Desktop\server\index.js:16:12)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
errno: 1251,
sqlMessage: ‘Client does not support authentication protocol requested by server; consider upgrading MySQL client’,
sqlState: ‘08004’,
fatal: true


18:37:54 ALTER USER ‘root’ IDENTIFIED WITH mysql_native_password BY ‘(mypasswordhere)’ Error Code: 1396. Operation ALTER USER failed for ‘root’@‘%’ 0.125 sec

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘. TO ‘sqluser’@’%‘’ at line 1

didnt work


mhm no, my username doesnt have an underline, its just “root”

great, now its telling me " Access denied for user ‘root’@‘’ to database ‘messages’"

Now its even screwed up even more, thanks

i think i should quit tbh, i just cant seem to get it work at all

I was thinking about this

where do you have sqluser mentioned?


i changed it to “root”, still not working

Can you paste what you are trying to execute here? In following format

1 Like

Nevermind, the guy on stack overflow did a typo. I corrected it and it works. It now says the messages are saved on the database successfully. But still, when i refresh the site the messages go away

At this point the only person who can debug it is you.
If you are programming the project yourself then you need to fetch the messages in database and display them when you load the page.


i cant debug it

Are these messages related to user ID (and pass)
so then it is “normal” for such information to be lost during refresh so nothing is displayed ?

but you can certainly store it this way HTML Web Storage API

or is it like the last 100 lines in one of the “chat rooms” so when someone enters then those messages should be displayed to all?

besides that, have you tried testing with another browser?
also check other things like cookies

the problem can be super banal, you just need to see what is happening in the background.

If programming was easy then everyone would be a programmer


the HTML Web Storage API stores it locally. I want this to be server-side meaning anyone can see it

When you send a message, it is saved as a row on a column called “text” on a MySQL database called “messages”. I want the code to fetch all the rows from that column and display it as the messages. There are no other columns.

The messages send in real time and everyone can see it.

I posted it on stack overflow and someone told me to implement connection state recovery on and it works and now the messages save and i have a real time forum

Congratulations :slight_smile:

Now you will still have to spend a large part of your time to get insured
so that no one writes something in the comments or under the username
or somewhere further that could break your SQL or some code to cause your app to accidentally do something that is not intended.

Then of course to prevent flood (so that someone doesn’t publish 100 lines in 5 seconds)
and then request min.chars for the message as well as max
so that someone doesn’t publish a book in one message and “crash” your chat/forum

And then disable sending curse words, and creating usernames like “admin, moderator, etc.”…

So it would be good if you make a config section
in which you will keep all these settings and edit them through the GUI
then either save it in a file or in the DB


Nevermind, i cant get it to be server-side (its localhost) and infinityfree doesnt support node.js so i ended up just abandoning it