question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ER_BAD_DB_ERROR: Unknown database 'dicionary'

See original GitHub issue

Hi!

Hope you are doing great.I am getting error while connecting mysql with node, and the error is

{ Error: ER_BAD_DB_ERROR: Unknown database 'dicionary'
    at Handshake.Sequence._packetToError (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Handshake.ErrorPacket (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/sequences/Handshake.js:124:18)
    at Protocol._parsePacket (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/Users/admin/Documents/dicionario/node_modules/mysql/lib/Connection.js:91:28)
    at Socket.<anonymous> (/Users/admin/Documents/dicionario/node_modules/mysql/lib/Connection.js:525:10)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    --------------------
    at Protocol._enqueue (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Protocol.handshake (/Users/admin/Documents/dicionario/node_modules/mysql/lib/protocol/Protocol.js:51:23)
    at Connection.connect (/Users/admin/Documents/dicionario/node_modules/mysql/lib/Connection.js:119:18)
    at Object.<anonymous> (/Users/admin/Documents/dicionario/server.js:23:5)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
  code: 'ER_BAD_DB_ERROR',
  errno: 1049,
  sqlMessage: 'Unknown database \'dicionary\'',
  sqlState: '42000',
  fatal: true }

I am using node version 10.15.0. Please let me know where i am wrong , i am stuck there and didn’t get any success. Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
dougwilsoncommented, Feb 28, 2019

Hi @Alaa-mansour ! The error ER_BAD_DB_ERROR: Unknown database 'dicionary' is something your MySQL server is returning back, as there is either no table named “dicionary” in your database or the user you’re connecting with does not have access to such a table.

I notice that “dicionary” has a typo in it, so perhaps you meant to connect with the database name of “dictionary” ?

3reactions
dougwilsoncommented, Feb 28, 2019

Try running SELECT CURRENT_USER() in both just as a sanity check, for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR 1049 (42000): Unknown database 'mydatabasename'
When i execute the above command i am getting the following error, i have also given all the permission to the user upon...
Read more >
ERROR 1049 (42000): Unknown database 'mysql' | Support
ERROR 1049 (42000): Unknown database 'mysql' when trying to access mysql via this command: mysql --user=root mysql.
Read more >
Resolve Unknown database in JDBC error with Java-MySQL?
Resolve Unknown database in JDBC error with Java-MySQL? - This type of error occurs if you select any database that does not exist...
Read more >
New Relic data dictionary
This data dictionary defines some of our default-reported data stored in NRDB and ... Value may be 'Unknown' if an error occurs outside...
Read more >
Data Dictionary - USAspending
1862 Land Grant College 1862 Land Grant College Award Recipient N/A Contracts N/A 1890 Land Grant College 1890 Land Grant College Award Recipient N/A...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found