安装linux下mysql

查看 38|回复 1
作者:NoMoonWard   
初始化:
        mysqld --initialize --console
设置权限:
        chown -R mysql:mysql /var/lib/mysql
启动服务:
        systemctl start mysqld
查看临时密码:
        cat /var/log/mysqld.log |grep localhost
更改Mysql登录密码:
         alter user 'root'@'localhost' identified by '123456';
查询在哪:
        whereis mysql
安装步骤:
        
rpm -ivh mysql-community-common-8.0.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.28-1.el7.x86_64.rpm
检查是否 有:
rpm -qa|grep mariadb
有:rpm -e --nodeps mariadb-libs

密码, 初始化

到底爱不爱我不   
等你想卸载时你就头大,还不如docker方便
您需要登录后才可以回帖 登录 | 立即注册

返回顶部