Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : db.connect No connection after running " node mobius.js " #33

Open
ajiteguh opened this issue Apr 2, 2020 · 18 comments
Open

Error : db.connect No connection after running " node mobius.js " #33

ajiteguh opened this issue Apr 2, 2020 · 18 comments

Comments

@ajiteguh
Copy link

ajiteguh commented Apr 2, 2020

Hello,

I found issue when following guidance of Mobius installation.
After running "node mobius.js" i got these errors :

C:\Installer App\Mobius-master>node mobius.js
Production Mode
Garbage collection is not exposed
sgn_mqtt_client is connected
[db.connect] No Connection
^C
C:\Installer App\Mobius-master>

Please share your advice and suggestions.

Thank you

@topkim993
Copy link

topkim993 commented Apr 4, 2020

I am having the same problem.

Production Mode
Garbage collection is not exposed
[db.connect] No Connection

@ajiteguh
Copy link
Author

ajiteguh commented Apr 4, 2020

I am having the same problem.

Production Mode
Garbage collection is not exposed
[db.connect] No Connection

There is no clear and detail guidance about this Mobius Installation.

@MarcoSapienza
Copy link

Hi,

I'm having the same problem.
does anyone have any information about it?

@MarcoSapienza
Copy link

Hi all,

I have resolved the problem.

The problem is related to the mysql authentication method for root user.

You should to change the method from auth_socket to mysql_native_password

@topkim993
Copy link

Hi all,

I have resolved the problem.

The problem is related to the mysql authentication method for root user.

You should to change the method from auth_socket to mysql_native_password

I entered the port and password correctly in the conf.js file. Are you talking about settings other than it?

@MarcoSapienza
Copy link

Yes,
I am referring to the mysql configuration

Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

Read from Step 3: Change the authentication method for root

Alternatively, I can post the mysql commands

@topkim993
Copy link

topkim993 commented Apr 5, 2020

Yes,
I am referring to the mysql configuration

Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

Read from Step 3: Change the authentication method for root

Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

@MarcoSapienza
Copy link

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

@topkim993
Copy link

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

The log has been checked as below.

getConnection error is Error: ER_BAD_DB_ERROR: Unknown database 'mobiusdb'

I had the schema set to modiusdb.

Thanks to that I fixed that error. Thank you.

@ajiteguh
Copy link
Author

ajiteguh commented Apr 6, 2020

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.

Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?

thanks before

@MarcoSapienza
Copy link

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.

Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?

thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

@jimin755
Copy link

jimin755 commented Apr 9, 2020

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.
Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?
thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

hello
I'm having the same problem and i'm using window environment
Can you give me some advice?

@devvace
Copy link

devvace commented Apr 10, 2020

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.
Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?
thanks before

Hi @neo-electro , sorry for the delay in answering you.
Are you using a linux or windows environment?

hello
I'm having the same problem and i'm using window environment
Can you give me some advice?

Did you create a database? name is >>> mobiusdb

@ajiteguh
Copy link
Author

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.
Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?
thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

Hello Marco, I'm using Windows Environment.

@MarcoSapienza
Copy link

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.
Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?
thanks before

Hi @neo-electro , sorry for the delay in answering you.
Are you using a linux or windows environment?

Hello Marco, I'm using Windows Environment.

Hi @neo-electro , below the steps:

1 - Go to the root folder, go to mobius/db_action.js

2 - Open db_action.js with a text editor

3 - Put the instruction console.log(err) after row 80

4 - Then restart mobius server

If everything is correct you should to see the error in your terminal

@MarcoSapienza
Copy link

MarcoSapienza commented Apr 14, 2020

Yes,
I am referring to the mysql configuration
Following this link you should be able to change the authentication configuration associated with the root user
https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/
Read from Step 3: Change the authentication method for root
Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?
Maybe your error is different from mine

Hi @MarcoSapienza
Thanks for your insights.
I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.
Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?
thanks before

Hi @neo-electro , sorry for the delay in answering you.
Are you using a linux or windows environment?

hello
I'm having the same problem and i'm using window environment
Can you give me some advice?

Did you create a database? name is >>> mobiusdb

Hi @DAEWOONPARK , I have created mobiusdb database.

However, I have already resolved the problem

@seunghwanly
Copy link

In my case, I set up a checklist to check which part is causing the error.

Checking with the file in mobius-2.4.36/app.js at line 117

스크린샷 2022-01-16 오후 3 50 44

I found the error was something with ConnectionPool

스크린샷 2022-01-16 오후 3 51 25

Seemed the connection was not being created at all

Checklist

  • Check if the MySQL is running, in this repo, the basic code runs at localhost:3306
  • If you are using macOS and using homebrew, don't be confused you might be using both daemon and MySQL simultaneously
  • Check if the root's plugin is set to caching_sha2_password, update to mysql_native_password
  • Lastly, check the conf.json file if it is updated properly

@yalrnr
Copy link

yalrnr commented Jun 18, 2023

I was also having the same issue. Solved it by uninstalling mySQL and reinstalling the 8.0.22 versions as mentioned in the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants