1,yum报错:

[root@XXX-XX-X-XXX ~]#  yum remove mysql* -y
Loaded plugins: fastestmirror, refresh-packagekit, security

解决方案:

[root@XXX-XX-X-XXX~]# echo -e "nameserver 8.8.8.8
> nameserver 114.114.114.114" >> /etc/resolv.conf

2,mysql忘记root密码:

[root@XXX-XX-X-XXX~]#vi /etc/my.cnf
在[mysqld]的段中加上一句:skip-grant-tables 保存并且退出。
# /etc/init.d/mysqld restart  ( service mysqld restart )

#mysql

mysql> USE mysql ; 
mysql> UPDATE user SET Password = password ( 'new-password' ) WHERE User = 'root' ; 
mysql> flush privileges ; 
mysql> quit
# vi /etc/my.cnf 将刚才在[mysqld]的段中加上的skip-grant-tables删除,保存并且退出。
# /etc/init.d/mysqld restart   ( service mysqld restart )


3,缺少库文件

[root@XXX-XX-X-XXX~]# unrar e lanxun-cos-python-sdk-master.rar
unrar: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

解决方案:

# yum install libstdc++.so.6

如果出现:

Protected multilib versions: libstdc++-4.4.7-18.el6_9.2.i686 != libstdc++-4.4.7-3.el6.x86_64

那就先执行:# yum install libstdc++-4.4.7-18.el6_9.2.x86_64  再执行:# yum install libstdc++.so.6