LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2022, 09:41 AM   #1
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Rep: Reputation: Disabled
Mariadb root password


Hi,
using ubuntu 20.04 with mariadb 10.3

i wanted to run automysqlbackup which gave me an access error.

I wanted to give access for the root user to the databases but that gave the same access error.

Then i gave:
GRANT ALL PRIVILEGES ON *.* TO 'root'@localhost IDENTIFIED BY 'root';

After that i cannot login to mysql as root.

I know how to regain access to mariadb as root but my question is what did i do wrong?

Regards,
Jan
 
Old 05-18-2022, 11:16 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Did you use mysql_secure_installation when you first set up the server? If so, you should have had to set a mysql root password which is not the same as the OS passwords so that would mean there would be no reason to give root permission to the database, at least in my limited experience.

Quote:
After that i cannot login to mysql as root.
Mysql root user or the system root user?

What was that original message you refer to that got you into this trouble?
 
Old 05-18-2022, 11:54 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
You neglect to give us the exact text of that "access error."
 
Old 05-18-2022, 11:56 AM   #4
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled
Hi Yancek,

i could log into mysql before this command.

Of course it is not the system root password.

when i started automysqlbackup manually i got:

error 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I need to get automysqlbackup running on the server, i had /etc/default/automysqlbackup.cnf
changed but still got the eror that is why i wanted to grant all privileges to root for all databases.

Regards,
Jan
 
Old 05-18-2022, 02:57 PM   #5
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled
found a link to the solution

Hi ifound this:

https://www.linuxquestions.org/quest...ng-4175602071/

i will do that this night.

Regards,
Jan
 
Old 05-18-2022, 06:17 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
Of course it is not the system root password.
Not of course, you would be surprised at the number of users who post here and other forums who are not aware of that. THere is no way of knowing a members knowledge/experience unless s/he tells us.
 
Old 05-19-2022, 02:37 AM   #7
Janvanl
Member
 
Registered: Apr 2015
Posts: 145

Original Poster
Rep: Reputation: Disabled
Mariadb root password

Hi,

i know, as a longtime linux-user since 1997 i know my way around.

I still have the problem that automysqlbackup tells me that that root cannot access the databases
because root cannot login to Mariadb.

Regards,
Jan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: KDE Participating in Google Summer of Code 2019, MariaDB Releasing New Open-Source MariaDB Enterprise Server, CentOS Celebrates 15th B LXer Syndicated Linux News 0 02-28-2019 06:50 AM
[SOLVED] mysql/mariadb install root password not working j-ray Linux - Software 4 09-19-2018 02:54 PM
OCS Inventory -- Problem after changing mariadb root password... Help me plesase renegateqq Linux - Software 1 05-03-2017 08:31 AM
LXer: How to reset a root password in MariaDB on Linux LXer Syndicated Linux News 0 06-18-2014 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration