Bugzilla – Attachment 26487 Details for
Bug 11974
Enable non-default unix socket location for database connections.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11974 - Enable unix socket connections for database connections. Added installer options.
Bug-11974---Enable-unix-socket-connections-for-dat.patch (text/plain), 2.95 KB, created by
Olli-Antti Kivilahti
on 2014-03-20 14:37:10 UTC
(
hide
)
Description:
Bug 11974 - Enable unix socket connections for database connections. Added installer options.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-03-20 14:37:10 UTC
Size:
2.95 KB
patch
obsolete
>From ffe956c17018365842b231ecddcae287f67ae4f5 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Thu, 20 Mar 2014 16:32:29 +0200 >Subject: [PATCH] Bug 11974 - Enable unix socket connections for database > connections. Added installer options. > >Modified the Makefile.PL to ask for the non-default unix socket when using mysql or mariadb. >Modified the rewrite-config.PL to actually include the new variable in the koha-conf.xml > >To test: >1. Reinstall using perl Makefile.PL >1.1. Write some path to the question: 'mysql socket location' >2. make, make test, make install >3. Verify that the installed koha-conf.xml has the new variable 'mysql_socket'. >--- > Makefile.PL | 14 ++++++++++++++ > etc/koha-conf.xml | 2 +- > rewrite-config.PL | 1 + > 3 files changed, 16 insertions(+), 1 deletion(-) > >diff --git a/Makefile.PL b/Makefile.PL >index 8b89633..9aa7416 100644 >--- a/Makefile.PL >+++ b/Makefile.PL >@@ -418,6 +418,7 @@ my %config_defaults = ( > 'DB_NAME' => 'koha', > 'DB_USER' => 'kohaadmin', > 'DB_PASS' => 'katikoan', >+ 'DB_MYSQL_SOCKET' => '', > 'INSTALL_SRU' => 'yes', > 'INSTALL_PAZPAR2' => 'no', > 'AUTH_INDEX_MODE' => 'dom', >@@ -898,6 +899,19 @@ DMBS); > my $db_port_default = $config{'DB_TYPE'} eq 'mysql' ? '3306' : '5432'; > $config{'DB_PORT'} = _get_value('DB_PORT', $msg, $db_port_default, $valid_values, $install_log_values); > >+ if ($config{'DB_TYPE'} =~ /mysql/i || $config{'DB_TYPE'} =~ /mariadb/i) { >+ $msg = ' >+Alternatively you can define a non-default >+unix socket to use for '.$config{'DB_TYPE'}.'. This >+must be configured if you have moved the >+socket defined in "my.cnf" to a non-default >+location. >+Otherwise it is safe to leave this field empty. >+ >+'.$config{'DB_TYPE'}.' socket location'; >+ $config{'DB_MYSQL_SOCKET'} = _get_value('DB_MYSQL_SOCKET', $msg, $defaults->{'DB_MYSQL_SOCKET'}, $valid_values, $install_log_values); >+ } >+ > $msg = q( > Please specify the name of the database to be > used by Koha); >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index 8f1be34..0d7046f 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -271,7 +271,7 @@ __PAZPAR2_TOGGLE_XML_POST__ > <database>__DB_NAME__</database> > <hostname>__DB_HOST__</hostname> > <port>__DB_PORT__</port> >-<!-- <mysql_socket>__put your non-default mysql/mariadb socket path here. eg /tmp/mysqld.sock__</mysql_socket> --> >+ <mysql_socket>__DB_MYSQL_SOCKET__</mysql_socket> > <user>__DB_USER__</user> > <pass>__DB_PASS__</pass> > <biblioserver>biblios</biblioserver> >diff --git a/rewrite-config.PL b/rewrite-config.PL >index ea69c94..bea32cd 100644 >--- a/rewrite-config.PL >+++ b/rewrite-config.PL >@@ -87,6 +87,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; > "__DB_NAME__" => "koha", > "__DB_HOST__" => $myhost, > "__DB_PORT__" => "3306", >+ "__DB_MYSQL_SOCKET__" => "", > "__DB_USER__" => "kohaadmin", > "__DB_PASS__" => "katikoan", > "__WEBMASTER_EMAIL__" => 'webmaster@'.$mydomain, >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11974
:
26484
|
26485
|
26486
| 26487 |
26505
|
63940
|
63941
|
63942
|
63943
|
73131