I find that mysql always try to auto-upgrade in the booting stage:
sudo journalctl -b -l | grep mysql
Feb 04 13:05:35 mydebian mysqld[713]: 2021-02-04 13:05:35 0 [Note] /usr/sbin/mysqld (mysqld 10.3.27-MariaDB-0+deb10u1) starting as process 713 ...
Feb 04 13:05:35 mydebian mysqld[713]: 2021-02-04 13:05:35 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32184)
Feb 04 13:05:41 mydebian /etc/mysql/debian-start[822]: Upgrading MySQL tables if necessary.
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: Looking for 'mysql' as: /usr/bin/mysql
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: Version check failed. Got the following error when calling the 'mysql' command line client
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[826]: FATAL ERROR: Upgrade failed
Feb 04 13:05:42 mydebian /etc/mysql/debian-start[837]: Checking for insecure root accounts.
I display all action mysql try to take during os booting stage everytime,mysql try to upgrade but failed .It is my turn to solve the issue,which is the best–make or disable mysql auto upgrade in the booting stage?How to help mysql auto-upgrade then?
2
Answers
Having tried the two methods in my pc. It is no use to create a new user.
Issue remains ,booting log is the same as before,maybe the reason is that auto upgrade script executed with root at the booting,it is no related with new created user
showkey
.It is the proper way to make the mysql as the unix root user and be authenticated with
Reboot my pc then check the booting log.
Your best approach is to leave the
root
user for packaging withunix_socket
authentication so it can be secure be able to do updates.If you need root you can run
mysql
as the unix root user and be authenticated. For day-to-day admin, create your own user.ref: Authentication unix socket
Or with a password:
And then give that user grants: