Cant read / write to mysql - DB

Hey Forum,

I cant write / read from the maria db.

For example if I want to change my Birthday in NC - it cant be written in DB

And if I change my organisation in DB its not shown in NC…

What s wrong ?

I just installed NC 31 on a ubuntu server 22.04.

Sorry about my poor english

Ralf

array (
  'instanceid' => 'ocdi4shra5nd',
  'passwordsalt' => '0XFukylJ3hwdX19h8ta9Yxqkh/sIQW',
  'secret' => 'htqzstHiUoG3xUCEPZxamaWm8gzb5gWe8QB+hcQyGAePI3Js',
  'trusted_domains' => 
  array (
    0 => 'so0wung9.spdns.org',
  ),
  'datadirectory' => '/srv/www/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '31.0.0.18',
  'overwrite.cli.url' => 'https://so0wung9.spdns.org/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '******',
  'dbpassword' => '*****',
  'installed' => true,
  'maintenance_window_start' => 3,
  'maintenance' => false,
  'logfile' => '/srv/www/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
);

Much more is stored in MariaDB. E.g. all shares. Can you still create shares? If so, then it is definitely not a database problem, but a problem within Nextcloud.

If you really can still create and use shares, explain what is not working and how you are trying to adapt it.

If i go to my personal settings - and I change my organisation - there comes an info-box “… cant be written” or somthing like that.

if I go to oc_accounts_data and I change ‘organisation’ it s not shown in NC - Personal settings…

do you mean “Tables” with “shares” ?

yours Ralf

Nextcloud can create tables and everything but I cant change anything…
in my Settings… or in Calendar or in contacts.

As written, I would look for the problem in Nextcloud. The MariaDB itself will not be the problem. Do you find error messages in the Nextcloud logs? It may make sense to raise the log level. Logging

If you create e.g. a new share or table there must be a write access in the MariaDB. If this works, it cannot be that there is a problem with MariaDB, for example with contacts.

Check also in Apps for the newest version of all apps.

Thank you … I addet

 'logfile' => '/srv/www/nextcloud/nextcloud.log',
  'log_type' => 'file',
  'loglevel' => 0,

to my config.php…

Lets see…

with level ‘1’ I get:

{"reqId":"kn82G9q53OUUZnzsQ2kv","level":1,"time":"March 03, 2025 14:35:14","remoteAddr":"87.123.0.185","user":"sxk8xp3g2zhh","app":"no app in context","method":"GET","url":"/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Notification was not parsed by any notifier [app: firstrunwizard, subject: apphint-recognize]","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"31.0.0.18","data":[]}

and with level 0

{"reqId":"CCdgn9fUnsOlYI1UUd5R","level":0,"time":"March 03, 2025 14:36:32","remoteAddr":"87.123.0.185","user":"sxk8xp3g2zhh","app":"core","method":"GET"
,"url":"/nextcloud/index.php/settings/user","message":"The loading of lazy AppConfig values have been triggered by app \"core\"","userAgent":"Mozilla/5.
0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"31.0.0.18","exception":{"Exception":"RuntimeException","Message":"The l
oading of lazy AppConfig values have been triggered by app \"core\"","Code":0,"Trace":[{"file":"/srv/www/nextcloud/lib/private/AppConfig.php","line":442
,"function":"loadConfig","class":"OC\\AppConfig","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppConfig.php","line":386,"function":"getTypedValu
e","class":"OC\\AppConfig","type":"->"},{"file":"/srv/www/nextcloud/apps/cloud_federation_api/lib/Capabilities.php","line":77,"function":"getValueBool",
"class":"OC\\AppConfig","type":"->"},{"file":"/srv/www/nextcloud/lib/private/CapabilitiesManager.php","line":61,"function":"getCapabilities","class":"OC
A\\CloudFederationAPI\\Capabilities","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Template/JSConfigHelper.php","line":137,"function":"getCapabil
ities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/srv/www/nextcloud/lib/private/TemplateLayout.php","line":239,"function":"getConfig","cla
ss":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/srv/www/nextcloud/lib/private/legacy/OC_Template.php","line":120,"function":"__construct","cla
ss":"OC\\TemplateLayout","type":"->"},{"file":"/srv/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":189,"function":"fetchPage","
class":"OC_Template","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":159,"function":"render","class":"OCP\
\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/srv/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","clas
s":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\
\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/lib/base.php","line":1018,"function":"match","class":"OC\\Route\\Router","type":"->"},{"fil
e":"/srv/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/srv/www/nextcloud/lib/private/AppConfig.php",
"Line":1208,"message":"The loading of lazy AppConfig values have been triggered by app \"core\"","exception":{},"CustomMessage":"The loading of lazy App
Config values have been triggered by app \"core\""}}

can someone help ???

I work with php8.3

Thanks. The messages do not provide any information. You can therefore change the logging again.

Have you installed any unusual apps? Sometimes it helps to deactivate or uninstall installed apps as a test.

Do you really use Ubuntu 22.04 LTS with PHP8.3?

yes - is there a Problem?

it didn’t work with php8.4 eather…

Probably not. But it is a somewhat unusual constellation.

which one will be better? 8.4 or 8.2 ???

there must be an error on my system! I jutst dropped nextcloud-Database and reinstalled NC vers 31.0.6

the same…

I downloaded it here:

https://download.nextcloud.com/server/releases/ 

and put it in my apache-Folder /srv/www/html (yes “srv”). and it shows the first page (admin - user with password / which DB an connection to DB)…

then it works a time…

when i logged in - nothing changed…

I will keep searching

Thank you

This is the installation wizard look here. Maybe you can compare after installation your settings with config/config.php Also post some errors? What about the logfile data/nextcloud.log again.

Just to rule this out…

Did you create the database user and database exactly as described in the documentation: Example installation on Ubuntu 22.04 LTS — Nextcloud latest Administration Manual latest documentation ?

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost';
FLUSH PRIVILEGES;

Is it possible that you have not granted the nextcloud database user all the privileges needed…?

GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost';

or forgotten to reload the privileges?

FLUSH PRIVILEGES;

What does the following query say?

SHOW GRANTS FOR 'username'@'localhost';

Maybe also check the logs of the mariadb.service

sudo journalctl -u mariadb --no-pager | tail -n 50

…or the error.log and other log files in /var/log/mysql/

in mysql everything is ok:

SHOW GRANTS FOR '*******'@'localhost';
GRANT USAGE ON *.* TO `*******`@`localhost` IDENTIFIED BY PASSWORD ...
GRANT ALL PRIVILEGES ON `nextcloud`.* TO `*******`@`localhost`

BUT: in config.php trusted domains is my Webspace shown…

it might be a confict with sql … Maybe the user needs PRIVILEGES for this side…

AND: I changed (via phpmyAdmin) the date in nextcloud.co_accounts. now it is shown in NC.

may be there is missing something like JSON ? Because nextcloud.co_accounts data is like

{"displayname":{"value":"**** and so on with lots of { and }

I got it !!!

The apache2 - conf: in nextcloud.conf was the mistake!

  <IfModule mod_dav.c>
    Dav on   <-----------------------------------------
  </IfModule>

it has to be OFF :nauseated_face:

now it works fine… Thank you for your help…

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.