warning: MySQL-server-5.5.62-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: libaio.so.1()(64bit) is needed by MySQL-server-5.5.62-1.el6.x86_64 libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.5.62-1.el6.x86_64 libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.5.62-1.el6.x86_64
rpm -ivh numactl-2.0.9-2.el6.x86_64.rpm --nodeps--force or yum -y install numactl
error while loading shared libraries: libaio.so.1
场景: 在CentOS7.6系统下安装Mysql5.7时,初始化的时候报错:
1
mysqld: error while loading shared libraries: libaio.so.1:cannot open shared object file: No such file or directory
解决: 因为是新的系统,并没有安装所需要的依赖包
1
yum install -y libaio
然后重新初始化即可。
查询mysql数据库的初始化密码:
1 2 3
cat /var/log/mysqld.log | grep 'temporary password' or cat /var/log/mysqld.log
登录mysql
1
mysql -u root –p
修改密码及添加远程访问权限
1 2 3 4 5
mysql> set global validate_password_policy=0; mysql> set global validate_password_length=8; mysql> set password=password('gbnc2012'); (可不做) mysql> grant all privileges on *.* to 'root'@'%' identified by 'gbnc2012' with grant option; mysql> flush privileges;
1 2 3 4 5
mysql> use mysql; mysql> select Host, User from user; mysql> update user set host = '%'where user='root'; mysql> flush privileges; mysql> quit;
设置mysql开机自启
1 2 3 4
chkconfig --level345 mysql on or chkconfig mysqld on chkconfig --list | grep mysql # 查看mysql是否开机自启