centos8降级centos7安装mysql遇到的问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos8降级centos7安装mysql遇到的问题相关的知识,希望对你有一定的参考价值。
参考技术A 0.客户端登陆报错luobiaodeMacBook-Air:~ luobiao$ ssh root@39.101.204.8
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:jN2L7Ebd8ZV03ErBmMpGwHybqNBnLqOX0TTk9TbgzZs.
Please contact your system administrator.
Add correct host key in /Users/luobiao/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/luobiao/.ssh/known_hosts:8
ECDSA host key for 39.101.204.8 has changed and you have requested strict checking.
Host key verification failed.
解决:
这里面,有一句很关键。
ECDSA host key for 39.101.204.8 has changed and you have requested strict checking.
Host key verification failed.
一般这个问题,是你重置过你的服务器后。你再次想访问会出现这个问题。
ssh-keygen -R 39.101.204.8
1.安装mysql报错
mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决:
经过百度说是缺少 libaio.so.1 这个包.这个包是干什么的呢?
我也没查看到?试试先安装这个包。
yum -y install libaio
安装后,解决该问题。
2.[ root @later01 /errlog ]# /etc/init.d/mysqld start
Starting MySQL.2020-04-11T16:49:17.645735Z mysqld_safe error: log-error set to '/errlog/3306/mysql.log', however file don't exists. Create writable for user 'mysql'.
解决: 创建日志文件并赋权
[ root @later01 /errlog/3306 ]# echo "" > mysql.log
[ root @later01 /errlog/3306 ]# chown -R mysql.mysql /errlog/
3.2020-04-11T16:52:12.084460Z 0 [ERROR] InnoDB: The innodb_system data file './ibdata1' is of a different size 768 pages (rounded down to MB) than the 4864 pages specified in the .cnf file!
解决:注释my.cnf 中的
#innodb_data_file_path=ibdata1:76M;ibdata2:100M;ibdata3:100M:autoextend
CentOS 7 安装MySQL 5.6遇到问题及解决方案
centos下安装mysql真的没有想象中那么容易,在这里我总结一下遇到的问题
1. ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
出现这种问题一般是MySQL-server没有安装成功,可以通过yum install MySQL-server-5.6.25-1.el7.x86_64.rpm重新安装
2. Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
执行mysql_install_db –user=mysql
3. rpm安装mysql后/etc/目录下找不到my.cnf
whereis mysql查看mysql安装目录
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
cp /usr/share/mysql/my-default.cnf /etc/my.cnf
4.ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)
# /etc/init.d/mysql stop
# mysqld_safe –user=mysql –skip-grant-tables –skip-Networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(‘newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
5.rpm -ivh安装时包 出现 file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
[[email protected] install-files]# yum remove mysql-libs
6.mysql在linux表明大小写敏感问题
编辑/etc/my.cnf在[mysqld]下插入lower_case_table_names=1 修改完成后重启mysql服务 通过show variables like ‘%case%‘,查看是否修改成功
7.MySQL不能远程连接Host is not allowed to connect to Host ‘10.72.35.8’ is not allowd to connect to this MySQL server
GRANT ALL PRIVILEGES ON . TO ‘root‘@‘%‘WITH GRANT OPTION;
FLUSH PRIVILEGES
8.出现以下错误
[[email protected] jirasetup]# rpm -ivh MySQL-server-advanced-5.6.20-1.rhel5.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:MySQL-server-advanced-5.6.20-1.rh################################# [100%] FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db: Data::Dumper [[email protected] jirasetup]#
此时运行 yum install -y perl perl-devel
以上是关于centos8降级centos7安装mysql遇到的问题的主要内容,如果未能解决你的问题,请参考以下文章