I have created 2 accounts in my localpc and then after I registered it with mongooseim. I am able to login mongooseim through converseJS client.
Now I want to login mongooseim from mysql tables fields(username, password), without creating new accounts in localpc, in short mongooseim should authenticate users from sql-database only.
You should configure your server to use ejabberd database authentication.
This is done with module ejabberd_auth to work with odbc and choosing odbc type MySQL.
Please read, this part of the documentation: http://www.process-one.net/docs/ejabberd/guide_en.html#htoc25