Resteore database MariaDb

I restored the MariaDb database, following a server change. at the end of the restore operation, I got an error message:"Creating Database…
516MiB 0:01:56 [4.44MiB/s] [======================================================================>] 100%
ERROR 1227 (42000) at line 38145: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
*** Scheduler is enabled *** "It seems that the data is restored well anyway … but I have problems with the new records.
Why am I getting this error, which shows up with users: frappe, sudo user and root?

Possibly the DB itself has a restriction.
You can check within mysql using show grants;

You’d normally need to run something like this (the 10.0.%.% is the machine’s subnet - can also be something like 127.0.0.1)…

  mysql -uroot -pMYSQL_PASSWORD -Bse "GRANT ALL PRIVILEGES ON *.* TO 'YOUR_MYSQL_USER'@'10.0.%.%' IDENTIFIED BY 'MYSQL_PASSWORD' WITH GRANT OPTION;"
  mysql -uroot -pMYSQL_PASSWORD -Bse "GRANT ALL PRIVILEGES ON *.* TO 'YOUR_MYSQL_USER'@'127.%.%.%' IDENTIFIED BY 'MYSQL_PASSWORD' WITH GRANT OPTION;"

Hi trentmu, I am still in your debt, I wanted to acknowledge something when you helped me, but you didn’t let me. I’m still looking for someone who can help me even occasionally for a fee. If you are interested let me know. I anticipate that I’m not looking for a super expert, but someone to help me solve problems. Having said that I launched “show grants” from MariaDb with this result:

MariaDB [_1bd3e0294da19198]> SHOW GRANTS;
±--------------------------------------------------------------------------------------------------------------------
| Grants for _1bd3e0294da19198@localhost
±--------------------------------------------------------------------------------------------------------------------
| GRANT USAGE ON . TO ‘_1bd3e0294da19198’@‘localhost’ IDENTIFIED BY PASSWORD '04712FF3BEF2279A4F1A9686824AD825B3ED7
| GRANT ALL PRIVILEGES ON _1bd3e0294da19198.
TO ‘_1bd3e0294da19198’@‘localhost’

Hey Paulo
I am happy to try and help whenever I can.
For the above case, I think your permissions probably adequate, but we’ll need to check the mysql logs to see if there are any other clues there about exactly what permissions are missing

Reset your root password and created user in mysql.

sudo /etc/init.d/mysql stop
sudo -s
mysqld_safe --skip-grant-tables &

kill if process already exist
To kill the MariaDB safe mode process ID manually, we need to run the following command.$

ps aufx | grep mysql | grep -v grep  
ps aux | grep mysql
kill -9
mysqld_safe --skip-grant-tables &
mysql -u root
MariaDB > show databases;
MariaDB> use mysql;
CREATE USER '_1bd3e0294da19198'@'localhost' IDENTIFIED BY 'Password';
update user set authentication_string=PASSWORD("Password") where user='root';
/etc/init.d/mysql stop
sudo /etc/init.d/mysql restart
/etc/init.d/mysql start
1 Like

root@erp-russo:~# /etc/init.d/mysql stop
[ ok ] Stopping mysql (via systemctl): mysql.service.
root@erp-russo:~# sudo /etc/init.d/mysql restart
[…] Restarting mysql (via systemctl): mysql.serviceJob for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.
failed!
root@erp-russo:~#

what does running …

systemctl status mariadb.service

… show you?

They are coming soon, I haven’t forgotten them, but I took a snapshot

journalctl

root@erp-russo:~# journalctl -xe

It’d really help us help you if you would use the code formatting tool.

From what I can see it has now started correctly.

It all seems solved now. I ran a frappe update. The docktypes work fine, I also made a backup … then I restored it. No error.
I sincerely thank all the members.

1 Like

You may want to edit out your ip addresses from your posts…just a heads up.

The “Solution” tag belongs on the suggestions @Suresh_Thakor gave you, not on mine.

Please learn to use the two simple formatting buttons: Block quote ==> Ctrl-Shift-9, Pre-formatted text => Ctrl-Shift-C. Many people in this forum and others just simply ignore improperly formatted help requests

2 Likes

OK thanks.