Error Installation Pi 1 : error 1698 (28000)

Forum for questions and support relating to the 1.30.x releases only.
Locked
Michael.e
Posts: 2
Joined: Mon Jan 07, 2019 8:16 am

Error Installation Pi 1 : error 1698 (28000)

Post 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
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

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

Post 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.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

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

Post 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.
Michael.e
Posts: 2
Joined: Mon Jan 07, 2019 8:16 am

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

Post 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
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

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

Post 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.
Locked