MySQL and Electroserver

I have recently downloaded Electroserver and so far it is great looking at a few iof the tutorials I have set up a chat script. Basically you login with a username and connect to the server. But I need to know how to let the script check a MySQL database and possibly create a new login. I have made the server script in C# I had to upload the script as an attachment because the character count went over 10, 000.

481782–16906–$Main.cs (9.43 KB)

What is normally done is that the client sends both a username and a password to the server in the LoginRequest. The server will need an extension that has a LoginEventHandler, and in that LoginEventHandler you can make the database call to determine whether to allow the user to log on or not. For busy servers you use a two stage login process.

There are two database examples provided with ES5. The DatabaseWithJDBI example uses Derby but does show you one easy way to implement the database accesses. You are welcome to post ES5 specific questions in the Electrotank forum.

I cannot run the mysql when it code`s are required.