csx 发表于 2024-6-13 17:49

安装linux下mysql

初始化:
      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

页: [1]
查看完整版本: 安装linux下mysql