Mtl_Biker
Posts: 52
Joined: Tue Jun 04, 2019 9:05 pm
Location: Montreal, Canada

MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 2:00 pm

I'm a beginner to RPi and to MariaDB... and I've done a Google search to try finding a forum where it's discussed and where help might be available. Is there such a place?

I installed MariaDB a couple of weeks ago but haven't had a chance to do anything at all with it, other than confirming at the time that it was installed. I have not changed passwords or anything. Now I'm trying to log in (remotely using RealVNC) and cannot. Today is a holiday here in Canada and I was hoping to spend some time playing with and learning MariaDB and I'm stuck.

I believe my version is 10.1.38-0+deb9u1. If I enter the command

Code: Select all

mysql -u root -p -h localhost
I get

Code: Select all

ERROR 1698 (28000): Access denied for user 'root'@'localhost'
. My understanding is that the initial password is blank, so I only hit <enter> at the password prompt.

Any suggestions?

User avatar
rpdom
Posts: 14985
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 2:20 pm

Try just plain

Code: Select all

sudo mysql
That should default to the local root user. If there is no password set you leave out the "-p" option. The standard install on MariaDB is for root to only have access through the local interface, but once you have done that you can add users with access from other systems if needed.

Andyroo
Posts: 4141
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 2:20 pm

Try

Code: Select all

sudo mysql -u root
and see if that gets you in
Need Pi spray - these things are breeding in my house...

Mtl_Biker
Posts: 52
Joined: Tue Jun 04, 2019 9:05 pm
Location: Montreal, Canada

Re: MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 2:27 pm

rpdom wrote:
Mon Jul 01, 2019 2:20 pm
Try just plain

Code: Select all

sudo mysql
That should default to the local root user. If there is no password set you leave out the "-p" option. The standard install on MariaDB is for root to only have access through the local interface, but once you have done that you can add users with access from other systems if needed.
I'm IN!!!!! Thank you!

I was trying to follow a tutorial on the MariaDB site, and it did not use SUDO which I guess they assumed I would know to use. But I didn't know.

Do you know of any beginners forum for MariaDB?

Thanks again!

Mtl_Biker
Posts: 52
Joined: Tue Jun 04, 2019 9:05 pm
Location: Montreal, Canada

Re: MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 2:29 pm

Andyroo wrote:
Mon Jul 01, 2019 2:20 pm
Try

Code: Select all

sudo mysql -u root
and see if that gets you in
That works too! I was missing the SUDO part! Which I guess the MariaDB start guide assumed I would know about, but didn't.

Any suggestion of a beginners forum for MariaDB somewhere? Or is it alright to post here?

fbe
Posts: 494
Joined: Thu Aug 17, 2017 9:08 pm

Re: MariaDB help forum?? Can't log on initially

Mon Jul 01, 2019 11:07 pm

Avoid tutorials that recommend mysql_secure_installation on Debian/Raspbian Stretch or Buster.
Avoid tutorials that recommend to configure native password authentification for root@localhost on Debian/Raspbian Stretch or Buster without mentioning that a logrotate job will break and how to fix that.

Mtl_Biker
Posts: 52
Joined: Tue Jun 04, 2019 9:05 pm
Location: Montreal, Canada

Re: MariaDB help forum?? Can't log on initially

Tue Jul 02, 2019 1:34 pm

fbe wrote:
Mon Jul 01, 2019 11:07 pm
Avoid tutorials that recommend mysql_secure_installation on Debian/Raspbian Stretch or Buster.
Avoid tutorials that recommend to configure native password authentification for root@localhost on Debian/Raspbian Stretch or Buster without mentioning that a logrotate job will break and how to fix that.
Thank you. But what is "logrotate job"?

Return to “Beginners”