Hi. I’ve setup a nginx server with PHP-FPM and MariaDB 10.4. The install is failing when it attempts to create the admin user on the database server.
Per the manual I used the root user to connect to the mariadb server (Expecting that it would create the database and nextcloud admin user). When that failed I did some looking and noticed that there appears to have been a change in the way mariadb authentication works since the last time I did this so using the root user on the database server I created a local database admin user:
CREATE USER ‘admin’@‘localhost’ IDENTIFIED BY ‘AdminPassword’;
GRANT ALL PRIVILEGES ON . TO ‘admin’@‘localhost’ WITH GRANT OPTION;
then attempted the setup again with the new admin user. I received the same error. Using both the admin and root users (on the server in the terminal) I checked and saw that the database was created which means the installer was able to connect to the server however the oc_admin user wasn’t created.
I thought maybe there was a permission issue with the admin account so (again from the terminal, logged in as the database admin user) I tried to make a ‘testuser’:
CREATE USER ‘admin’@‘localhost’ IDENTIFIED BY ‘TestPassword’;
this worked fine, so it there doesn’t appear to be anything wrong with the database server.
At this point I’m out of ideas. I’m using PHP 7.3 on FreeBSD with nginx 1.16.1 and nextcloud tar version 17.0.2
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER nextcloud@localhost identified by 'nextcloud';
GRANT ALL PRIVILEGES on nextcloud.* to nextcloud@localhost;
I had a look at the MySQL.php code which does the user creating. I don’t know enough object oriented PHP but was able to see that it only attempts to create users if there isn’t a user identified in config.php. So I created the user as described in the above posts and created a config.php (in the config directory) with minimal configuration information. Just the database setting and user/password settings. Then after failing again (the list of PHP modules in the manual is incomplete) I was able to try yet again and it appears to have installed. I haven’t tried it yet, but hopefully everything is complete.
I was also able to run some PHP (on my own) to create a user in SQL and then use that user information to connect to a database… exactly what I suspect the installer is doing and everything worked great which seems to indicate that there’s nothing wrong with my environment. But I don’t actually know.