Dollibarr Installation on hosted server

Hi,

I am trying to install Dollibarr on my hosting server with Dreamhost.

Followed the instructions from: Dolibarr ERP - CRM - Browse Files at SourceForge.net

Here is what I get when I go to the page: erp.indigobangladesh.com/install

Prerequisites check

![Ok] PHP Version 7.4.20 ([More information]
![Ok]This PHP supports variables POST and GET.
![Ok]This PHP supports sessions.
![Ok]This PHP supports GD functions.
![Ok]This PHP supports Curl functions.
![Ok]This PHP supports Calendar functions.
![Ok]This PHP supports UTF8 functions.
![Ok]This PHP supports Intl functions.
![Ok]This PHP supports ZIP functions.
![Ok]Your PHP max session memory is set to 256M . This should be enough.
![Ok]Configuration file htdocs/conf/conf.php exists.
![Ok]Configuration file htdocs/conf/conf.php is writable.

On the next page: choose the option for “create Data Base” and superuser.

Then here is what I have got. —

"Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with ‘sudo service mysql start’).

The database connection failed: the host or super user parameters must be wrong.

Go back and check/correct the parameters."

How to solve.

Hi,

you need to check and correct the credentials for the database. If you do not have the credentials for a superuser who is allowed to crate a new database and users (depends on the hosting), you probably need to create a database and a database user via the UI of the hosting provider and then enter the respective data in the config screen.

Hi priojik,
See my earlier post:

I am seeing this same exact problem with a fresh new install of Ubuntu 20.04 using the latest deb package at Dolibarr ERP - CRM - Browse /Dolibarr installer for Debian-Ubuntu (DoliDeb)/14.0.5 at SourceForge.net. I have tried this twice with the same results.

I used the instructions given at Dolibarr for Ubuntu or Debian - Dolibarr ERP CRM Wiki, which says, “In a few seconds, after installing this package, you are able to work on Dolibarr, even if you don’t have already a web server or if you don’t know what is Apache/Lighttpd, Mysql or PHP. Everything is installed for you.” So, I assume the database and all are already installed.

As instructed during the “Dolibarr install or upgrade - Configuration file” install step, I enter only a password for the “User account for the Dolibarr database owner”. Then, I get this same database connection failure:

I try the suggestion given, which is “sudo service mysql start”. That’s when I find out there is no MySQL database daemon running. I am a sysadmin, so I also try to connect to the MySQL server with the MySQL client and there is no server socket available:

sudo service mysql start
Failed to start mysql.service: Unit mysql.service not found.
sudo mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Looking at the installation log I don’t see any database packages installed. I see that the mysql-common, libmysqlclient21, mariadb-client, mariadb-client-10.3, mariadb-client-core-10.3, mariadb-common packages are all installed, but no mysql-server nor mariadb-server. Why wouldn’t the database packages be a dependency for Dollibarr? Can someone help? Do I just need to install MySQL before Dollibarr? I’m a new user to the forum, so I can’t post or upload the installation log. Sorry.

I see this in the dolibarr_14.0.5-4_all.deb “control” file. Where do the “Recommends” come in? Should I just manually install those since they didn’t get installed as “Depends”?:

Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5 | libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, php5-cli | php-cli, php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd, php5-zip | php-zip, php-pear, php-mail-mime, xdg-utils, mariadb-client | virtual-mysql-client, debconf (>= 0.5) | debconf-2.0
Recommends: apache2 | lighttpd | httpd, mariadb-server | virtual-mysql-server, php-xml, php-mbstring, php-intl

I dont know if this helps but…

On my Ubuntu 20.04/Apache vps, I installed the mysql first… then apache for the dolibarr… then upload latest version from github (tags section)… then run dolibarr installer

1 Like

Yes, that helped. I also had some problems getting the installation script to work. I had to create the Dolibarr user and grant it full permissions to the Dolibarr database manually. The install script was having trouble using my root mysql user to do that. Now, I am finally up and running. Thank you.

1 Like