Git Product home page Git Product logo

Comments (5)

napisani avatar napisani commented on July 20, 2024 1

I hope you didnt spent too much time racking your brain on this one. I was able to finally get it working by changing my connection string to this format:

dbee.setup({
	lazy = true,
	connections = {
		{
			name = "examplemysql",
			type = "mysql",
			url = "root:password@(localhost:3306)/db1",
		},
	},
})

Thanks again for your help!

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

Hey @napisani, thanks for trying out the plugin.

I probably won't be able to check anything with my pc thia week, but nonetheless, lets try some things:
I see you aren't calling the setup function from packer (e.g. you aren't lazy loading the plugin) For some reason nvim has some trouble running go commands on startup. Try putting lazy = true in your config, so the setup looks like this:

dbee.setup({
  lazy = true,
 connections = {
    {
      name = "examplemysql",
      type = "mysql",
      url = "mysql://root:redacted@localhost:3306/db1",
    },
  }
})

Please let me know if it works!

from nvim-dbee.

napisani avatar napisani commented on July 20, 2024

Thank you, I think I'm one step closer now.
Although now I'm running to this error after running the following command

Cmd:

lua require("dbee").execute("select * from person")

Error:

connection with id examplemysqlmysql not registered

Sorry to be a pain, but I appreciate your help

from nvim-dbee.

kndndrj avatar kndndrj commented on July 20, 2024

Hey, can you try that again and then run :mes and paste the output here?
Also, can you paste the contents of ~/.cache/nvim/dbee/dbee.log?
It would be helpful to have some sort of logs

P.S. don't worry I value this kind of feedback :D

from nvim-dbee.

napisani avatar napisani commented on July 20, 2024

Sure thing, tried it again, followed by the :mes command. However there were no messages to be found in the messages panel

here is what the dbee.log file contained after doing those two commands:

~ ❯ cat ~/.cache/nvim/dbee/dbee.log
2023/05/15 11:59:50 [DebugLevel]: calling Dbee_register_connection
2023/05/15 11:59:50 [ErrorLevel]: Unable to connect to database: default addr for network 'localhost:3306' unknown
2023/05/15 11:59:50 [DebugLevel]: calling Dbee_set_results_buf
2023/05/15 11:59:50 [DebugLevel]: Dbee_set_results_buf returned successfully
2023/05/15 11:59:50 [DebugLevel]: calling Dbee_execute
2023/05/15 11:59:50 [ErrorLevel]: connection with id examplemysqlmysql not registered

from nvim-dbee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.