centos 7 安装 mariadb

  • Post author:
  • Post category:其他



[root@c7 conf]# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@c7 conf]# cp /usr/share/mysql/my-huge.cnf  /etc/my.cnf
cp: overwrite ‘/etc/my.cnf’? y
[root@c7 conf]# vim /etc/my.cnf
[root@c7 conf]# systemctl start mariadb.service

[root@c7 conf]# yum install mariadb mariadb-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                             | 9.4 kB  00:00:00
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                             | 3.6 kB  00:00:00
docker-ce-stable                                                                                                                                 | 3.5 kB  00:00:00
extras                                                                                                                                           | 2.9 kB  00:00:00
updates                                                                                                                                          | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.68-1.el7 will be installed
---> Package mariadb-server.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Running transaction check
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Running transaction check
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================== Package                                            Arch                              Version                                     Repository                       Size
========================================================================================================================================================================Installing:
 mariadb                                            x86_64                            1:5.5.68-1.el7                              base                            8.8 M
 mariadb-server                                     x86_64                            1:5.5.68-1.el7                              base                             11 M
Installing for dependencies:
 libaio                                             x86_64                            0.3.109-13.el7                              base                             24 k
 perl-Compress-Raw-Bzip2                            x86_64                            2.061-3.el7                                 base                             32 k
 perl-Compress-Raw-Zlib                             x86_64                            1:2.061-4.el7                               base                             57 k
 perl-DBD-MySQL                                     x86_64                            4.023-6.el7                                 base                            140 k
 perl-DBI                                           x86_64                            1.627-4.el7                                 base                            802 k
 perl-Data-Dumper                                   x86_64                            2.145-3.el7                                 base                             47 k
 perl-IO-Compress                                   noarch                            2.061-2.el7                                 base                            260 k
 perl-Net-Daemon                                    noarch                            0.48-5.el7                                  base                             51 k
 perl-PlRPC                                         noarch                            0.2020-14.el7                               base                             36 k

Transaction Summary
========================================================================================================================================================================Install  2 Packages (+9 Dependent packages)

Total download size: 21 M
Installed size: 110 M
Is this ok [y/d/N]: y
Downloading packages:
(1/11): libaio-0.3.109-13.el7.x86_64.rpm                                                                                                         |  24 kB  00:00:00
(2/11): mariadb-server-5.5.68-1.el7.x86_64.rpm                                                                                                   |  11 MB  00:00:01
(3/11): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                                                                                           |  32 kB  00:00:06
(4/11): mariadb-5.5.68-1.el7.x86_64.rpm                                                                                                          | 8.8 MB  00:00:15
(5/11): perl-DBD-MySQL-4.023-6.el7.x86_64.rpm                                                                                                    | 140 kB  00:00:00
(6/11): perl-DBI-1.627-4.el7.x86_64.rpm                                                                                                          | 802 kB  00:00:00
(7/11): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                                                                  |  47 kB  00:00:00
(8/11): perl-IO-Compress-2.061-2.el7.noarch.rpm                                                                                                  | 260 kB  00:00:01
(9/11): perl-Net-Daemon-0.48-5.el7.noarch.rpm                                                                                                    |  51 kB  00:00:00
(10/11): perl-PlRPC-0.2020-14.el7.noarch.rpm                                                                                                     |  36 kB  00:00:00
(11/11): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                                                                                           |  57 kB  00:00:10
------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total                                                                                                                                   1.1 MB/s |  21 MB  00:00:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                 1/11
  Installing : libaio-0.3.109-13.el7.x86_64                                                                                                                        2/11
  Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                         3/11
  Installing : 1:mariadb-5.5.68-1.el7.x86_64                                                                                                                       4/11
  Installing : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                   5/11
  Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                          6/11
  Installing : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                 7/11
  Installing : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                     8/11
  Installing : perl-DBI-1.627-4.el7.x86_64                                                                                                                         9/11
  Installing : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                                                  10/11
  Installing : 1:mariadb-server-5.5.68-1.el7.x86_64                                                                                                               11/11
  Verifying  : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                          1/11
  Verifying  : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                   2/11
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                 3/11
  Verifying  : 1:mariadb-server-5.5.68-1.el7.x86_64                                                                                                                4/11
  Verifying  : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                                                   5/11
  Verifying  : 1:mariadb-5.5.68-1.el7.x86_64                                                                                                                       6/11
  Verifying  : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                         7/11
  Verifying  : perl-DBI-1.627-4.el7.x86_64                                                                                                                         8/11
  Verifying  : libaio-0.3.109-13.el7.x86_64                                                                                                                        9/11
  Verifying  : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                    10/11
  Verifying  : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                11/11

Installed:
  mariadb.x86_64 1:5.5.68-1.el7                                                   mariadb-server.x86_64 1:5.5.68-1.el7

Dependency Installed:
  libaio.x86_64 0:0.3.109-13.el7      perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7   perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7   perl-DBD-MySQL.x86_64 0:4.023-6.el7
  perl-DBI.x86_64 0:1.627-4.el7       perl-Data-Dumper.x86_64 0:2.145-3.el7          perl-IO-Compress.noarch 0:2.061-2.el7         perl-Net-Daemon.noarch 0:0.48-5.el7
  perl-PlRPC.noarch 0:0.2020-14.el7

Complete!
[root@c7 conf]# vim /etc/my.cnf
[root@c7 conf]#
[root@c7 conf]# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@c7 conf]# cp /usr/share/mysql/my-huge.cnf  /etc/my.cnf
cp: overwrite ‘/etc/my.cnf’? y
[root@c7 conf]# vim /etc/my.cnf
[root@c7 conf]# systemctl start mariadb.service
[root@c7 conf]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB Server

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

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

MariaDB [(none)]> show variables like  '%character_set%' ;
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

MariaDB [(none)]> quit;
Bye



版权声明:本文为xu990128638原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。