Local installation of 13.0.1-4 via DoliDeb on Kubuntu 20.04

Hello *

The Dolibarr Wiki says DoliDeb “is recommended for [ubuntu] user with little computer knowledge” - that’s me. I downloaded the .deb package and ran from my desktop it via double click (qapt). I opened “http://localhost/dolibarr/” in Firefox and followed the link to finish the installation process. On the second page I chose the language and got this summary on the third page.

Most values were prepared on page 4 - I just had to enter the database owner password. Then the fifth page presented this error:
“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.”

I tried the suggested service command and restarted the installation wizard without success. Also a restart of the machine had no positive effect. The error appears for various and no passwords (chapters ‘Dolibarr Database’ and ‘Database server - Superuser access’). Unfortunately the hints “parameters must be wrong” and “check/correct the parameters” are specific enough for me. What do I have to do to get Dolibarr running?

Best regards,
Tomm

PS: Sorry - I was only allowed to add one picture.

look for php.ini in apache folder and remove the semi colon from extension=intl then save it…you can try this…it worked for me…

Thanks for your swift reply. I uncommented the line “extension=intl” and save the file but it did not help. There still is the red exclamation mark sign (intl functions) on page 3 and the error (missing database connection) on page 5.

Then you need to restart apache or reboot the server

But intl is only a warning.

You need to solve your database issue first.
For that, the first thing is to create a Dolibarr user for your MYSQL : How To Create a New MySQL User and Grant Privileges

Okay, I followed the instructions of the linked tutorial. It lead me to two problems:

  1. “Prerequisites: Access to the MySQL root user credentials”
    Where would I have set the MySQL password? These fields on page 4 of the wizard?


    I have never used MySQL prior to the DoliDeb installation.

  2. I ran the command “sudo mysql -u root -p” in the terminal and entered my sudo password. Afterwards I got another promp “Enter password:”. I assume it is for the MySQL password mentioned above. Whatever I type in I get the message
    “ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”.

What did I do wrong?

try the following to see how you are set up to authenticate:

sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;

then you will get an output like this:

Output+------------------+-------------------------------------------+-----------------------+-----------+
| user             | authentication_string                     | plugin                | host      |
+------------------+-------------------------------------------+-----------------------+-----------+
| root             |                                           | auth_socket           | localhost |
| mysql.session    | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| debian-sys-maint | *CC744277A401A7D25BE1CA89AFF17BF607F876FF | mysql_native_password | localhost |
+------------------+-------------------------------------------+-----------------------+-----------+
4 rows in set (0.00 sec)

If the root account shows up to use the auth_socket instead of mysql_native_password you have to change it.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Change the above PASSWORD to something more sensible. After that you are good to go.

Thanks. I ran the command “sudo mysql” in the terminal, entered my sudo password and got the following line again:
“ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”
I am afraid I do not get to the point to put in the SELECT command. :frowning:

Hi,

Could you try this. :

sudo apt-get install mysql-server

So you suggest that the MySQL server is not installed correctly? I thought DoliDeb checks these dependencies.

Anyway … after running the install command and entering the sudo password I got this response:

  • Some packets could not be installed. […]
  • The following packets have unfulfilled dependencies: mysql-server : depends on: but mysql-server-8.0 is not supposed to be installed
  • E: Problems can not be corrected, you have got withhold damaged packets.

So I tried
sudo apt-get install mysql-server-8.0
and got a similar response:

  • Some packets could not be installed. […]
  • The following packets have unfulfilled dependencies: mysql-server-8.0 : depends on: but mysql-server-8.0 (>= 8.0.23-0ubuntu0.20.04.1) is not supposed to be installed
  • E: Problems can not be corrected, you have got withhold damaged packets.

Sorry, I do not understand.

Mysql-server is not installed…

Try sudo aptitude install mysql-server

I ran the command, entered the sudo password and got this response:
sudo: aptitude: command not found

sudo apt install aptitude

sudo  aptitude install mysql-server

First I installed aptitude. Then I ran the command to install mysql-server via aptitude. It followed a long list of packet related text.
Summary: Twelve new packets are going to be installed. Some packets have unfulfilled dependencies. Some mySQL packets collide with some mariadb packets and vice versa. Some packets are damaged. Three mariadb packets should be uninstalled. Accept this solution? I agreed.
Twelve new packets are going to be installed and nine are going to be uninstalled. I agreed.

Back to @erikvanberkum’s suggestion from March, 12th: I ran
sudo mysql
and got a mysql propt
Welcome to the MySQL monitor. Commands end with ; or \g.
[...]
mysql>

So that looks much better now. I ran the suggested SELECT command and got this output:

What is next?

Just execute that :

Should be OK after to start Dolibarr installation

@ksar not sure if that works in his environment: he runs mysql 8 which uses caching_sha2_password instead of mysql_native_password.

Didn’t have time to check if mysql_native_password is still supported in MySQL 8 or if there are any changes/issues.

Thanks to both of you for your help so far.
Is there anything I can do to eliminate the uncertainty regarding the setting of the password? I just want to do it right.

It is still supported

Okay, I ran
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '***';
and got a positive feedback
Query OK, 0 rows affected (0.01 sec)

I opened http://localhost/dolibarr/ in Firefox and followed the link to finish the installation process.
Page 3: Still the red sign with the exclamation mark (intl functions).
Page 4: Entered database password and superuser password.
Page 5: New error messages.


(I also got a green tick on “Creation of database (user root): dolibarrdebian”. It is not on the screenshot because I took it the second time I came to page 5.)

So basically this screen gives five possible generic reasons for failure. :frowning: How can I find out what is wrong in my case?

During the last days I searched the internet on how to handle the error “Creation user : dolibarrdebian” shown in the screenshot above. I did not change anything yet but got two new problems:

  1. When I run sudo mysql and enter my sudo passwort I get the message:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  2. When I open http://localhost/dolibarr/ in Firefox I get the following message.
    Who can help?

DolibarrHasDetectedError.
InformationToHelpDiagnose:
Date: 20210323235015
Dolibarr: 13.0.1 - https://www.dolibarr.org
PHP: 7.4.3
Server: Apache/2.4.41 (Ubuntu)
OS: Linux tom-desktop 5.4.0-67-generic #75-Ubuntu SMP Fri Feb 19 18:03:38 UTC 2021 x86_64
UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

RequestedUrl: /dolibarr/
Referer:
MenuManager:

DatabaseTypeManager: mysqli
RequestLastAccessInError: ErrorNoRequestInError
ReturnCodeLastAccessInError: ErrorNoRequestInError
InformationLastAccessInError: ErrorNoRequestInError

Message: host=localhost, port=3306, user=dolibarrdebian, databasename=dolibarrdebian, Access denied for user ‘dolibarrdebian’@‘localhost’ (using password: YES)