summaryrefslogtreecommitdiff
path: root/storage/connect/mysql-test/connect/t
diff options
context:
space:
mode:
authorAnel <an3l@users.noreply.github.com>2022-10-16 20:38:04 +0200
committerGitHub <noreply@github.com>2022-10-16 19:38:04 +0100
commitb20f608d4f9a3e77db1381ea6ccaab4ae83c07c2 (patch)
tree182e9fb630d483deb05c5c17aded2939efe7bdfa /storage/connect/mysql-test/connect/t
parent5f25a9114051b078696813628c37add0e15d88f2 (diff)
downloadmariadb-git-b20f608d4f9a3e77db1381ea6ccaab4ae83c07c2.tar.gz
Update ODBC instructions for Connect SE and update ODBC result file (#2284)
* ODBC Connect cosmetic fixes - Update command for connection for default `peer` authentication for user `postgres` (unless changed in `pg_hba.conf`). - Update command for privilege to be more verbose. - Update path for `.sql` file - Update instructions for `pg_hba.conf` file to use unix socket (`local`) type as well as TCP/IP type `host`. - Update instruction about usage of user dsn (data source file) over system dsn. - Update path of `odbc-postgresql` driver path in comment * Connect SE: update ODBC result file
Diffstat (limited to 'storage/connect/mysql-test/connect/t')
-rw-r--r--storage/connect/mysql-test/connect/t/odbc_postgresql.sql6
-rw-r--r--storage/connect/mysql-test/connect/t/odbc_postgresql.test17
2 files changed, 14 insertions, 9 deletions
diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
index a795817a4d3..e6452f70b37 100644
--- a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
+++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql
@@ -2,7 +2,7 @@
-- The SQL script to create PostgreSQL data for odbc_postgresql.test
--
-- Run this script as a admin user:
--- psql -U postgres < odbc_postgresql.sql
+-- sudo -u postgres psql < storage/connect/mysql-test/connect/t/odbc_postgresql.sql
SET NAMES 'UTF8';
@@ -11,7 +11,7 @@ DROP USER IF EXISTS mtr;
CREATE USER mtr WITH PASSWORD 'mtr';
CREATE DATABASE mtr OWNER=mtr ENCODING='UTF8';
-GRANT ALL ON DATABASE mtr TO mtr;
+GRANT ALL PRIVILEGES ON DATABASE mtr TO mtr;
\c mtr
SET role mtr;
CREATE TABLE t1 (a INT NOT NULL);
@@ -27,4 +27,4 @@ CREATE TABLE schema1.t2 (a CHAR(10) NOT NULL);
INSERT INTO schema1.t2 VALUES ('xxx'),('yyy'),('zzz'),('ÄÖÜ');
CREATE TABLE schema1.t3 (a CHAR(10) NOT NULL, b CHAR(10) NOT NULL);
INSERT INTO schema1.t3 VALUES ('xxx', 'aaa'),('yyy', 'bbb'),('zzz', 'ccc'),('ÄÖÜ', 'яяя');
-
+\dt schema1.*
diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.test b/storage/connect/mysql-test/connect/t/odbc_postgresql.test
index 86597423d04..2c3d4040c79 100644
--- a/storage/connect/mysql-test/connect/t/odbc_postgresql.test
+++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.test
@@ -5,10 +5,10 @@
# To configure your system to be able to run this test,
# follow through the following steps:
#
-# 1. Install and configure PostgreSQL database to stat on the system startup
+# 1. Install and configure PostgreSQL database to start on the system startup
#
# 2. Create user, database, schema and tables to be used by mtr:
-# psql -U postgres < odbc_postgresql.sql
+# sudo -u postgres psql < storage/connect/mysql-test/connect/t/odbc_postgresql.sql
#
# 3. Install PostgreSQL ODBC Driver.
# - On CentOS, Fedora:
@@ -18,18 +18,23 @@
#
# 4. Create a data source with the name "ConnectEnginePostgresql"
# - On Windows: use odbcadm.exe
-# - On Linux: put these lines into /etc/odbc.ini
+# - On Linux: put these lines into /etc/odbc.ini or in ~/.odbc.ini
#
#[ConnectEnginePostgresql]
#Description=PostgreSQL DSN for ConnectSE
-#Driver=PostgreSQL (should the path to the driver so file)
+#Driver=PostgreSQL (should the path to the driver so file, on linux: /usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so)
#Database=mtr
#Servername=localhost
#Port=5432
#
# 5. Allow user "mtr" to connect to the database "mtr"
-# Add this line into the begginning of pg_hba.conf
-# (usually /var/lib/pgsql/data/pg_hba.conf on Linux):
+# Find `pg_hba.conf` file:
+# Run `SHOW hba_file;` or `locate pg_hba.conf` to find right location
+# (usually /var/lib/pgsql/data/pg_hba.conf or /etc/postgresql/[version]/main/pg_hba.conf on Linux)
+# Add this line into the beginning of pg_hba.conf:
+# For unix socket connection (connect with `psql -U mtr`)
+#local mtr mtr password
+# For TCP/IP connection (connect with `psql -U mtr -h 127.0.0.1`)
#host mtr mtr 127.0.0.1/32 password
#
# 6. Restart the server: