Page 1 of 1

SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost' [SOLVED]

Posted: Sat May 27, 2023 2:53 pm
by michaelbr
My PC crashed yesterday, installed before crash ZM 1.36.X without problem, but this time got an error when trying to restart mysql service

Code: Select all

sudo service mysql restart
(with error "mysql: unrecognized service"), after changing

Code: Select all

/etc/mysql/mariadb.conf.d/50-server.cnf
file, could connect to mariadb using

Code: Select all

mysql -uroot -p
, mysql is not in init.d, but mariadb is, so instead restarted mariadb using

Code: Select all

sudo service mariadb restart
. Then installed ZM using

Code: Select all

zm-install
script, when tried to run ZM, got the following error:

Code: Select all

Unable to connect to ZM db using dsn mysql:host=localhost;dbname=zm;charset=utf8
SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost'
What I'm doing wrong? Is it because of the mysql service can't restart or some other reason? How can I solve this problem?
OS: MX Linux 21.3 (Debian 11 based)

Re: SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost'

Posted: Sat May 27, 2023 3:52 pm
by Magic919
Sounds like DB is running. Cannot auth as ZM user/pass.

Re: SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost'

Posted: Sun May 28, 2023 1:30 pm
by michaelbr
Magic919 wrote: Sat May 27, 2023 3:52 pm Sounds like DB is running. Cannot auth as ZM user/pass.
That's the problem, I can't find the db named zm and user named zmuser, does ZM requires both MySQL AND MariaDB to work, or either one of them is enough? If zm and zmuser is in MySQL, what MariaDB is doing there? Can I install MySQL before installing ZM? will ZM wipe out MySQL installation?

Re: SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost'

Posted: Sun May 28, 2023 3:14 pm
by Magic919
You can use EITHER MySQL or MariaDB. I use MariaDB with ZM. It’s thought to perform a bit better. Some of the MySQL commands work with MariaDB as they are very similar. It’s basically a drop in replacement.

Re: SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost'

Posted: Sun May 28, 2023 3:30 pm
by michaelbr
Magic919 wrote: Sun May 28, 2023 3:14 pm You can use EITHER MySQL or MariaDB. I use MariaDB with ZM. It’s thought to perform a bit better. Some of the MySQL commands work with MariaDB as they are very similar. It’s basically a drop in replacement.
Thanks for your reply, it seems that I need to create zmuser & zm DB manually, for zmuser, do I need password for this user when creating? If so where in ZM I have to write this password (which configuration file so that ZM can connect it to zm DB?)

Re: SQLSTATE[HY000] [1698] Access denied for user 'zmuser'@'localhost' [SOLVED]

Posted: Mon May 29, 2023 8:44 am
by michaelbr
Followed this post and it solved my problem to install ZM on MX Linux.