MySql

mysql ERROR 1045 (28000): Acces

2023-01-02  本文已影响0人  Rinaloving

1. 问题

2. 解决

root@Verde-SICC-DB002:~# cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
skip-grant-tables
root@Verde-SICC-DB002:~# 
sudo systemctl restart mysqld
set password for 'root'@'%'=password('jidianke#!_%0103');

如果报:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement


修改密码.png
 flush privileges;
set password for 'root'@'%'=password('jidianke#!_%0103');
 flush privileges;
sudo systemctl restart mysql
重启mysql.png
上一篇下一篇

猜你喜欢

热点阅读