MySQL在Linux上的安装教程
他写的挺好的,我就不重复累赘了,补充些我使用这个教程遇到的疑问和答疑
参考该链接我在进行安装的时候我踩到了的坑:
1、不知道初始密码
作者描述如上所述,我运行后得到的结果
密码是localhost后面这个冒号后面的内容,也就是
Ups:(qjcr9q3
2、改密码的时候总提示密码不满足要求
推荐你个满足要求的密码:HumorChen123...
然后你再修改密码校验规则,再改成你想要的密码。
set global validate_password_policy=0;
set global validate_password_length=1;
3、修改配置文件的时候,按照作者的配置文件再启动的时候就报错了,尴尬万分
,于是我重新安装了mysql
经过测试一下可用
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
[client]
port=3306
socket=/var/lib/mysql/mysql.sock
default-character-set=utf8
[mysqld]
#
# 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
#
# 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
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character-set-server=utf8
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
lower_case_table_names=1
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
default-character-set=utf8
本文来自博客园,作者:HumorChen99,转载请注明原文链接:https://www.cnblogs.com/HumorChen/p/18039756