0

I have MX Linux 21.3 as my OS, installed phpMyAdmin, but when tried to login, got an error.

tried to install ZoneMinder got an error with DB connection, installed phpMyAdmin to facilitate adding/changing users/privileges, could install phpMyAdmin without problem, but when tried to login, got the following error: (please see the screenshot below), and I followed this post to install phpMyAdmin. ps: I did change the $cfg['blowfish_secret'] = 'mypassword'; in /var/www/html/phpMyAdmin/config.inc.php, what I'm doing wrong?

michaelbr
  • 3
  • 1

2 Answers2

0

Without more context, this is difficult to answer outside of assumptions. Regardless, I hope this helps.

The impression I get from the data you provided makes me infer the problem would just be the root password.

I would point out that the root password and the passphrase under $cfg['blowfish_secret'] are not necessarily the same thing according to the document you shared.

If you are able to login via command-line passwordless.

You can then reset the password yourself

sudo mysqld --skip-grant-tables
mysql -u root mysql
UPDATE user SET Password=PASSWORD('YOUR_ENTRY_HERE') WHERE User='root'; FLUSH PRIVILEGES; exit;
dexhowl
  • 89
  • 5
  • Note updating the `mysql.user` is a very deprecated way of changing a password and [simply won't work](https://stackoverflow.com/questions/64841185/error-1356-hy000-view-mysql-user-references-invalid-tables-or-columns-o/64841540#64841540) in newer MariaDB. [Official docs on password reset](https://mariadb.com/kb/en/troubleshooting-connection-issues/#unable-to-connect-to-a-running-server-lost-root-password). – danblack May 28 '23 at 23:38
0

blowfish_secret is related to the web UI connection, not the database one.

zoneminder doesn't use database users to control access so phpmyadmin not needed.

To reset password of the root account, and CREATE A SEPARATE ZONEMINDER ACCOUNT;

$ sudo -u mysql mariadbd --skip-grant-tables &
$ mariadb
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> SET PASSWORD FOR root@localhost = PASSWORD('i will not forget this');
MariaDB [(none)]> source /usr/share/zoneminder/db/zm_create.sql; 
MariaDB [(none)]> grant lock tables,alter,create,select,insert,update,delete,index on zm.* to zmuser@localhost identified by 'zmpass';
MariaDB [(none)]> SHUTDOWN;

$ sudo systemctl start mariadb.service

Ensure the zm configuration (/etc/zm/zm.conf?) uses these authentication of the zmuser.

from step 7 of zm install.

danblack
  • 12,130
  • 2
  • 22
  • 41
  • thanks for pointing out, I was using a different post to setup ZM and getting errors, using the one you suggested, it worked, I think the main difference is the post you suggested create a db/user and setup mariadb database. Thanks for your suggestion. – michaelbr May 29 '23 at 17:32