linux安装mysql5.7.22配置文件my.cnf配置细节及修改密码时出现的问题解决
[client]
socket=/usr/local/tools/mysql/mysql.sock
[mysqld]
lower_case_table_names=1
# remove leading # and set to the amount of ram for the most important data
# cache in mysql. start at 70% of total ram for dedicated server, else 10%.
# innodb_buffer_pool_size = 128m
# remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# these are commonly set, remove the # and set as required.
basedir = /usr/local/tools/mysql
datadir = /usr/local/tools/mysql/data
port = xxxx
# server_id = .....
socket = /usr/local/tools/mysql/mysql.sock
# remove leading # to set options mainly useful for reporting servers.
# the server defaults are faster for transactions and fast selects.
# adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128m
# sort_buffer_size = 2m
# read_rnd_buffer_size = 2m
explicit_defaults_for_timestamp=true
sql_mode=no_engine_substitution,strict_trans_tables,no_auto_create_user,no_zero_date,no_zero_in_date,error_for_division_by_zero3
修改密码出问题时,解决办法:
mysql -u root -p v:ahlhqskkd2+>提示(中间重启的一次mysql,可能是重启的原因,正常情况下是可以登录的)
your password has expired. to log in you must change it using a client that supports expired passwords
在*找到了解决方法,连接地址:https://*.com/questions/33387879/mysql-password-expired-cant-connect
解决办法:
[root@localhost bin]# ./mysqladmin -uroot -p password
enter password: //这里输入上面的v
new password: //重新输入新密码
confirm new password: //重新输入新密码
问题解决!