Page 1 of 1

Error Installation Pi 1 : error 1698 (28000)

Posted: Mon Jan 07, 2019 8:28 am
by Michael.e
Hello,
I am sorry for my English, I am French.

I'm trying to install ZM on a Pi 1 and I'm having a problem.
- The installation of raspbian is well installed.
- I followed the installation of ZM on this page https://wiki.zoneminder.com/Raspbian

I am then:

Code: Select all

nano .my.cnf

Code: Select all

[customer]
user = root
password = (mysqlpass)
And when I want to create the base

Code: Select all

mysql </usr/share/zoneminder/db/zm_create.sql
I have an error message

Code: Select all

error 1698 (28000): denied access denied for user 'root' @ 'localhost'
I think he can not find my mysql password?
I put in (mysqlpass) my session password "Pi"

Do you have an idea ?
Thank you in advance for your help.
Michael

Re: Error Installation Pi 1 : error 1698 (28000)

Posted: Mon Jan 07, 2019 6:56 pm
by snake
Sounds like mysql doesn't like the password. You can enter the password in on the command line and omit the .my.cnf if you aren't worried particularly about security. I'm not sure why that guide used the .my.cnf file for the password. Seems overkill for the home user. I don't have an RPI1 though, so I'm unable to test the install guide.

Re: Error Installation Pi 1 : error 1698 (28000)

Posted: Mon Jan 07, 2019 8:08 pm
by bbunge
Use these commands to install the database:

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

You will be prompted for a password which is the password you set in mysql.

Re: Error Installation Pi 1 : error 1698 (28000)

Posted: Mon Jan 07, 2019 9:23 pm
by Michael.e
Hello,
Thank you very much to both of you for your answers.

I just tried

Code: Select all

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
and he returns to me

Code: Select all

Enter password:
I enter my session password pi when I connect under putty

Code: Select all

ERROR 1698 (28000): Access denied for user 'root'@'localhost'
@bbunge you tell me to put the password I put in mysql, but at no point in the procedure I'm asked to put a password.
How can I put it because the problem seems to come from there?

Michael

Re: Error Installation Pi 1 : error 1698 (28000)

Posted: Mon Jan 07, 2019 11:27 pm
by snake
Mysql has a different password than what you are typing. Reset the password for mysql by doing

Code: Select all

dpkg-reconfigure mysql-server-#.#
as root. Replace the # with the version of your mysql.