linux 安裝mysql 5.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_ZERO


==========================================================

修改密碼出問題時,解決辦法:

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

 

在stackoverflow找到了解決方法,連接地址:http://stackoverflow.com/questions/33387879/mysql-password-expired-cant-connect

解決辦法:

[root@localhost bin]# ./mysqladmin -uroot -p password
Enter password:   //這裏輸入上面的v
New password:    //重新輸入新密碼
Confirm new password: //重新輸入新密碼

問題解決!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章