Linux - problem solving &

1 MySQL - rpm -ev mysql-libs-5.1.73-8.el6_8.x86_64

problem:

error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
        mysql-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64

The reason: conflicting dependencies
Workaround: Add --nodeps later statement

rpm -ev mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps

Reference article 1 link: https: //blog.csdn.net/qq_34872748/article/details/86517639
reference to article 2 link: https: //www.cnblogs.com/kerrycode/p/4353755.html

2 MySQL - Installation MySQL-client-5.5.47-1.linux2.6.x86_64.rpm

problem:

warning: MySQL-client-5.5.47-1.linux2.6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
        /usr/bin/perl is needed by MySQL-client-5.5.47-1.linux2.6.x86_64

The reason: yum install an older version of GPG keys
Workaround: Add --force --nodeps later statement

rpm -ivh MySQL-client-5.5.47-1.linux2.6.x86_64.rpm --force --nodeps

Reference article link: https: //blog.csdn.net/sunforraining/article/details/79836998

Install MySQL-server-5.5.47-1.linux2.6.x86_64.rpm - 3 MySQL

problem:

/usr/sbin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

The reason: not installed libaio
Solution: Install libaio

yum install -y libaio

Reference article link: https: //blog.csdn.net/eagle89/article/details/78411184

4 RPM using the software package installation


Reference article link: https: //www.cnblogs.com/gmlkl/p/9354254.html

Host '192.168.x.1' is not allowed to connect to this MySQL server issues under virtual machine NAT mode - 5 MySQL

problem:

Host ‘192.168.137.1’ is not allowed to connect to this MySQL server

The reason: more than the middle NAT network address, you need to add the appropriate permissions
solutions:
(1) in the corresponding machine virtual machine, log in mysql

[root@hadoop01 ~]# mysql -u root -p

(2) grant the appropriate permissions

 GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.39.1' IDENTIFIED BY '密码' WITH GRANT OPTION

(3) Refresh privileges

mysql> flush privileges;

Reference article connection: https: //blog.csdn.net/weixin_42350212/article/details/80635634

6 ntpdate -u failed ntp1.aliyun.com update & reboot update failed

Question 1:

[hadoop@hadoop105 ~]$ ntpdate -u ntp1.aliyun.com
-bash: ntpdate: command not found

the reason:

Installation is minimal version of Linux, ntp command requires a separate installation

solution:

yum install -y ntp

Question 2:

Found that the modified time is not effective after reboot

the reason:

Changes is to update the system time, and after the restart, the system time will be updated to the time machine hardware, and therefore need to be modified when modifying the system time synchronized to the time machine's hardware amount of time

Solution:
root @ hadoop02

[root@hadoop02 ~]# ntpdate -u ntp1.aliyun.com
[root@hadoop02 ~]# date
[root@hadoop02 ~]# hwclock --systohc
[root@hadoop02 ~]# hwclock --show

hadoop@hadoop107

[hadoop@hadoop107 ~]$  sudo ntpdate -u ntp1.aliyun.com
[sudo] password for hadoop: 
 8 Sep 10:15:29 ntpdate[1452]: step time server 120.25.115.20 offset -28747.727054 sec
[hadoop@hadoop107 ~]$ date
Sun Sep  8 10:15:32 CST 2019
[hadoop@hadoop107 ~]$ sudo hwclock --systohc
sudo: timestamp too far in the future: Sep  8 18:14:36 2019

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for hadoop: 
[hadoop@hadoop107 ~]$ sudo hwclock --show
Sun 08 Sep 2019 10:15:55 AM CST  -0.954515 seconds
[hadoop@hadoop107 ~]$
Published 544 original articles · won praise 289 · Views 230,000 +

Guess you like

Origin blog.csdn.net/BlessingXRY/article/details/100084205