man中文配置
安装中文包
sudo yum install man-pages-zh-CN
查找man位置
sudo find / -name man
其中有/usr/share/man/
将其复制
添加别名 cman
在/etc/bashrc中添加别名cman
文件尾添加字符为:alias cman='man -M /usr/share/man/zh_CN/'
编译.bashrc文件,使别名 cman 生效
安装Mysql57
下载mysql源
sudo wget 'https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm'
安装mysql源
sudo rpm -Uvh mysql57-community-release-el7-11.noarch.rpm
查看mysql版本
安装mysql
yum install -y mysql-community-server
mysql --version
配置启动mysql
登录mysql
查看初始密码sudo grep "password" /var/log/mysqld.log
mysql -u root -p
查看当前密码策略show variables like 'validate_password%';
修改密码策略,修改密码长度,用户修改密码set global validate_password_policy=LOW;
set global validate_password_length=6;
alter user 'root'@'localhost' identified by '123456';
开启远程访问
为远程登录授权grant all privileges on *.* to 'root'@'192.168.73.199' identified by '123456' with grant option;
flush privileges;
开放防火墙mysql端口sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent
设置mysql字符集sudo /etc/my.cnf
systemctl restart mysqld
mysql压缩包安装
https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html
https://www.jb51.net/article/118017.htm
下载压缩包
https://downloads.mysql.com/archives/community/
解压
初始化数据库
创建空的data目录
初始化./mysqld --basedir=/opt/ying/mysq-5.7.32 --datadir=/opt/ying/mysql-5.7.32/data --initialize