centos下安装mysql 8.0
wget https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm rpm -ivh mysql80-community-release-el7-3.noarch.rpm yum install mysql3:如果出现libaio错误:安装:
yum install libaio4:开启mysql
systemctl start mysqld5:修改用户
alter user 'root'@'localhost' identified by 'Aa123456'; flush privileges;6:增加用户
create user 'root001'@'127.0.0.1' identified by 'Aa123456'; grant all privileges on *.* to 'root001'@'127.0.0.1'; flush privileges;7,修改密码认证方式
ALTER USER 'root001'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY '123456'; alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; flush privileges;8,PHP调用mysql显示Server sent charset (255) unknown
$ vim my.cnf [client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] collation-server = utf8_general_ci character-set-server = utf8 default_authentication_plugin = mysql_native_password如何报以下错误: 出现问题: error: Failed dependencies: libnuma.so.1()(64bit) is needed by mysql-community-server-8.0.13-1.el7.x86_64 libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-8.0.13-1.el7.x86_64 libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-8.0.13-1.el7.x86_64 解决办法:
yum install numactl出现问题: error: Failed dependencies: pkgconfig(openssl) is needed by mysql-community-devel-8.0.13-1.el7.x86_64 解决办法:
yum install openssl-devel.x86_64 openssl.x86_64 -y出现问题: error: Failed dependencies: perl(Data::Dumper) is needed by mysql-community-test-8.0.13-1.el7.x86_64 解决办法:
yum -y install autoconf出现问题: error: Failed dependencies: perl(JSON) is needed by mysql-community-test-8.0.13-1.el7.x86_64 解决办法:
yum install perl.x86_64 perl-devel.x86_64 -y yum install perl-JSON.noarch -y