Nextcloud install Problem on TrueNas

I just installed truenes and I tried to install nextcloud plugin and I get this after the install

Plugin installed successfully
Install Notes:
nginx_enable: → YES
mysql_enable: → YES
php_fpm_enable: → YES
Performing sanity check on nginx configuration:
Starting nginx.
Performing sanity check on php-fpm configuration:
Starting php_fpm.
Starting mysql.
Starting mysql.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘JK8CPOK07YDS0gwe’) WHERE User=‘root’’ at line 1
Using NAT Address: 192.168.11.202
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘JK8CPOK07YDS0gwe’) WHERE User=‘root’’ at line 1
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘dbadmin’@‘localhost’ (using password: YES)
Trace: #0 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(69): OC\DB\Exceptions\DbalException::wrap()
#1 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#2 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#3 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#4 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#5 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#6 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#7 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#8 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#10 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#11 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#12 /usr/local/www/nextcloud/occ(11): require_once(’/usr/local/www/…’)
#13 {main}

Previous: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘dbadmin’@‘localhost’ (using password: YES)
Trace: #0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/lib/private/DB/ConnectionAdapter.php(66): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(60): OC\DB\ConnectionAdapter->executeQuery()
#5 /usr/local/www/nextcloud/lib/private/DB/MySqlTools.php(40): OC\DB\MySqlTools->isMariaDBWithLargePrefix()
#6 /usr/local/www/nextcloud/lib/private/Setup/MySQL.php(50): OC\DB\MySqlTools->supports4ByteCharset()
#7 /usr/local/www/nextcloud/lib/private/Setup.php(360): OC\Setup\MySQL->setupDatabase()
#8 /usr/local/www/nextcloud/core/Command/Maintenance/Install.php(108): OC\Setup->install()
#9 /usr/local/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
#10 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/local/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#13 /usr/local/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#14 /usr/local/www/nextcloud/console.php(100): OC\Console\Application->run()
#15 /usr/local/www/nextcloud/occ(11): require_once(’/usr/local/www/…’)
#16 {main}
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘JK8CPOK07YDS0gwe’) WHERE User=‘root’’ at line 1
Nextcloud is not installed - only a limited number of commands are available
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘JK8CPOK07YDS0gwe’) WHERE User=‘root’’ at line 1
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the “config:system” namespace.
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the “config:system” namespace.
Nextcloud is not installed - only a limited number of commands are available
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the “db” namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the “db” namespace.
Stopping php_fpm.

There are no commands defined in the “db” namespace.

There are no commands defined in the “db” namespace.
Waiting for PIDS: 24813.

There are no commands defined in the “db” namespace.
Performing sanity check on php-fpm configuration:

There are no commands defined in the “db” namespace.
Starting php_fpm.

There are no commands defined in the “db” namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the “db” namespace.
Stopping nginx.

There are no commands defined in the “db” namespace.

There are no commands defined in the “db” namespace.

There are no commands defined in the “db” namespace.
Waiting for PIDS: 24802, 24802.

There are no commands defined in the “db” namespace.
Performing sanity check on nginx configuration:

There are no commands defined in the “db” namespace.
Starting nginx.

There are no commands defined in the “db” namespace.
Admin Portal:
http://192.168.11.122

is this right it dose not look right to me

after setting the jails I go to mange and I enter the info it asks but I get this and I can’t pass this step

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘dbadmin’@‘localhost’ (using password: YES)

please help

Been a while since I have used NextCloud, try the TrueNAS forums TrueNAS Community

When chasing these sorts of problems I usually start with the first error and work from there. In this case:

looks like you have a config error in the mysql config file, and given that the text given looks kinda like a password(?) perhaps the line didn’t get formatted correctly or a special character messed up the automatic file generation. Since the rest of the errors all look mysql related, that might be a good jumping off point.

That said, I used to run my OwnCloud server in a freeNAS jail (if that tells you anything about how long ago I did that). After a couple of years I got frustrated that the architecture of jails made it so that I couldn’t get what I felt were critical updates to any of the functional bits (because the jail is very tightly tied to the base freeBSD OS). I finally made the jump to using a VM on freeNAS, running straight-up Ubuntu server. Now I get all the OS and NextCloud (yeah, I made that jump eventually as well) as well as Apache and pHp updates in a timely manner. I will give you that this is a harder sell if you are in a highly RAM-constrained environment, but if you can bring your base system up to 24 or 32 GB of RAM, you should be able to make it work. As an added bonus, I was able to move all of my web hosts to that VM as well, so my website as well as a couple of dev and private sites are hosted off of the same VM with Apache virtual hosts handling all of the plumbing.