emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] ob-sql sql-connection-alist


From: Ihor Radchenko
Subject: Re: [BUG] ob-sql sql-connection-alist
Date: Mon, 16 Jan 2023 10:33:23 +0000

Andreas Gerler <baron@bundesbrandschatzamt.de> writes:

> Last week I heard about using ob-sql with credentials stored in the variable 
> used by isql.
> However I had to modify ob-sql to get it actually working.
> Can somebody test the pach before I send in a commit?
>
> #+begin_src sql :engine mysql :dbconnection testdb
> show tables;
> #+end_src
>
> (setq sql-connection-alist
>       '((testdb (sql-product 'mysql)
>                 (sql-server "127.0.0.1")
>                 (sql-user "mysql”)
>                 (sql-port 3306)
>                 (sql-password “foo")
>                 (sql-database "mysql"))))

I am looking at the docstring of `sql-connection-alist':

    An alist of connection parameters for interacting with a SQL product.
     Each element of the alist is as follows:
     
       (CONNECTION \(SQL-VARIABLE VALUE) ...)
     
     Where CONNECTION is a case-insensitive string identifying the
     connection, ...

So, your "setq" example is incorrect: must use "testdb" instead of
`testdb' symbol.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]