serendipity error: unable to connect to database - exiting.

Having trouble installing serendipity?
Post Reply
manuelr
Regular
Posts: 5
Joined: Fri Sep 30, 2011 8:54 am

serendipity error: unable to connect to database - exiting.

Post by manuelr »

Hallo,
das Problem das ich habe ist mit Sicherheit sehr simpel zu lösen. Nur bin ich ein absoluter Rookie und versuche mich das erste mal im Erstellen eines Serendipity Blogs.

Zu meinem Problem:
Ich habe Serendipity auf meiner VM (Ubuntu Linux) installiert. Auf dieser VM sind sowohl MYSQL als auch PHP5 und Apache installiert. Ich habe auch schon eine neue Mysql leere Datenbank (namens serendipity) erstellt. Wenn ich jetzt versuche http://localhost/serendipity/ in meinem Firefoxbrowser zu öffnen bekomme ich folgende Fehlermeldung:

serendipity error: unable to connect to database - exiting.

Nach dem Suchen dieser Fehlermeldung via Google bin ich nur darauf gestoßen, dass ich im database.inc.php file die entsprechenden Daten eintragen muss. Leider Ohne Erfolg.

Ich würde mich freuen, wenn mir jemand bei der Behebung dieses Problems helfen könnte.
Danke schonmal

Manuel
manuelr
Regular
Posts: 5
Joined: Fri Sep 30, 2011 8:54 am

Re: serendipity error: unable to connect to database - exiti

Post by manuelr »

in english :

Hallo,
I'm sure my problem isn't difficult to solve but I'm just another rookie trying to set up a serendipity blog for the first time.

My problem:
I've installed serendipity on my virtual machine (Linux, Ubuntu). I've also installed Mysql, Php5 and Apache and created an empty database (called serendipity). When I'm now trying to open http://localhost/serendipity/ in my browser i get this error:

serendipity error: unable to connect to database - exiting.

After searching via Google i just found an entry that you should edit the database.inc.php file. But that doesn't help. I also tried to edit the /usr/sbin/dbconfig-generate-include file with the same result > nothing changes.

It would be a great to me to have your support.
thank you

Manuel
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: serendipity error: unable to connect to database - exiti

Post by Timbalu »

first you should find out you have a working configuration by testing the mysql connect in your doc root with http://localhost/testmysql.php

Code: Select all

<?php
mysql_connect("localhost", "root", "password") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("your-database") or die(mysql_error());
echo "Connected to Database";
?>
Which database.inc.php file you are talking about? Serendipity does not need that to be configured by a user. You will find the Database connect data in your serendipity_config_local.inc.php file, if everything is working.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
manuelr
Regular
Posts: 5
Joined: Fri Sep 30, 2011 8:54 am

Re: serendipity error: unable to connect to database - exiti

Post by manuelr »

First thank you for answering that fast.

I just got it to work.

I don't know why but the version of serendipity i downloaded with the ubuntu software manager didn't work. (don't get me wrong. i'm sure that the mistake was mine :) ) I downloaded it and then it was installed automatically. After that i wanted to open it in my browser as described and got the database connecting error.
Well..
I removed the complete package and downloaded the .zip file from the s9y website. Then i just installed it and it works without any problems.

Thank you for your help !

Manuel
Post Reply