创建用户 create user canal@'%' IDENTIFIED by 'canal'; GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT,SUPER ON *.* TO 'canal'@'%'; FLUSH PRIVILEGES; 创建数据库 create database xmh; 查看数据库 SHOW DATABASES; 修改数据库密码 ALTER USER USER() IDENTIFIED BY 'Admin2022!'; 安装mysql https://www.mysql.com/ https://downloads.mysql.com/archives/community/ tar -xvf xxx.tar -C xxx su - root sudo su - yum install openssl-devel -y rpm -ivh mysql-community-common rpm -ivh mysql-community-client-plugins-8.0 rpm -ivh mysql-community-libs-8.0 rpm -ivh mysql-community-devel-8.0. rpm -ivh mysql-community-client-8.0 rpm -ivh mysql-community-icu-data-files rpm -ivh mysql-community-server-8.0 rpm 安装 MySQL 会自动生成一个随机密码,可在 /var/log/mysqld.log 这个文件中查找该密码 A temporary password is generated for root@localhost: +NAbTTsRo8iv systemctl start mysqld root root 链接数据库 mysql -u root -p
标签:8.0,rpm,数据库,ivh,community,mysql,root From: https://www.cnblogs.com/xingminghui111/p/16829357.html