mysql rpm方式安装

MySQL RPM安装方式
检测是否安装过mysql
Rpm -qa|grep -i mysql
删除mysql安装包
软件安装
kingtry:~ # rpm -ivh mysql-community-common-5.7.22-1.sles11.x86_64.rpm
kingtry:~ # rpm -ivh mysql-community-libs-5.7.22-1.sles11.x86_64.rpm
kingtry:~ # rpm -ivh mysql-community-client-5.7.22-1.sles11.x86_64.rpm
kingtry:~ # rpm -ivh mysql-community-server-5.7.22-1.sles11.x86_64.rpm
Rpm -ql
修改文件
/etc/my.cnf
生成随机密码
grep ‘temporary password’ /var/log/mysql/mysqld.log
启动mysql服务
Service mysql start
修改用户名密码
mysql -uroot -p
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘Report@123’;
Flush PRIVILEGES;

你可能感兴趣的:(mySql)