From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uP80NvYnxWOusQAAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 11:33:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QHdONvYnxWMycAEA9RJhRA (envelope-from ) for ; Mon, 16 Jan 2023 11:33:26 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9777622F77 for ; Mon, 16 Jan 2023 11:33:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHMnX-0004n8-Vv; Mon, 16 Jan 2023 05:33:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHMnT-0004l0-MV for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:32:59 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHMnR-0007Dg-Ok for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:32:59 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 61F1C24016B for ; Mon, 16 Jan 2023 11:32:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1673865174; bh=4U+K6btBGi9zy3I29msLuhAfeocz/rcBBEGUoAz1j5U=; h=From:To:Cc:Subject:Date:From; b=iOscIF4j/nvs14qb3WKkkwug26CFL7eMxyNfwzSeUFxTAuZWLNZ8sv87Haa3gifd8 ecCcbImzFzpZlqJEidzBjCP7VBF3DqCWfN+V0h7RT8tGU8a9rhcTsidziBntAi9sUL X8yy8gcGtwevC8izOlEQpB61Cow6zQh0BOb7iAoItKf3lrX3X3tjIt1zBUr2R/VduH 7v/argr6dK6B7bmqxVVqZ4/E32GaDp30mxaKB8WxpMh0xT8MLUiP4JLY3wtz5sGRJb 92DY/BH8FvCxyZp5/TgiA1JTHmlbWzL+nN86CH2lyG4wT1qFpPJ5ge7zwWeCl98fK+ R28vEjHXseJ4Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NwSys2YsWz9rxM; Mon, 16 Jan 2023 11:32:53 +0100 (CET) From: Ihor Radchenko To: Andreas Gerler Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] ob-sql sql-connection-alist In-Reply-To: References: Date: Mon, 16 Jan 2023 10:33:23 +0000 Message-ID: <87r0vuzs3w.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673865206; a=rsa-sha256; cv=none; b=V+QlJAlpXH98yQV2K6srGCxALqwEN6YB4uElu2IOeLEClp1PCBwGbANS/ilDCWdbRB9yBn 0tEZMpf1bngW3QwUIRL07d0LKfBG91xj+TyPVv+euTdhkpzrhPfeq2slolz2aI9lBzsFN+ dLhFnwqzBQMdBBm/q8utxVJkvKhdDQEqzZOSHMlvLo47e71SQ0z8or0bgJUcFoXzqbO+H9 Na7ZrxPVoUzUiPrMWpzR/j684K8+KInsxWkuhyuf3dlkznj88n84SESrju3blG2TZ+Z7/w vhJ/JkpAH1gHv0goS3+ovu++eNYBAe7SjQqWVXWaOw8A/UHIo8L/iRkuI6WqAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iOscIF4j; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673865206; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=WuOg5ft2WP2qVI3N64pW2tGAdDwX8kTJOOwn2apLAR4=; b=tWZ0g8RD92SKtKWsESZcnW6jq9dj6SaELd6DkuC1tkSKpRyhr+r0vtzTT93vZkeoeUJo7O ZoX/fynyj59mgS8ymWhRXUu00Di5K2HBN3/JL51sl7AB+FsaA/V74iNG2u+3a0KukHIZIB lTNRZJ4B7c+imuOz6Zz+8aFj7j7XOI3YYaN1yVgoAlxRyj5FQFOzt6bTDW/T88TTX4EfMv QMHjmq0cb1srucsVIi84YTcuV2IDtKCG/VE7997aIPXkR+1Yy6j/XAhWprjyJRHdL7Nltt jIv4GnS8JxqNp0xJz45DjdPeWyFxvunyfU/+jLkV1269iadhcGmGp4T4npiLmA== X-Migadu-Spam-Score: -6.07 X-Spam-Score: -6.07 X-Migadu-Queue-Id: 9777622F77 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=iOscIF4j; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-TUID: Ezg4rNNX7dNZ Andreas Gerler writes: > Last week I heard about using ob-sql with credentials stored in the varia= ble 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=E2=80=9D) > (sql-port 3306) > (sql-password =E2=80=9Cfoo") > (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: =20=20=20=20=20 (CONNECTION \(SQL-VARIABLE VALUE) ...) =20=20=20=20=20 Where CONNECTION is a case-insensitive string identifying the connection, ... So, your "setq" example is incorrect: must use "testdb" instead of `testdb' symbol. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at