ppc64le处理器国产power8服务器CentOS7.2安装mariadb数据库——第san部

准备安装

[root@admin sbin]# cd 
[root@admin ~]# cd /
[root@admin /]# ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  usr-5.7.16
boot  etc  lib   media  opt  root  sbin  sys  usr  var
[root@admin /]# 
[root@admin /]# cd /opt/soft
[root@admin soft]# ls
filelist.txt                             MariaDB-10.3.0-rhel7-ppc64le-server.rpm
MariaDB-10.3.0-rhel7-ppc64le-client.rpm  MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
MariaDB-10.3.0-rhel7-ppc64le-common.rpm  MariaDB-10.3.0-rhel7-ppc64le-test.rpm
MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
[root@admin soft]# 
[root@admin soft]# cd /etc/
[root@admin etc]# ls
adjtime                  e2fsck.conf  ld.so.conf                plymouth        shadow-
aliases                  environment  ld.so.conf.d              pm              shells
aliases.db               ethertypes   libaudit.conf             polkit-1        skel
alternatives             exports      libnl                     popt.d          ssh
anacrontab               favicon.png  libuser.conf              postfix         ssl
asound.conf              filesystems  locale.conf               ppp             statetab
audisp                   firewalld    localtime                 prelink.conf.d  statetab.d
audit                    fstab        login.defs                printcap        subgid
bash_completion.d        gcrypt       logrotate.conf            profile         subuid
bashrc                   gnupg        logrotate.d               profile.d       sudo.conf
binfmt.d                 GREP_COLORS  lvm                       protocols       sudoers
centos-release           groff        machine-id                python          sudoers.d
centos-release-upstream  group        magic                     rc0.d           sudo-ldap.conf
chkconfig.d              group-       mailcap                   rc1.d           sysconfig
chrony.conf              grub2.cfg    makedumpfile.conf.sample  rc2.d           sysctl.conf
chrony.keys              grub.d       man_db.conf               rc3.d           sysctl.d
cloud                    gshadow      mime.types                rc4.d           systemd
cron.d                   gshadow-     mke2fs.conf               rc5.d           system-release
cron.daily               gss          modprobe.d                rc6.d           system-release-cpe
cron.deny                host.conf    modules-load.d            rc.d            terminfo
cron.hourly              hostname     motd                      rc.local        tmpfiles.d
cron.monthly             hosts        mtab                      redhat-release  tuned
crontab                  hosts.allow  my.cnf                    resolv.conf     udev
cron.weekly              hosts.deny   my.cnf.d                  rpc             vconsole.conf
crypttab                 init.d       NetworkManager            rpm             virc
csh.cshrc                inittab      networks                  rsyslog.conf    wgetrc
csh.login                inputrc      nsswitch.conf             rsyslog.d       wpa_supplicant
dbus-1                   iproute2     nsswitch.conf.bak         rwtab           X11
default                  issue        openldap                  rwtab.d         xdg
depmod.d                 issue.net    opt                       sasl2           xinetd.d
dhcp                     jexecval     os-release                securetty       yum
DIR_COLORS               kdump.conf   pam.d                     security        yum.conf
DIR_COLORS.256color      kernel       passwd                    selinux         yum.repos.d
DIR_COLORS.lightbgcolor  krb5.conf    passwd-                   services
dracut.conf              krb5.conf.d  pkcs11                    sestatus.conf
dracut.conf.d            ld.so.cache  pki                       shadow
[root@admin etc]# ll
total 1092
-rw-r--r--.  1 root root       16 Oct 24 10:57 adjtime
-rw-r--r--.  1 root root     1518 Jun  7  2013 aliases
-rw-r--r--.  1 root root    49152 Oct 24 11:02 aliases.db
drwxr-xr-x.  2 root root      229 Oct 24 10:54 alternatives
-rw-------.  1 root root      541 Aug  9 07:45 anacrontab
-rw-r--r--.  1 root root       55 Aug  6 21:44 asound.conf
drwxr-x---.  3 root root       43 Oct 24 10:54 audisp
drwxr-x---.  3 root root       83 Oct 24 11:02 audit
drwxr-xr-x.  2 root root       40 Oct 24 11:12 bash_completion.d
-rw-r--r--.  1 root root     2853 Oct 31  2018 bashrc
drwxr-xr-x.  2 root root        6 Aug  8 21:17 binfmt.d
-rw-r--r--.  1 root root       40 Sep  5 21:11 centos-release
-rw-r--r--.  1 root root       51 Sep  5 21:11 centos-release-upstream
drwxr-xr-x.  2 root root        6 Aug  5  2017 chkconfig.d
-rw-r--r--.  1 root root     1108 Aug 12 22:54 chrony.conf
-rw-r-----.  1 root chrony    481 Aug 12 22:54 chrony.keys
drwxr-xr-x.  4 root root       59 Oct 24 11:16 cloud
drwxr-xr-x.  2 root root       21 Oct 24 10:54 cron.d
drwxr-xr-x.  2 root root       42 Oct 24 10:54 cron.daily
-rw-------.  1 root root        0 Aug  9 07:45 cron.deny
drwxr-xr-x.  2 root root       22 Jun 10  2014 cron.hourly
drwxr-xr-x.  2 root root        6 Jun 10  2014 cron.monthly
-rw-r--r--.  1 root root      451 Jun 10  2014 crontab
drwxr-xr-x.  2 root root        6 Jun 10  2014 cron.weekly
-rw-------.  1 root root        0 Oct 24 10:52 crypttab
-rw-r--r--.  1 root root     1620 Oct 31  2018 csh.cshrc
-rw-r--r--.  1 root root      866 Oct 31  2018 csh.login
drwxr-xr-x.  4 root root       78 Oct 24 10:53 dbus-1
drwxr-xr-x.  2 root root       44 Oct 24 11:21 default
drwxr-xr-x.  2 root root       23 Oct 24 10:53 depmod.d
drwxr-x---.  4 root root       53 Oct 24 10:54 dhcp
-rw-r--r--.  1 root root     5090 Aug  6 21:44 DIR_COLORS
-rw-r--r--.  1 root root     5725 Aug  6 21:44 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 Aug  6 21:44 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root     1285 Aug  9 08:25 dracut.conf
drwxr-xr-x.  2 root root        6 Aug  9 08:25 dracut.conf.d
-rw-r--r--.  1 root root      112 Aug  6 21:44 e2fsck.conf
-rw-r--r--.  1 root root        0 Oct 31  2018 environment
-rw-r--r--.  1 root root     1317 Apr 11  2018 ethertypes
-rw-r--r--.  1 root root        0 Jun  7  2013 exports
lrwxrwxrwx.  1 root root       56 Oct 24 10:53 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 Oct 31  2018 filesystems
drwxr-x---.  7 root root      133 Oct 24 10:54 firewalld
-rw-r--r--.  1 root root      465 Oct 24 10:52 fstab
drwxr-xr-x.  2 root root        6 Aug  5  2017 gcrypt
drwxr-xr-x.  2 root root        6 Jul 13  2018 gnupg
-rw-r--r--.  1 root root       94 Aug  2  2017 GREP_COLORS
drwxr-xr-x.  4 root root       40 Oct 24 10:52 groff
-rw-r--r--.  1 root root      503 Nov 22 11:50 group
-rw-r--r--.  1 root root      489 Oct 24 11:12 group-
lrwxrwxrwx.  1 root root       22 Oct 24 10:54 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 Oct 24 10:55 grub.d
----------.  1 root root      400 Nov 22 11:50 gshadow
----------.  1 root root      390 Oct 24 11:12 gshadow-
drwxr-xr-x.  3 root root       20 Sep 14 02:39 gss
-rw-r--r--.  1 root root        9 Jun  7  2013 host.conf
-rw-r--r--.  1 root root       32 Nov 21 15:52 hostname
-rw-r--r--.  1 root root      158 Jun  7  2013 hosts
-rw-r--r--.  1 root root      370 Jun  7  2013 hosts.allow
-rw-r--r--.  1 root root      460 Jun  7  2013 hosts.deny
lrwxrwxrwx.  1 root root       11 Oct 24 10:52 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 Aug  9 11:25 inittab
-rw-r--r--.  1 root root      942 Jun  7  2013 inputrc
drwxr-xr-x.  2 root root      159 Oct 24 10:52 iproute2
-rw-r--r--.  1 root root       23 Sep  5 21:11 issue
-rw-r--r--.  1 root root       22 Sep  5 21:11 issue.net
-rw-rw-r--.  1 root root       35 Nov 22 10:00 jexecval
-rw-r--r--.  1 root root     7274 Oct 24 10:54 kdump.conf
drwxr-xr-x.  3 root root       24 Oct 24 10:54 kernel
-rw-r--r--.  1 root root      641 Sep 14 00:40 krb5.conf
drwxr-xr-x.  2 root root        6 Sep 14 02:39 krb5.conf.d
-rw-r--r--.  1 root root    22988 Nov 22 21:43 ld.so.cache
-rw-r--r--.  1 root root       28 Feb 28  2013 ld.so.conf
drwxr-xr-x.  2 root root      109 Oct 24 10:54 ld.so.conf.d
-rw-r-----.  1 root root      191 Mar  2  2019 libaudit.conf
drwxr-xr-x.  2 root root       35 Oct 24 10:52 libnl
-rw-r--r--.  1 root root     2391 Oct 13  2013 libuser.conf
-rw-r--r--.  1 root root       17 Nov 21 15:52 locale.conf
lrwxrwxrwx.  1 root root       35 Oct 24 10:57 localtime -> ../usr/share/zoneinfo/Asia/Shanghai
-rw-r--r--.  1 root root     2027 Aug  6 21:44 login.defs
-rw-r--r--.  1 root root      662 Jul 31  2013 logrotate.conf
drwxr-xr-x.  2 root root       82 Oct 24 10:54 logrotate.d
drwxr-xr-x.  6 root root      100 Oct 24 10:54 lvm
-r--r--r--.  1 root root       33 Nov 21 15:52 machine-id
-rw-r--r--.  1 root root      111 Oct 31  2018 magic
-rw-rw-r--.  1 root root       91 Nov 22 10:00 mailcap
-rw-r--r--.  1 root root     5122 Aug  8 20:06 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 Oct 31  2018 man_db.conf
-rw-rw-r--.  1 root root      230 Nov 22 10:00 mime.types
-rw-r--r--.  1 root root      936 Aug  9 08:20 mke2fs.conf
drwxr-xr-x.  2 root root       81 Oct 24 10:54 modprobe.d
drwxr-xr-x.  2 root root        6 Aug  8 21:17 modules-load.d
-rw-r--r--.  1 root root        0 Jun  7  2013 motd
lrwxrwxrwx.  1 root root       17 Oct 24 10:52 mtab -> /proc/self/mounts
-rw-r--r--.  1 root root     1036 Nov 23 21:30 my.cnf
drwxr-xr-x.  2 root root       31 Oct 24 10:53 my.cnf.d
drwxr-xr-x.  7 root root      134 Aug  9 08:05 NetworkManager
-rw-r--r--.  1 root root       58 Aug  9 11:25 networks
-rw-r--r--.  1 root root     1949 Oct 24 10:53 nsswitch.conf
-rw-r--r--.  1 root root     1938 Aug  7 07:02 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 Oct 24 10:53 openldap
drwxr-xr-x.  2 root root        6 Apr 11  2018 opt
-rw-r--r--.  1 root root      406 Sep  5 21:11 os-release
drwxr-xr-x.  2 root root     4096 Oct 24 10:57 pam.d
-rw-r--r--.  1 root root      935 Nov 22 11:50 passwd
-rw-r--r--.  1 root root      895 Oct 24 10:58 passwd-
drwxr-xr-x.  3 root root       21 Oct 24 10:52 pkcs11
drwxr-xr-x. 10 root root      116 Oct 24 10:54 pki
drwxr-xr-x.  2 root root       28 Oct 24 10:54 plymouth
drwxr-xr-x.  5 root root       52 Oct 24 10:52 pm
drwxr-xr-x.  5 root root       72 Oct 24 10:53 polkit-1
drwxr-xr-x.  2 root root        6 Oct 10  2015 popt.d
drwxr-xr-x.  2 root root      154 Oct 24 10:54 postfix
drwxr-xr-x.  3 root root      123 Oct 24 10:53 ppp
drwxr-xr-x.  2 root root       78 Oct 24 10:53 prelink.conf.d
-rw-r--r--.  1 root root      233 Jun  7  2013 printcap
-rw-r--r--.  1 root root     2119 Nov 22 10:12 profile
drwxr-xr-x.  2 root root      251 Oct 24 10:53 profile.d
-rw-r--r--.  1 root root     6545 Oct 31  2018 protocols
drwxr-xr-x.  2 root root       35 Oct 24 10:53 python
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 Oct 24 10:53 rc.d
lrwxrwxrwx.  1 root root       13 Oct 24 10:53 rc.local -> rc.d/rc.local
lrwxrwxrwx.  1 root root       14 Oct 24 10:52 redhat-release -> centos-release
-rw-r--r--.  1 root root      120 Nov 21 15:52 resolv.conf
-rw-r--r--.  1 root root     1634 Dec 25  2012 rpc
drwxr-xr-x.  2 root root       64 Nov 22 21:13 rpm
-rw-r--r--.  1 root root     3232 Aug  6 21:44 rsyslog.conf
drwxr-xr-x.  2 root root       50 Oct 24 11:12 rsyslog.d
-rw-r--r--.  1 root root      966 Aug  9 11:25 rwtab
drwxr-xr-x.  2 root root       23 Aug  9 11:25 rwtab.d
drwxr-xr-x.  2 root root       24 Oct 24 10:54 sasl2
-rw-------.  1 root root      221 Oct 31  2018 securetty
drwxr-xr-x.  6 root root     4096 Oct 24 10:53 security
drwxr-xr-x.  5 root root       81 Oct 24 10:54 selinux
-rw-r--r--.  1 root root   670293 Jun  7  2013 services
-rw-r--r--.  1 root root      216 Aug  9 17:40 sestatus.conf
----------.  1 root root      731 Nov 22 11:50 shadow
----------.  1 root root      710 Nov 21 15:52 shadow-
-rw-r--r--.  1 root root       44 Oct 31  2018 shells
drwxr-xr-x.  2 root root       62 Oct 24 10:52 skel
drwxr-xr-x.  2 root root      225 Nov 21 15:52 ssh
drwxr-xr-x.  2 root root       19 Oct 24 10:53 ssl
-rw-r--r--.  1 root root      212 Aug  9 11:25 statetab
drwxr-xr-x.  2 root root        6 Aug  9 11:25 statetab.d
-rw-r--r--.  1 root root        0 Oct 31  2018 subgid
-rw-r--r--.  1 root root        0 Oct 31  2018 subuid
-rw-r-----.  1 root root     1786 Aug  6 21:44 sudo.conf
-rw-r-----.  1 root root     4328 Aug  6 21:44 sudoers
drwxr-x---.  2 root root       33 Nov 21 15:52 sudoers.d
-rw-r-----.  1 root root     3181 Aug  6 21:44 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 Oct 24 10:58 sysconfig
-rw-r--r--.  1 root root      449 Aug  9 11:25 sysctl.conf
drwxr-xr-x.  2 root root       28 Oct 24 10:53 sysctl.d
drwxr-xr-x.  4 root root      151 Oct 24 10:53 systemd
lrwxrwxrwx.  1 root root       14 Oct 24 10:52 system-release -> centos-release
-rw-r--r--.  1 root root       30 Sep  5 21:11 system-release-cpe
drwxr-xr-x.  2 root root        6 Sep  7  2017 terminfo
drwxr-xr-x.  2 root root        6 Aug  8 21:17 tmpfiles.d
drwxr-xr-x.  3 root root      109 Oct 24 10:54 tuned
drwxr-xr-x.  3 root root       54 Oct 24 11:02 udev
-rw-r--r--.  1 root root       37 Oct 24 10:57 vconsole.conf
-rw-r--r--.  1 root root     1982 Aug  9 22:07 virc
-rw-r--r--.  1 root root     4479 May 16  2019 wgetrc
drwxr-xr-x.  2 root root       33 Oct 24 10:54 wpa_supplicant
drwxr-xr-x.  5 root root       57 Oct 24 10:53 X11
drwxr-xr-x.  4 root root       38 Oct 24 10:53 xdg
drwxr-xr-x.  2 root root        6 Apr 11  2018 xinetd.d
drwxr-xr-x.  6 root root      100 Oct 24 10:53 yum
-rw-r--r--.  1 root root      987 Nov 22 17:55 yum.conf
drwxr-xr-x.  2 root root      187 Nov 22 17:17 yum.repos.d
[root@admin etc]# rm -rf my.cnf
[root@admin etc]# 
[root@admin etc]# ll
total 1088
-rw-r--r--.  1 root root       16 Oct 24 10:57 adjtime
-rw-r--r--.  1 root root     1518 Jun  7  2013 aliases
-rw-r--r--.  1 root root    49152 Oct 24 11:02 aliases.db
drwxr-xr-x.  2 root root      229 Oct 24 10:54 alternatives
-rw-------.  1 root root      541 Aug  9 07:45 anacrontab
-rw-r--r--.  1 root root       55 Aug  6 21:44 asound.conf
drwxr-x---.  3 root root       43 Oct 24 10:54 audisp
drwxr-x---.  3 root root       83 Oct 24 11:02 audit
drwxr-xr-x.  2 root root       40 Oct 24 11:12 bash_completion.d
-rw-r--r--.  1 root root     2853 Oct 31  2018 bashrc
drwxr-xr-x.  2 root root        6 Aug  8 21:17 binfmt.d
-rw-r--r--.  1 root root       40 Sep  5 21:11 centos-release
-rw-r--r--.  1 root root       51 Sep  5 21:11 centos-release-upstream
drwxr-xr-x.  2 root root        6 Aug  5  2017 chkconfig.d
-rw-r--r--.  1 root root     1108 Aug 12 22:54 chrony.conf
-rw-r-----.  1 root chrony    481 Aug 12 22:54 chrony.keys
drwxr-xr-x.  4 root root       59 Oct 24 11:16 cloud
drwxr-xr-x.  2 root root       21 Oct 24 10:54 cron.d
drwxr-xr-x.  2 root root       42 Oct 24 10:54 cron.daily
-rw-------.  1 root root        0 Aug  9 07:45 cron.deny
drwxr-xr-x.  2 root root       22 Jun 10  2014 cron.hourly
drwxr-xr-x.  2 root root        6 Jun 10  2014 cron.monthly
-rw-r--r--.  1 root root      451 Jun 10  2014 crontab
drwxr-xr-x.  2 root root        6 Jun 10  2014 cron.weekly
-rw-------.  1 root root        0 Oct 24 10:52 crypttab
-rw-r--r--.  1 root root     1620 Oct 31  2018 csh.cshrc
-rw-r--r--.  1 root root      866 Oct 31  2018 csh.login
drwxr-xr-x.  4 root root       78 Oct 24 10:53 dbus-1
drwxr-xr-x.  2 root root       44 Oct 24 11:21 default
drwxr-xr-x.  2 root root       23 Oct 24 10:53 depmod.d
drwxr-x---.  4 root root       53 Oct 24 10:54 dhcp
-rw-r--r--.  1 root root     5090 Aug  6 21:44 DIR_COLORS
-rw-r--r--.  1 root root     5725 Aug  6 21:44 DIR_COLORS.256color
-rw-r--r--.  1 root root     4669 Aug  6 21:44 DIR_COLORS.lightbgcolor
-rw-r--r--.  1 root root     1285 Aug  9 08:25 dracut.conf
drwxr-xr-x.  2 root root        6 Aug  9 08:25 dracut.conf.d
-rw-r--r--.  1 root root      112 Aug  6 21:44 e2fsck.conf
-rw-r--r--.  1 root root        0 Oct 31  2018 environment
-rw-r--r--.  1 root root     1317 Apr 11  2018 ethertypes
-rw-r--r--.  1 root root        0 Jun  7  2013 exports
lrwxrwxrwx.  1 root root       56 Oct 24 10:53 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
-rw-r--r--.  1 root root       70 Oct 31  2018 filesystems
drwxr-x---.  7 root root      133 Oct 24 10:54 firewalld
-rw-r--r--.  1 root root      465 Oct 24 10:52 fstab
drwxr-xr-x.  2 root root        6 Aug  5  2017 gcrypt
drwxr-xr-x.  2 root root        6 Jul 13  2018 gnupg
-rw-r--r--.  1 root root       94 Aug  2  2017 GREP_COLORS
drwxr-xr-x.  4 root root       40 Oct 24 10:52 groff
-rw-r--r--.  1 root root      503 Nov 22 11:50 group
-rw-r--r--.  1 root root      489 Oct 24 11:12 group-
lrwxrwxrwx.  1 root root       22 Oct 24 10:54 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------.  2 root root      182 Oct 24 10:55 grub.d
----------.  1 root root      400 Nov 22 11:50 gshadow
----------.  1 root root      390 Oct 24 11:12 gshadow-
drwxr-xr-x.  3 root root       20 Sep 14 02:39 gss
-rw-r--r--.  1 root root        9 Jun  7  2013 host.conf
-rw-r--r--.  1 root root       32 Nov 21 15:52 hostname
-rw-r--r--.  1 root root      158 Jun  7  2013 hosts
-rw-r--r--.  1 root root      370 Jun  7  2013 hosts.allow
-rw-r--r--.  1 root root      460 Jun  7  2013 hosts.deny
lrwxrwxrwx.  1 root root       11 Oct 24 10:52 init.d -> rc.d/init.d
-rw-r--r--.  1 root root      511 Aug  9 11:25 inittab
-rw-r--r--.  1 root root      942 Jun  7  2013 inputrc
drwxr-xr-x.  2 root root      159 Oct 24 10:52 iproute2
-rw-r--r--.  1 root root       23 Sep  5 21:11 issue
-rw-r--r--.  1 root root       22 Sep  5 21:11 issue.net
-rw-rw-r--.  1 root root       35 Nov 22 10:00 jexecval
-rw-r--r--.  1 root root     7274 Oct 24 10:54 kdump.conf
drwxr-xr-x.  3 root root       24 Oct 24 10:54 kernel
-rw-r--r--.  1 root root      641 Sep 14 00:40 krb5.conf
drwxr-xr-x.  2 root root        6 Sep 14 02:39 krb5.conf.d
-rw-r--r--.  1 root root    22988 Nov 22 21:43 ld.so.cache
-rw-r--r--.  1 root root       28 Feb 28  2013 ld.so.conf
drwxr-xr-x.  2 root root      109 Oct 24 10:54 ld.so.conf.d
-rw-r-----.  1 root root      191 Mar  2  2019 libaudit.conf
drwxr-xr-x.  2 root root       35 Oct 24 10:52 libnl
-rw-r--r--.  1 root root     2391 Oct 13  2013 libuser.conf
-rw-r--r--.  1 root root       17 Nov 21 15:52 locale.conf
lrwxrwxrwx.  1 root root       35 Oct 24 10:57 localtime -> ../usr/share/zoneinfo/Asia/Shanghai
-rw-r--r--.  1 root root     2027 Aug  6 21:44 login.defs
-rw-r--r--.  1 root root      662 Jul 31  2013 logrotate.conf
drwxr-xr-x.  2 root root       82 Oct 24 10:54 logrotate.d
drwxr-xr-x.  6 root root      100 Oct 24 10:54 lvm
-r--r--r--.  1 root root       33 Nov 21 15:52 machine-id
-rw-r--r--.  1 root root      111 Oct 31  2018 magic
-rw-rw-r--.  1 root root       91 Nov 22 10:00 mailcap
-rw-r--r--.  1 root root     5122 Aug  8 20:06 makedumpfile.conf.sample
-rw-r--r--.  1 root root     5171 Oct 31  2018 man_db.conf
-rw-rw-r--.  1 root root      230 Nov 22 10:00 mime.types
-rw-r--r--.  1 root root      936 Aug  9 08:20 mke2fs.conf
drwxr-xr-x.  2 root root       81 Oct 24 10:54 modprobe.d
drwxr-xr-x.  2 root root        6 Aug  8 21:17 modules-load.d
-rw-r--r--.  1 root root        0 Jun  7  2013 motd
lrwxrwxrwx.  1 root root       17 Oct 24 10:52 mtab -> /proc/self/mounts
drwxr-xr-x.  2 root root       31 Oct 24 10:53 my.cnf.d
drwxr-xr-x.  7 root root      134 Aug  9 08:05 NetworkManager
-rw-r--r--.  1 root root       58 Aug  9 11:25 networks
-rw-r--r--.  1 root root     1949 Oct 24 10:53 nsswitch.conf
-rw-r--r--.  1 root root     1938 Aug  7 07:02 nsswitch.conf.bak
drwxr-xr-x.  3 root root       36 Oct 24 10:53 openldap
drwxr-xr-x.  2 root root        6 Apr 11  2018 opt
-rw-r--r--.  1 root root      406 Sep  5 21:11 os-release
drwxr-xr-x.  2 root root     4096 Oct 24 10:57 pam.d
-rw-r--r--.  1 root root      935 Nov 22 11:50 passwd
-rw-r--r--.  1 root root      895 Oct 24 10:58 passwd-
drwxr-xr-x.  3 root root       21 Oct 24 10:52 pkcs11
drwxr-xr-x. 10 root root      116 Oct 24 10:54 pki
drwxr-xr-x.  2 root root       28 Oct 24 10:54 plymouth
drwxr-xr-x.  5 root root       52 Oct 24 10:52 pm
drwxr-xr-x.  5 root root       72 Oct 24 10:53 polkit-1
drwxr-xr-x.  2 root root        6 Oct 10  2015 popt.d
drwxr-xr-x.  2 root root      154 Oct 24 10:54 postfix
drwxr-xr-x.  3 root root      123 Oct 24 10:53 ppp
drwxr-xr-x.  2 root root       78 Oct 24 10:53 prelink.conf.d
-rw-r--r--.  1 root root      233 Jun  7  2013 printcap
-rw-r--r--.  1 root root     2119 Nov 22 10:12 profile
drwxr-xr-x.  2 root root      251 Oct 24 10:53 profile.d
-rw-r--r--.  1 root root     6545 Oct 31  2018 protocols
drwxr-xr-x.  2 root root       35 Oct 24 10:53 python
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc0.d -> rc.d/rc0.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc1.d -> rc.d/rc1.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc2.d -> rc.d/rc2.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc3.d -> rc.d/rc3.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc4.d -> rc.d/rc4.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc5.d -> rc.d/rc5.d
lrwxrwxrwx.  1 root root       10 Oct 24 10:52 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root      127 Oct 24 10:53 rc.d
lrwxrwxrwx.  1 root root       13 Oct 24 10:53 rc.local -> rc.d/rc.local
lrwxrwxrwx.  1 root root       14 Oct 24 10:52 redhat-release -> centos-release
-rw-r--r--.  1 root root      120 Nov 21 15:52 resolv.conf
-rw-r--r--.  1 root root     1634 Dec 25  2012 rpc
drwxr-xr-x.  2 root root       64 Nov 22 21:13 rpm
-rw-r--r--.  1 root root     3232 Aug  6 21:44 rsyslog.conf
drwxr-xr-x.  2 root root       50 Oct 24 11:12 rsyslog.d
-rw-r--r--.  1 root root      966 Aug  9 11:25 rwtab
drwxr-xr-x.  2 root root       23 Aug  9 11:25 rwtab.d
drwxr-xr-x.  2 root root       24 Oct 24 10:54 sasl2
-rw-------.  1 root root      221 Oct 31  2018 securetty
drwxr-xr-x.  6 root root     4096 Oct 24 10:53 security
drwxr-xr-x.  5 root root       81 Oct 24 10:54 selinux
-rw-r--r--.  1 root root   670293 Jun  7  2013 services
-rw-r--r--.  1 root root      216 Aug  9 17:40 sestatus.conf
----------.  1 root root      731 Nov 22 11:50 shadow
----------.  1 root root      710 Nov 21 15:52 shadow-
-rw-r--r--.  1 root root       44 Oct 31  2018 shells
drwxr-xr-x.  2 root root       62 Oct 24 10:52 skel
drwxr-xr-x.  2 root root      225 Nov 21 15:52 ssh
drwxr-xr-x.  2 root root       19 Oct 24 10:53 ssl
-rw-r--r--.  1 root root      212 Aug  9 11:25 statetab
drwxr-xr-x.  2 root root        6 Aug  9 11:25 statetab.d
-rw-r--r--.  1 root root        0 Oct 31  2018 subgid
-rw-r--r--.  1 root root        0 Oct 31  2018 subuid
-rw-r-----.  1 root root     1786 Aug  6 21:44 sudo.conf
-rw-r-----.  1 root root     4328 Aug  6 21:44 sudoers
drwxr-x---.  2 root root       33 Nov 21 15:52 sudoers.d
-rw-r-----.  1 root root     3181 Aug  6 21:44 sudo-ldap.conf
drwxr-xr-x.  6 root root     4096 Oct 24 10:58 sysconfig
-rw-r--r--.  1 root root      449 Aug  9 11:25 sysctl.conf
drwxr-xr-x.  2 root root       28 Oct 24 10:53 sysctl.d
drwxr-xr-x.  4 root root      151 Oct 24 10:53 systemd
lrwxrwxrwx.  1 root root       14 Oct 24 10:52 system-release -> centos-release
-rw-r--r--.  1 root root       30 Sep  5 21:11 system-release-cpe
drwxr-xr-x.  2 root root        6 Sep  7  2017 terminfo
drwxr-xr-x.  2 root root        6 Aug  8 21:17 tmpfiles.d
drwxr-xr-x.  3 root root      109 Oct 24 10:54 tuned
drwxr-xr-x.  3 root root       54 Oct 24 11:02 udev
-rw-r--r--.  1 root root       37 Oct 24 10:57 vconsole.conf
-rw-r--r--.  1 root root     1982 Aug  9 22:07 virc
-rw-r--r--.  1 root root     4479 May 16  2019 wgetrc
drwxr-xr-x.  2 root root       33 Oct 24 10:54 wpa_supplicant
drwxr-xr-x.  5 root root       57 Oct 24 10:53 X11
drwxr-xr-x.  4 root root       38 Oct 24 10:53 xdg
drwxr-xr-x.  2 root root        6 Apr 11  2018 xinetd.d
drwxr-xr-x.  6 root root      100 Oct 24 10:53 yum
-rw-r--r--.  1 root root      987 Nov 22 17:55 yum.conf
drwxr-xr-x.  2 root root      187 Nov 22 17:17 yum.repos.d
[root@admin etc]# 


安装

[root@admin ~]# cd /opt/soft
[root@admin soft]# 
[root@admin soft]# ls
filelist.txt                             MariaDB-10.3.0-rhel7-ppc64le-server.rpm
MariaDB-10.3.0-rhel7-ppc64le-client.rpm  MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
MariaDB-10.3.0-rhel7-ppc64le-common.rpm  MariaDB-10.3.0-rhel7-ppc64le-test.rpm
MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
[root@admin soft]# 
[root@admin soft]# rpm -ivh MariaDB-*

warning: MariaDB-10.3.0-rhel7-ppc64le-client.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	advance-toolchain-runtime is needed by MariaDB-client-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-common-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-devel-10.3.0-1.ael7b.ppc64le
	galera is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	rsync is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	lsof is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(DBI) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-shared-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
[root@admin soft]# 


报错缺少 MariaDB-test-10.3.0-1.ael7b.ppc64le 

好了下载吧

[root@admin soft]# wget http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.3.0/yum/centos7-ppc64le/rpms/galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm
--2019-11-24 09:55:52--  http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.3.0/yum/centos7-ppc64le/rpms/galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm
Resolving ftp.hosteurope.de (ftp.hosteurope.de)... 80.237.136.138, 2a01:488:10:1::50ed:888a
Connecting to ftp.hosteurope.de (ftp.hosteurope.de)|80.237.136.138|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8829828 (8.4M) [application/x-redhat-package-manager]
Saving to: ‘galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm’

100%[===========================================================>] 8,829,828   1.18MB/s   in 7.9s   

2019-11-24 09:56:00 (1.07 MB/s) - ‘galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm’ saved [8829828/8829828]

[root@admin soft]# 
[root@admin soft]# ll
total 241848
-rw-r--r--. 1 root root       530 Nov 24 00:20 filelist.txt
-rw-r--r--. 1 root root   8829828 Nov 19  2016 galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm
-rw-r--r--. 1 root root  45431684 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-client.rpm
-rw-r--r--. 1 root root    186724 Nov 24 09:41 MariaDB-10.3.0-rhel7-ppc64le-common.rpm
-rw-r--r--. 1 root root   7615600 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
-rw-r--r--. 1 root root 101495124 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-server.rpm
-rw-r--r--. 1 root root    404168 Nov 24 09:41 MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
-rw-r--r--. 1 root root  83670592 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-test.rpm
[root@admin soft]#


[root@admin soft]# 
[root@admin soft]# rpm -ivh MariaDB-*
warning: MariaDB-10.3.0-rhel7-ppc64le-client.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	advance-toolchain-runtime is needed by MariaDB-client-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-common-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-devel-10.3.0-1.ael7b.ppc64le
	galera is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	rsync is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	lsof is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(DBI) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-shared-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
[root@admin soft]#



[root@admin ~]# ls
test.class  test.java
[root@admin ~]# 
[root@admin ~]# cd /opt/soft
[root@admin soft]# ls
filelist.txt                                MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm  MariaDB-10.3.0-rhel7-ppc64le-server.rpm
MariaDB-10.3.0-rhel7-ppc64le-client.rpm     MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
MariaDB-10.3.0-rhel7-ppc64le-common.rpm     MariaDB-10.3.0-rhel7-ppc64le-test.rpm
[root@admin soft]# 
[root@admin soft]# vi rpmlist.txt
[root@admin soft]# 
[root@admin soft]# vi rpmlist.txt
[root@admin soft]# 
[root@admin soft]# rpm -ivh rpmlist.txt
warning: MariaDB-10.3.0-rhel7-ppc64le-devel.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	advance-toolchain-runtime is needed by MariaDB-devel-10.3.0-1.ael7b.ppc64le
	advance-toolchain-at8.0-runtime is needed by galera-25.3.19-1.rhel7.1.ael7b.ppc64le
	rsync is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	lsof is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(DBI) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-client-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-shared-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-common-10.3.0-1.ael7b.ppc64le
	advance-toolchain-runtime is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
[root@admin soft]# 
[root@admin soft]# wget http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.3.0/yum/centos7-ppc64le/rpms/advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm
--2019-11-24 11:19:07--  http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.3.0/yum/centos7-ppc64le/rpms/advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm
Resolving ftp.hosteurope.de (ftp.hosteurope.de)... 80.237.136.138, 2a01:488:10:1::50ed:888a
Connecting to ftp.hosteurope.de (ftp.hosteurope.de)|80.237.136.138|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 201206128 (192M) [application/x-redhat-package-manager]
Saving to: ‘advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm’

100%[===============================================================>] 201,206,128 1.80MB/s   in 2m 2s  

2019-11-24 11:21:09 (1.58 MB/s) - ‘advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm’ saved [201206128/201206128]

[root@admin soft]# 


[root@admin soft]# 
[root@admin soft]# ll
total 438344
-rw-r--r--. 1 root root 201206128 Jul 28  2016 advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm
-rw-r--r--. 1 root root       530 Nov 24 00:20 filelist.txt
-rw-r--r--. 1 root root   8829828 Nov 19  2016 galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm
-rw-r--r--. 1 root root  45431684 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-client.rpm
-rw-r--r--. 1 root root    186724 Nov 24 09:41 MariaDB-10.3.0-rhel7-ppc64le-common.rpm
-rw-r--r--. 1 root root   7615600 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
-rw-r--r--. 1 root root 101495124 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-server.rpm
-rw-r--r--. 1 root root    404168 Nov 24 09:41 MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
-rw-r--r--. 1 root root  83670592 Apr 16  2017 MariaDB-10.3.0-rhel7-ppc64le-test.rpm
-rw-r--r--. 1 root root       281 Nov 24 11:16 rpmlist.txt
[root@admin soft]#


[root@admin soft]# vi rpmlist.txt 
[root@admin soft]# 
[root@admin soft]# rpm -ivh rpmlist.txt 
warning: MariaDB-10.3.0-rhel7-ppc64le-devel.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	rsync is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	lsof is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(DBI) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
[root@admin soft]# 
[root@admin soft]#

-------------------------------------------------------------
报了个警告
warning: MariaDB-10.3.0-rhel7-ppc64le-devel.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY


搜了一下
https://yq.aliyun.com/articles/6742


引用 
rpm --import /etc/pki/rpm-gpg/RPM* 

再安装软件就不会有这个错误提示了。

来试一下

[root@admin ~]# rpm --import /etc/pki/rpm-gpg/RPM* 
[root@admin ~]# 
[root@admin ~]#
[root@admin ~]# cd /opt/soft/
[root@admin soft]# 
[root@admin soft]# ls
advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm  MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
filelist.txt                                       MariaDB-10.3.0-rhel7-ppc64le-server.rpm
galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm         MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
MariaDB-10.3.0-rhel7-ppc64le-client.rpm            MariaDB-10.3.0-rhel7-ppc64le-test.rpm
MariaDB-10.3.0-rhel7-ppc64le-common.rpm            rpmlist.txt
[root@admin soft]# 
[root@admin soft]# cat rpmlist.txt 
MariaDB-10.3.0-rhel7-ppc64le-devel.rpm
galera-25.3.19-1.rhel7.1.ael7b.ppc64le.rpm
MariaDB-10.3.0-rhel7-ppc64le-server.rpm
MariaDB-10.3.0-rhel7-ppc64le-client.rpm
MariaDB-10.3.0-rhel7-ppc64le-shared.rpm
MariaDB-10.3.0-rhel7-ppc64le-common.rpm
MariaDB-10.3.0-rhel7-ppc64le-test.rpm
advance-toolchain-at8.0-runtime-8.0-7.ppc64le.rpm

[root@admin soft]# rpm -ivh rpmlist.txt 


[root@admin soft]# rpm -ivh rpmlist.txt 
warning: MariaDB-10.3.0-rhel7-ppc64le-devel.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
error: Failed dependencies:
	rsync is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	lsof is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(DBI) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-server-10.3.0-1.ael7b.ppc64le
	perl(Data::Dumper) is needed by MariaDB-test-10.3.0-1.ael7b.ppc64le
[root@admin soft]# 


原因:这是由于yum安装了旧版本的GPG keys造成的

解决办法:后面加上

 --force --nodeps

如:

 rpm -ivh MySQL-server-5.5.46-1.linux2.6.x86_64.rpm --force --nodeps


[root@admin soft]# 
[root@admin soft]# rpm -ivh rpmlist.txt --force --nodeps


走你

[root@admin soft]# rpm -ivh rpmlist.txt --force --nodeps
warning: MariaDB-10.3.0-rhel7-ppc64le-devel.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:advance-toolchain-at8.0-runtime-8################################# [ 13%]
   2:MariaDB-common-10.3.0-1.ael7b    ################################# [ 25%]
   3:MariaDB-client-10.3.0-1.ael7b    ################################# [ 38%]
   4:galera-25.3.19-1.rhel7.1.ael7b   ################################# [ 50%]
   5:MariaDB-server-10.3.0-1.ael7b    ################################# [ 63%]
chown: cannot access ‘/var/lib/mysql’: No such file or directory

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h admin.novalocal password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

Failed to resolve typeattributeset statement at /etc/selinux/targeted/tmp/modules/400/mariadb/cil:1
/usr/sbin/semodule:  Failed!
   6:MariaDB-devel-10.3.0-1.ael7b     ################################# [ 75%]
   7:MariaDB-shared-10.3.0-1.ael7b    ################################# [ 88%]
   8:MariaDB-test-10.3.0-1.ael7b      ################################# [100%]
[root@admin soft]# 


-----------------------------------
安装成功

为MariaDB root用户设置密码

1)启动mysql服务

[root@admin ~]# 
[root@admin ~]# /usr/sbin/mysqld start
2019-11-24 11:57:30 70366533154816 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
2019-11-24 11:57:30 70366533154816 [Note] /usr/sbin/mysqld (mysqld 10.3.0-MariaDB) starting as process 31718 ...
/usr/sbin/mysqld: Please consult the Knowledge Base to find out how to run mysqld as root!
2019-11-24 11:57:30 70366533154816 [ERROR] Aborting

[root@admin ~]#


发现报错

-------------------------------------------------------------------
错误原因:

mysql默认拒绝用户使用root账户启动,
因为拥有文件权限的用户可能导致MySQL Server使用root帐户创建文件
(比如,~root/.bashrc),
但root用户可以通过在命令后面加上"--user=root"选项来强行启动mysqld。

可以以普通用户运行mysqld,
为了安全起见,可用特殊的普通用户mysql,来管理mysql数据库
-------------------------------------------------------------------
解决方法一:

[root@localhost mnt]# /usr/sbin/mysqld --user=root


解决方法二:

1)编辑/etc/my.cnf,添加如下内容(意为mysqld组中的mysql用户)

[root@localhost mnt]# vim /etc/my.cnf
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
# include all files from the config directory
!includedir /etc/my.cnf.d
[mysqld]
user=mysql
~                                              
# 注意:这里的mysql用户是不是手动创建的,貌似是安装时默认创建的

--------------------------------------------------------------
2)以mysql用户运行mysqld(比root用户更安全)

[root@localhost ~]# /usr/sbin/mysqld --user=mysql


-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------


我在这里选用
以mysql用户运行mysqld(比root用户更安全)

[root@localhost ~]# /usr/sbin/mysqld --user=mysql

这种方式启动


[root@admin ~]# 
[root@admin ~]# /usr/sbin/mysqld --user=mysql
2019-11-24 12:06:45 70366560679936 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
2019-11-24 12:06:45 70366560679936 [Note] /usr/sbin/mysqld (mysqld 10.3.0-MariaDB) starting as process 32189 ...
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Uses event mutexes
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Using Linux native AIO
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Number of pools: 1
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Using POWER8 crc32 instructions
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Completed initialization of buffer pool
2019-11-24 12:06:45 70365863539072 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Highest supported file format is Barracuda.
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-24 12:06:45 70366560679936 [Note] InnoDB: 5.7.14 started; log sequence number 1620098
2019-11-24 12:06:45 70365581668736 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-11-24 12:06:45 70365581668736 [Note] InnoDB: Buffer pool(s) load completed at 191124 12:06:45
2019-11-24 12:06:45 70366560679936 [Note] Plugin 'FEEDBACK' is disabled.
2019-11-24 12:06:45 70366560679936 [Note] Server socket created on IP: '::'.
2019-11-24 12:06:45 70366560679936 [Note] Reading of all Master_info entries succeded
2019-11-24 12:06:45 70366560679936 [Note] Added new Master_info '' to hash table
2019-11-24 12:06:45 70366560679936 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.0-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server



启动成功!


^[[A^[[A^[[B^[[B^H^H^H

^C

^[
:w^H



由于尝试了几番不知道怎么退,故换另一个终端窗口进行


修改默认用户的密码

可以# /usr/bin/mysqladmin -u root password 'new-password'

注意:mariadb user表中的root用户和linux的root账户没什么关联

/usr/bin/mysqladmin -u root password 'toor'

[root@admin ~]# /usr/bin/mysqladmin -u root password 'toor'
[root@admin ~]# 



移除安装时创建的测试数据库和匿名用户(强烈推荐)

[root@localhost ~]# /usr/bin/mysql_secure_installation


[root@admin ~]# 
[root@admin ~]# /usr/bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] Y
New password: 
Re-enter new password: 
Sorry, you can't use an empty password here.

New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
 ... skipping.

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@admin ~]# 


关闭数据库
[root@localhost ~]# mysql -u root -ptoor


[root@admin ~]# 
[root@admin ~]# mysql -u root -ptoor
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 10.3.0-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 
MariaDB [(none)]>

MariaDB [(none)]> 
MariaDB [(none)]> shutdown;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> 
MariaDB [(none)]> exit;
Bye
[root@admin ~]# 
[root@admin ~]#

-----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------
开启服务的终端可以看见


2019-11-24 12:17:28 70366531256704 [Warning] Access denied for user 'root'@'localhost' (using password: NO)

2019-11-24 12:21:44 70366530863488 [Note] /usr/sbin/mysqld (root[root] @ localhost []): Normal shutdown

2019-11-24 12:21:44 70366530863488 [Note] Event Scheduler: Purging the queue. 0 events
2019-11-24 12:21:44 70365564891520 [Note] InnoDB: FTS optimize thread exiting.
2019-11-24 12:21:44 70366530863488 [Note] InnoDB: Starting shutdown...
2019-11-24 12:21:44 70365581668736 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2019-11-24 12:21:44 70365581668736 [Note] InnoDB: Buffer pool(s) dump completed at 191124 12:21:44
2019-11-24 12:21:45 70366530863488 [Note] InnoDB: Shutdown completed; log sequence number 1620126
2019-11-24 12:21:45 70366530863488 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-11-24 12:21:45 70366530863488 [Note] /usr/sbin/mysqld: Shutdown complete

[root@admin ~]#

-----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------



---------------------------------------------------------------------
先在第一个终端下开启服务
走你
[root@admin ~]# /usr/sbin/mysqld --user=mysql

2019-11-24 12:26:14 70367071074304 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
2019-11-24 12:26:14 70367071074304 [Note] /usr/sbin/mysqld (mysqld 10.3.0-MariaDB) starting as process 780 ...
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Uses event mutexes
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Using Linux native AIO
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Number of pools: 1
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Using POWER8 crc32 instructions
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Completed initialization of buffer pool
2019-11-24 12:26:14 70366366790016 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Highest supported file format is Barracuda.
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-24 12:26:14 70367071074304 [Note] InnoDB: 5.7.14 started; log sequence number 1620126
2019-11-24 12:26:14 70366219202944 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-11-24 12:26:14 70366219202944 [Note] InnoDB: Buffer pool(s) load completed at 191124 12:26:14
2019-11-24 12:26:14 70367071074304 [Note] Plugin 'FEEDBACK' is disabled.
2019-11-24 12:26:14 70367071074304 [Note] Server socket created on IP: '::'.
2019-11-24 12:26:14 70367071074304 [Note] Reading of all Master_info entries succeded
2019-11-24 12:26:14 70367071074304 [Note] Added new Master_info '' to hash table
2019-11-24 12:26:14 70367071074304 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.0-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server


----------------------------------------------------------------------
这就开启来了
然后去第二个终端

先登录后授权

授权

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'toor' WITH GRANT OPTION;

(root表示用户名,%表示所有的电脑都可以连接,也可以设置某个ip地址运行连接,
toor表示密码)


[root@admin ~]# 
[root@admin ~]# mysql -u root -ptoor
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.0-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'toor' WITH GRANT OPTION;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> 
MariaDB [(none)]>

----------------------------------------------------------------------
服务器IP地址 *
然后再本地远程linux下mysql数据库

C:\WINDOWS\system32>mysql -h * -u root -p
Enter password: ****
ERROR 1045 (28000): Access denied for user 'root'@'*' (using password: YES)

C:\WINDOWS\system32>

*

mysql -h * -u root -p


C:\WINDOWS\system32>mysql -h * -u root -p
Enter password: ****
ERROR 2003 (HY000): Can't connect to MySQL server on '*' (10060)

C:\WINDOWS\system32>


mysql --protocol=tcp -P 3306 -h192.168.1.103 -utestacc -p


mysql --protocol=tcp -P 3306 -h * -u root -p

C:\WINDOWS\system32>mysql --protocol=tcp -P 3306 -h * -u root -p
Enter password: ****
ERROR 1045 (28000): Access denied for user 'root'@'*' (using password: YES)

C:\WINDOWS\system32>


-----------------------------------------------------------

刚想起来,服务器防火墙的问题

[root@admin ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-11-21 15:52:12 CST; 2 days ago
     Docs: man:firewalld(1)
 Main PID: 1662 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─1662 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid

Nov 21 15:52:11 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 21 15:52:12 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@admin ~]# 
[root@admin ~]#

------------------------------------------------------------------


解决方法:

# 禁止开机启动防火墙

[root@localhost ~]# systemctl disable firewalld.service

rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'

rm '/etc/systemd/system/basic.target.wants/firewalld.service'


# 停止防火墙

[root@localhost ~]# systemctl stop firewalld.service

------------------------------------------------------------------
下面是详情

先打开第三个终端,操作,关掉防火墙,以及禁止开机启动防火墙

[root@admin ~]# 
[root@admin ~]# systemctl stop firewalld.service
[root@admin ~]# 
[root@admin ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sun 2019-11-24 12:43:06 CST; 2s ago
     Docs: man:firewalld(1)
  Process: 1662 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 1662 (code=exited, status=0/SUCCESS)

Nov 21 15:52:11 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 21 15:52:12 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 24 12:43:00 admin.novalocal systemd[1]: Stopping firewalld - dynamic firewall .....
Nov 24 12:43:06 admin.novalocal systemd[1]: Stopped firewalld - dynamic firewall d...n.
Hint: Some lines were ellipsized, use -l to show in full.
[root@admin ~]# 
[root@admin ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@admin ~]# 
[root@admin ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Nov 21 15:52:11 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 21 15:52:12 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 24 12:43:00 admin.novalocal systemd[1]: Stopping firewalld - dynamic firewall .....
Nov 24 12:43:06 admin.novalocal systemd[1]: Stopped firewalld - dynamic firewall d...n.
Hint: Some lines were ellipsized, use -l to show in full.
[root@admin ~]# 
[root@admin ~]#


----------------------------------------------------
OK,下面本地再次测试


C:\WINDOWS\system32>
C:\WINDOWS\system32>mysql --protocol=tcp -P 3306 -h * -u root -p
Enter password: ****
ERROR 1045 (28000): Access denied for user 'root'@'*' (using password: YES)

C:\WINDOWS\system32>


还是不行


不过发现另外一个IP
*

不如测试一下

mysql --protocol=tcp -P 3306 -h * -u root -p

--------------------------------------------------------
第二个终端关闭服务,
MariaDB [mysql]> 
MariaDB [mysql]> shutdown;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> exit
Bye
[root@admin ~]#

-------------------------------------------------------
第一个终端显示

2019-11-24 12:49:09 70367004098944 [Note] /usr/sbin/mysqld (root[root] @ localhost []): Normal shutdown

2019-11-24 12:49:09 70367004098944 [Note] Event Scheduler: Purging the queue. 0 events
2019-11-24 12:49:09 70366202425728 [Note] InnoDB: FTS optimize thread exiting.
2019-11-24 12:49:09 70367004098944 [Note] InnoDB: Starting shutdown...
2019-11-24 12:49:09 70366219202944 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2019-11-24 12:49:09 70366219202944 [Note] InnoDB: Buffer pool(s) dump completed at 191124 12:49:09
2019-11-24 12:49:10 70367004098944 [Note] InnoDB: Shutdown completed; log sequence number 1620154
2019-11-24 12:49:10 70367004098944 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-11-24 12:49:10 70367004098944 [Note] /usr/sbin/mysqld: Shutdown complete

[root@admin ~]#
-----------------------------------------------------------------------

重启mysql服务

----------------------------------------------------
第一个终端

[root@admin ~]# 
[root@admin ~]# /usr/sbin/mysqld --user=mysql
2019-11-24 12:51:45 70367243237376 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
2019-11-24 12:51:45 70367243237376 [Note] /usr/sbin/mysqld (mysqld 10.3.0-MariaDB) starting as process 2213 ...
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Uses event mutexes
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Compressed tables use zlib 1.2.8
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Using Linux native AIO
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Number of pools: 1
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Using POWER8 crc32 instructions
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Completed initialization of buffer pool
2019-11-24 12:51:45 70366542950784 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Highest supported file format is Barracuda.
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-24 12:51:45 70367243237376 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-11-24 12:51:46 70367243237376 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-11-24 12:51:46 70367243237376 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-24 12:51:46 70367243237376 [Note] InnoDB: 5.7.14 started; log sequence number 1620154
2019-11-24 12:51:46 70366126928256 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-11-24 12:51:46 70366126928256 [Note] InnoDB: Buffer pool(s) load completed at 191124 12:51:46
2019-11-24 12:51:46 70367243237376 [Note] Plugin 'FEEDBACK' is disabled.
2019-11-24 12:51:46 70367243237376 [Note] Server socket created on IP: '::'.
2019-11-24 12:51:46 70367243237376 [Note] Reading of all Master_info entries succeded
2019-11-24 12:51:46 70367243237376 [Note] Added new Master_info '' to hash table
2019-11-24 12:51:46 70367243237376 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.0-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server


------------------------------------------------------
这就开起来了
然后第二个终端,登录

------------------------------------------------------
[root@admin ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.0-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]>



查询数据库的用户
mysql> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;


MariaDB [mysql]> 
MariaDB [mysql]> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
+-------------------------------------------------+
| query                                           |
+-------------------------------------------------+
| User: 'root'@'%';                               |
| User: 'root'@'127.0.0.1';                       |
| User: 'root'@'::1';                             |
| User: 'root'@'admin.novalocal'; |
| User: 'root'@'localhost';                       |
+-------------------------------------------------+
5 rows in set (0.00 sec)

MariaDB [mysql]> 
MariaDB [mysql]>

---------------------
刚想起来授权之后忘执行flush privileges;生效了
---------------------

再来

MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> 
MariaDB [mysql]>

-----------------------------------------------------
好,本地远程测试一下

C:\WINDOWS\system32>
C:\WINDOWS\system32>mysql --protocol=tcp -P 3306 -h * -u root -p
Enter password: ****
ERROR 1045 (28000): Access denied for user 'root'@'*' (using password: YES)

C:\WINDOWS\system32>
C:\WINDOWS\system32>


依然是拒绝,好吧

------------------------------------------------------------

暂时这个就先告一段落
2019-11-24下午 13:00
成功安装好mysql数据库
MariaDB

本地远程数据库服务还没搞定
等明天开端口再说吧。



------------------------------------------------------------
退出以后查看mysql数据库状态

[root@admin ~]# systemctl status mysql
● mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
[root@admin ~]# 
[root@admin ~]#

发布了149 篇原创文章 · 获赞 37 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/frdevolcqzyxynjds/article/details/103310050