[Bug 24351] New: Connection to remote mysql server errors
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 Bug ID: 24351 Summary: Connection to remote mysql server errors Change sponsored?: --- Product: Koha Version: 19.11 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: seemaalbal@gmail.com QA Contact: testopia@bugs.koha-community.org Hi I am installing Koha 19.11 on Debian 4.9. My SQL server is running on another instance. My my.cnf looks like this: [client] host=<remote ip> user=root password=xxxxx I have successfully installed library instance using the koha-create --create-db <libraryname> command This has installed a koha site in my apache2. However, the koha-conf.xml under /etc/koha/sites/<libraryname>/koha-conf.xml had db hostname as localhost. I have edited this to point to my sql server. However, when I do a wget localhost:8080 I still get an internal server error. DBI Connect('database=<libraryname;host=localhost;port=3306','koha_libraryname',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 No such file or directory): /usr/share/koha/intranet/cgi-bin/mainpage.pl Please let me know where and how is the database server getting the default value of localhost. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 Seema Albal <seemaalbal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Connection to remote mysql |During Installation, |server errors |connection to remote mysql | |server fails Priority|P5 - low |P1 - high -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 --- Comment #1 from Seema Albal <seemaalbal@gmail.com> --- Error message mentions it can't connect to local server while the SQL server is remote. mainpage.pl: DBI connect('database=koha_libraryname;host=localhost;port=3306','koha_libraryname',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1517.: /usr/share/koha/intranet/cgi-bin/mainpage.pl -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 --- Comment #2 from Seema Albal <seemaalbal@gmail.com> --- And this is the error on the browser: Software error: DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1520. at /usr/share/koha/lib/Koha/Database.pm line 107 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Hopefully this will point you in the right direction to solve the problem you are having: https://wiki.koha-community.org/wiki/Install_Koha_3.6_on_Debian_squeeze_usin... While it mentions Koha 3.6 I think it is still mostly correct. Instead of using the sudo koha-create --create-db <libraryname> command you need to follow these steps: 1. sudo koha-create --request-db <libraryname> 2. Follow the instructions in the file created: create the database with the user name and password on your remote database server and set the required permissions. 3. Test that you can connect to the remote mysql server from your Koha server, for example: sudo mysql -u <username> -p -h <host-name-or-ip-address>. (Some database servers may be setup to not allow remote access, you will need to sort that out. You will need to install the database client packages on your Koha server.) 4. Populate the database: koha-create --populate-db <libraryname> 5. Carry on with your Koha installation... If this doesn't work, I would post a message to the Koha mailing list or try the IRC channel. If it does work, please post a comment as appropriate. Notes: * You may need to revert any changes you may have made, such as changes to my.cnf or Apache * You will need to delete the instance you have created: sudo koha-remove <libraryname> * I assume you didn't mean you were installing on Debian 4.9 (a very very old version of Debian) * I will look at testing these steps properly when I get a chance and incorporating these instructions or updating them into the main guide available at https://wiki.koha-community.org/wiki/Koha_on_Debian -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Seema, you can try to restart Plack and Memcached to make sure that your changes to the configuration files have taken effect. But this should be really discussed on the mailing list as it's a installation/setup issue and probably not a bug: https://koha-community.org/support/koha-mailing-lists/ It will also mean a lot more people are reading and will be able to help out - only very few of us are reading all the new bugs :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|19.11 |19.05 Resolution|--- |INVALID Status|NEW |RESOLVED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 --- Comment #5 from Seema Albal <seemaalbal@gmail.com> --- (In reply to David Nind from comment #3)
Hopefully this will point you in the right direction to solve the problem you are having: https://wiki.koha-community.org/wiki/Install_Koha_3. 6_on_Debian_squeeze_using_a_separate_MySQL_server
This helped! Thanks -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 Seema Albal <seemaalbal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #6 from Seema Albal <seemaalbal@gmail.com> --- Just updating what actually worked... Following the steps in the wiki page, I landed the "Sorry, this page is under maintenance ...." page. Looked around and found that using this method, I had to do koha-enable mylibrary Upon doing that and restarting, (and still editing koha-conf.xml with right db host values), I got the same error again!! Then, as per @Katrin_Fischer, I did $service memcached restart (At this time browser setup gave maintenance page) $koha-plack --enable mylibrary $koha-plack --start mylibrary This required some additional apache2 modules to be installed and restarted (after this some 503 Service unavailable error) And this did the trick!! Thanks! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 Seema Albal <seemaalbal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|REOPENED |RESOLVED --- Comment #7 from Seema Albal <seemaalbal@gmail.com> --- Thanks.. please ignore the 503 error in the above comment. Got the web installer running now! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24351 --- Comment #8 from David Nind <david@davidnind.com> --- Excellent! Glad to hear you got there!! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org