SVN not using the right port for mySQL?
Added by Tom A over 16 years ago
Hello redmine gurus...
I have a set up a redmine installation in ubuntu running mongrel clusters with SVN and mysql.
I almost everything working except the SVN. Redmine has access to SVN and can create repositories, my problem is that i cannot access SVN from the browser to see those repositories.
When i try to access my SVN site, i get a 500 internal server error. Looking in my apache2 log i can see the following error:
[Tue Jul 15 17:26:34 2008] [error] [client 192.168.1.59] Can't call method "prepare" on an undefined value at /usr/lib/apache2/Redmine.pm line 142.\n
DBI connect('dbname=redmine;host=127.0.0.1','redmine',...) failed: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
From this error, i can tell that that the connection should be refused since mySQL is open on its default port of 3306.
My question is, how can i fix this so that SVN accesses the redmine mySQL db on the right port. obviously the file /usr/lib/apache2/Redmine.pm is a redmine file.
Can anyone shed some light on this, or am i going in the wrong direction with this error.
thanks.
Replies (3)
RE: SVN not using the right port for mySQL? - Added by Knut H. over 16 years ago
Hello,
I have an similar problem using a mysql V5 db. Some provider require a IP/port combination for using a v5 db.
During Installation the mysql host called 127.0.0.1:3307 isn t detected.
> rake db:migrate RAILS_ENV="production" (in /home/www/cgi-bin) rake aborted! Unknown MySQL server host '127.0.0.1:3307' (3)
I think the routine cannot handle [Ip : Port]
Knut
RE: SVN not using the right port for mySQL? - Added by Tom A over 16 years ago
Me again,
After much pain and crying i figured my problem, so Knut maybe this can help you too if you are using the same thing or have done the same thing i did.
I used this guide: http://www.drinkingbird.net/blog/articles/2008/02/27/setting-up-a-redmine-site-on-ubuntu to help me set up my redmine install.
Since that guide uses PosgreSQL and i use mySQL, i finally managed to find where i overlooked things.
In /etc/apache2/sites-available/subversion (subversion being the name of my subversion file):
i had the line:
PerlSetVar dsn DBI:pg:dbname=redmine;host=127.0.0.1
and i did not notice that the DBI:pg uses the postgresql connection, so a simple change to:
PerlSetVar dsn DBI:mysql:dbname=redmine;host=127.0.0.1
did the trick.
RE: SVN not using the right port for mySQL? - Added by Knut H. over 16 years ago
Hi Tom,
I think that isn´t the solution for my problem. During the normal installation I have this port problem with my mysql db.
Thanks for the answer, I will post my trouble in a separately thread.
Knut