添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Sign up to join this community

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I installed with success MariaDB 10.4 in our ubuntu 18.04.

Root user created with success and another local user for controlling only one database.

Although I notice that with command in ssh:

service mysql status
Mar 21 17:49:11 fresco systemd[1]: Started MariaDB 10.4.24 database server.
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10798]: Upgrading MySQL tables if necessary.
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 9 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: Looking for 'mysql' as: /usr/bin/mysql
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10801]: FATAL ERROR: Upgrade failed
Mar 21 17:49:11 fresco /etc/mysql/debian-start[10807]: Checking for insecure root accounts.
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 10 [Warning] Access denied for user 'root'@'localhost' (using password: NO)
Mar 21 17:49:11 fresco mysqld[10757]: 2022-03-21 17:49:11 0 [Note] InnoDB: Buffer pool(s) load completed at 220321 17:49:11

Fresco is a local user also.

Why I get these errors in mysql for root?

It is not making sense as when I login in mysql with root everything seems fine, all permissions are granted.

Any help please because I am confused?

as stated, the user root seems to have on localhost an password set, which is not the default for mariadb on debian/Ubuntu – djdomi Mar 21, 2022 at 17:52