Summary: | During Installation, connection to remote mysql server fails | ||
---|---|---|---|
Product: | Koha | Reporter: | Seema Albal <seemaalbal> |
Component: | Installation and upgrade (command-line installer) | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P1 - high | CC: | david |
Version: | 19.05 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Seema Albal
2020-01-06 12:44:02 UTC
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 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 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 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 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 :) (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 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! Thanks.. please ignore the 503 error in the above comment. Got the web installer running now! Excellent! Glad to hear you got there!! |