[root@clusterserver1 ~]# yum search mariadb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vastspace.net
* epel: ftp.yzu.edu.tw
* extras: mirror.vastspace.net
* updates: mirror.vastspace.net
==================================================================================== N/S matched: mariadb =====================================================================================
mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-embedded.i686 : MariaDB as an embeddable library
mariadb-embedded.x86_64 : MariaDB as an embeddable library
mariadb-embedded-devel.i686 : Development files for MariaDB as an embeddable library
mariadb-embedded-devel.x86_64 : Development files for MariaDB as an embeddable library
mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
innotop.noarch : A MySQL and InnoDB monitor program
mariadb.x86_64 : A community developed branch of MySQL
mariadb-test.x86_64 : The test suite distributed with MariaD
nodejs-mysql.noarch : A node.js driver for mysql
phpMyAdmin.noarch : Handle the administration of MySQL over the World Wide Web
Name and summary matches only, use “search all” for everything.
[root@clusterserver1 ~]# yum -y install mariadb*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vastspace.net
* epel: mirror.nus.edu.sg
* extras: mirror.vastspace.net
* updates: mirror.vastspace.net
Package 1:mariadb-libs-5.5.41-2.el7_0.x86_64 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package mariadb.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: perl(Sys::Hostname) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(IPC::Open3) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Getopt::Long) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(File::Temp) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Fcntl) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Exporter) for package: 1:mariadb-5.5.41-2.el7_0.x86_64
–> Processing Dependency: /usr/bin/perl for package: 1:mariadb-5.5.41-2.el7_0.x86_64
—> Package mariadb-bench.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: perl(GD) for package: 1:mariadb-bench-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-bench-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(DBI) for package: 1:mariadb-bench-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Cwd) for package: 1:mariadb-bench-5.5.41-2.el7_0.x86_64
—> Package mariadb-devel.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: openssl-devel(x86-64) for package: 1:mariadb-devel-5.5.41-2.el7_0.x86_64
—> Package mariadb-embedded.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-embedded-5.5.41-2.el7_0.x86_64
–> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-embedded-5.5.41-2.el7_0.x86_64
–> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-embedded-5.5.41-2.el7_0.x86_64
—> Package mariadb-embedded-devel.x86_64 1:5.5.41-2.el7_0 will be installed
—> Package mariadb-server.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(File::Path) for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64
—> Package mariadb-test.x86_64 1:5.5.41-2.el7_0 will be installed
–> Processing Dependency: perl(constant) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Time::HiRes) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Test::More) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Storable) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Socket) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Env) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Processing Dependency: perl(Carp) for package: 1:mariadb-test-5.5.41-2.el7_0.x86_64
–> Running transaction check
—> Package libaio.x86_64 0:0.3.109-12.el7 will be installed
—> Package openssl-devel.x86_64 1:1.0.1e-34.el7_0.7 will be installed
–> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64
–> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64
—> Package perl.x86_64 4:5.16.3-283.el7 will be installed
–> Processing Dependency: perl-libs = 4:5.16.3-283.el7 for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl-macros for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl-libs for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-283.el7.x86_64
—> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
—> Package perl-DBD-MySQL.x86_64 0:4.023-5.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
—> Package perl-Env.noarch 0:1.04-2.el7 will be installed
—> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
—> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
—> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
—> Package perl-GD.x86_64 0:2.49-3.el7 will be installed
–> Processing Dependency: gd >= 2.0.28 for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libpng15.so.15()(64bit) for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libjpeg.so.62()(64bit) for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libgd.so.2()(64bit) for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libfontconfig.so.1()(64bit) for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libXpm.so.4()(64bit) for package: perl-GD-2.49-3.el7.x86_64
–> Processing Dependency: libX11.so.6()(64bit) for package: perl-GD-2.49-3.el7.x86_64
—> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed
–> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch
–> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch
—> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
—> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed
—> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
—> Package perl-Test-Simple.noarch 0:0.98-243.el7 will be installed
–> Processing Dependency: perl(Test::Harness) >= 2.03 for package: perl-Test-Simple-0.98-243.el7.noarch
—> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
—> Package perl-constant.noarch 0:1.27-2.el7 will be installed
–> Running transaction check
—> Package fontconfig.x86_64 0:2.10.95-7.el7 will be installed
–> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.10.95-7.el7.x86_64
—> Package gd.x86_64 0:2.0.35-26.el7 will be installed
—> Package krb5-devel.x86_64 0:1.11.3-49.el7 will be installed
–> Processing Dependency: libverto-devel for package: krb5-devel-1.11.3-49.el7.x86_64
–> Processing Dependency: libselinux-devel for package: krb5-devel-1.11.3-49.el7.x86_64
–> Processing Dependency: libcom_err-devel for package: krb5-devel-1.11.3-49.el7.x86_64
–> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.11.3-49.el7.x86_64
—> Package libX11.x86_64 0:1.6.0-2.1.el7 will be installed
–> Processing Dependency: libX11-common = 1.6.0-2.1.el7 for package: libX11-1.6.0-2.1.el7.x86_64
–> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.0-2.1.el7.x86_64
—> Package libXpm.x86_64 0:3.5.10-5.1.el7 will be installed
—> Package libjpeg-turbo.x86_64 0:1.2.90-5.el7 will be installed
—> Package libpng.x86_64 2:1.5.13-5.el7 will be installed
—> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
—> 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
—> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
–> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
–> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
—> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
–> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
–> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
—> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
—> Package perl-Test-Harness.noarch 0:3.28-2.el7 will be installed
—> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
—> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
—> Package perl-libs.x86_64 4:5.16.3-283.el7 will be installed
—> Package perl-macros.x86_64 4:5.16.3-283.el7 will be installed
—> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
—> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
—> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
–> Running transaction check
—> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
—> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
—> Package libX11-common.noarch 0:1.6.0-2.1.el7 will be installed
—> Package libcom_err-devel.x86_64 0:1.42.9-4.el7 will be installed
—> Package libselinux-devel.x86_64 0:2.2.2-6.el7 will be installed
–> Processing Dependency: libsepol-devel >= 2.1.9-1 for package: libselinux-devel-2.2.2-6.el7.x86_64
–> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.2.2-6.el7.x86_64
–> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.2.2-6.el7.x86_64
—> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
—> Package libxcb.x86_64 0:1.9-5.el7 will be installed
–> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.9-5.el7.x86_64
—> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
—> 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
—> Package perl-Pod-Escapes.noarch 1:1.04-283.el7 will be installed
—> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
–> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
–> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
—> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
–> Running transaction check
—> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
—> Package libsepol-devel.x86_64 0:2.1.9-3.el7 will be installed
—> Package pcre-devel.x86_64 0:8.32-12.el7 will be installed
—> 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
—> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
—> Package perl-parent.noarch 1:0.225-244.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================
Installing:
mariadb x86_64 1:5.5.41-2.el7_0 updates 8.9 M
mariadb-bench x86_64 1:5.5.41-2.el7_0 updates 386 k
mariadb-devel x86_64 1:5.5.41-2.el7_0 updates 747 k
mariadb-embedded x86_64 1:5.5.41-2.el7_0 updates 3.6 M
mariadb-embedded-devel x86_64 1:5.5.41-2.el7_0 updates 7.4 M
mariadb-server x86_64 1:5.5.41-2.el7_0 updates 11 M
mariadb-test x86_64 1:5.5.41-2.el7_0 updates 8.0 M
Installing for dependencies:
fontconfig x86_64 2.10.95-7.el7 base 228 k
fontpackages-filesystem noarch 1.44-8.el7 base 9.9 k
gd x86_64 2.0.35-26.el7 base 146 k
keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 k
krb5-devel x86_64 1.11.3-49.el7 base 611 k
libX11 x86_64 1.6.0-2.1.el7 base 605 k
libX11-common noarch 1.6.0-2.1.el7 base 181 k
libXau x86_64 1.0.8-2.1.el7 base 29 k
libXpm x86_64 3.5.10-5.1.el7 base 52 k
libaio x86_64 0.3.109-12.el7 base 24 k
libcom_err-devel x86_64 1.42.9-4.el7 base 30 k
libjpeg-turbo x86_64 1.2.90-5.el7 base 134 k
libpng x86_64 2:1.5.13-5.el7 base 212 k
libselinux-devel x86_64 2.2.2-6.el7 base 174 k
libsepol-devel x86_64 2.1.9-3.el7 base 71 k
libverto-devel x86_64 0.2.5-4.el7 base 12 k
libxcb x86_64 1.9-5.el7 base 169 k
openssl-devel x86_64 1:1.0.1e-34.el7_0.7 updates 1.2 M
pcre-devel x86_64 8.32-12.el7 base 477 k
perl x86_64 4:5.16.3-283.el7 base 8.0 M
perl-Carp noarch 1.26-244.el7 base 19 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-5.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-Encode x86_64 2.51-7.el7 base 1.5 M
perl-Env noarch 1.04-2.el7 base 16 k
perl-Exporter noarch 5.68-3.el7 base 28 k
perl-File-Path noarch 2.09-2.el7 base 26 k
perl-File-Temp noarch 0.23.01-3.el7 base 56 k
perl-Filter x86_64 1.49-3.el7 base 76 k
perl-GD x86_64 2.49-3.el7 base 173 k
perl-Getopt-Long noarch 2.40-2.el7 base 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k
perl-IO-Compress noarch 2.061-2.el7 base 260 k
perl-Net-Daemon noarch 0.48-5.el7 base 51 k
perl-PathTools x86_64 3.40-5.el7 base 82 k
perl-PlRPC noarch 0.2020-14.el7 base 36 k
perl-Pod-Escapes noarch 1:1.04-283.el7 base 49 k
perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k
perl-Pod-Usage noarch 1.63-3.el7 base 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k
perl-Socket x86_64 2.010-3.el7 base 49 k
perl-Storable x86_64 2.45-3.el7 base 77 k
perl-Test-Harness noarch 3.28-2.el7 base 302 k
perl-Test-Simple noarch 0.98-243.el7 base 170 k
perl-Text-ParseWords noarch 3.29-4.el7 base 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k
perl-Time-Local noarch 1.2300-2.el7 base 24 k
perl-constant noarch 1.27-2.el7 base 19 k
perl-libs x86_64 4:5.16.3-283.el7 base 686 k
perl-macros x86_64 4:5.16.3-283.el7 base 42 k
perl-parent noarch 1:0.225-244.el7 base 12 k
perl-podlators noarch 2.5.1-3.el7 base 112 k
perl-threads x86_64 1.87-4.el7 base 49 k
perl-threads-shared x86_64 1.43-6.el7 base 39 k
zlib-devel x86_64 1.2.7-13.el7 base 49 k
Transaction Summary
===============================================================================================================================================================================================
Install 7 Packages (+59 Dependent packages)
===============================================================================================================================================================================================
Install 7 Packages (+59 Dependent packages)
Total download size: 57 M
Installed size: 327 M
Downloading packages:
(1/66): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:00:00
(2/66): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00:00
(3/66): libX11-common-1.6.0-2.1.el7.noarch.rpm | 181 kB 00:00:00
(4/66): libXau-1.0.8-2.1.el7.x86_64.rpm | 29 kB 00:00:00
(5/66): krb5-devel-1.11.3-49.el7.x86_64.rpm | 611 kB 00:00:00
(6/66): libXpm-3.5.10-5.1.el7.x86_64.rpm | 52 kB 00:00:00
(7/66): libcom_err-devel-1.42.9-4.el7.x86_64.rpm | 30 kB 00:00:00
(8/66): libjpeg-turbo-1.2.90-5.el7.x86_64.rpm | 134 kB 00:00:00
(9/66): libX11-1.6.0-2.1.el7.x86_64.rpm | 605 kB 00:00:00
(10/66): libpng-1.5.13-5.el7.x86_64.rpm | 212 kB 00:00:00
(11/66): libaio-0.3.109-12.el7.x86_64.rpm | 24 kB 00:00:00
(12/66): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00:00
(13/66): libsepol-devel-2.1.9-3.el7.x86_64.rpm | 71 kB 00:00:00
(14/66): libxcb-1.9-5.el7.x86_64.rpm | 169 kB 00:00:00
(15/66): libselinux-devel-2.2.2-6.el7.x86_64.rpm | 174 kB 00:00:00
(16/66): fontconfig-2.10.95-7.el7.x86_64.rpm | 228 kB 00:00:01
(17/66): gd-2.0.35-26.el7.x86_64.rpm | 146 kB 00:00:01
(18/66): mariadb-devel-5.5.41-2.el7_0.x86_64.rpm | 747 kB 00:00:01
(19/66): mariadb-bench-5.5.41-2.el7_0.x86_64.rpm | 386 kB 00:00:01
(20/66): mariadb-5.5.41-2.el7_0.x86_64.rpm | 8.9 MB 00:00:03
(21/66): mariadb-test-5.5.41-2.el7_0.x86_64.rpm | 8.0 MB 00:00:04
(22/66): mariadb-embedded-5.5.41-2.el7_0.x86_64.rpm | 3.6 MB 00:00:06
(23/66): pcre-devel-8.32-12.el7.x86_64.rpm | 477 kB 00:00:00
(24/66): perl-Carp-1.26-244.el7.noarch.rpm | 19 kB 00:00:00
(25/66): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00
(26/66): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00
(27/66): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm | 140 kB 00:00:00
(28/66): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00
(29/66): perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00:00
(30/66): perl-Encode-2.51-7.el7.x86_64.rpm | 1.5 MB 00:00:00
(31/66): perl-Env-1.04-2.el7.noarch.rpm | 16 kB 00:00:00
(32/66): perl-Exporter-5.68-3.el7.noarch.rpm | 28 kB 00:00:00
(33/66): perl-File-Path-2.09-2.el7.noarch.rpm | 26 kB 00:00:00
(34/66): perl-File-Temp-0.23.01-3.el7.noarch.rpm | 56 kB 00:00:00
(35/66): perl-Filter-1.49-3.el7.x86_64.rpm | 76 kB 00:00:00
(36/66): perl-GD-2.49-3.el7.x86_64.rpm | 173 kB 00:00:00
(37/66): perl-Getopt-Long-2.40-2.el7.noarch.rpm | 56 kB 00:00:00
(38/66): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm | 38 kB 00:00:00
(39/66): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00
(40/66): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00
(41/66): perl-PathTools-3.40-5.el7.x86_64.rpm | 82 kB 00:00:00
(42/66): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00
(43/66): perl-Pod-Escapes-1.04-283.el7.noarch.rpm | 49 kB 00:00:00
(44/66): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm | 87 kB 00:00:00
(45/66): perl-Pod-Simple-3.28-4.el7.noarch.rpm | 216 kB 00:00:00
(46/66): perl-Pod-Usage-1.63-3.el7.noarch.rpm | 27 kB 00:00:00
(47/66): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm | 36 kB 00:00:00
(48/66): perl-Socket-2.010-3.el7.x86_64.rpm | 49 kB 00:00:00
(49/66): perl-Storable-2.45-3.el7.x86_64.rpm | 77 kB 00:00:00
(50/66): perl-Test-Harness-3.28-2.el7.noarch.rpm | 302 kB 00:00:00
(51/66): perl-Test-Simple-0.98-243.el7.noarch.rpm | 170 kB 00:00:00
(52/66): perl-Text-ParseWords-3.29-4.el7.noarch.rpm | 14 kB 00:00:00
(53/66): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm | 45 kB 00:00:00
(54/66): perl-Time-Local-1.2300-2.el7.noarch.rpm | 24 kB 00:00:00
(55/66): mariadb-server-5.5.41-2.el7_0.x86_64.rpm | 11 MB 00:00:09
(56/66): perl-constant-1.27-2.el7.noarch.rpm | 19 kB 00:00:00
(57/66): perl-macros-5.16.3-283.el7.x86_64.rpm | 42 kB 00:00:00
(58/66): perl-parent-0.225-244.el7.noarch.rpm | 12 kB 00:00:00
(59/66): perl-podlators-2.5.1-3.el7.noarch.rpm | 112 kB 00:00:00
(60/66): perl-threads-1.87-4.el7.x86_64.rpm | 49 kB 00:00:00
(61/66): perl-threads-shared-1.43-6.el7.x86_64.rpm | 39 kB 00:00:00
(62/66): zlib-devel-1.2.7-13.el7.x86_64.rpm | 49 kB 00:00:00
(63/66): perl-libs-5.16.3-283.el7.x86_64.rpm | 686 kB 00:00:00
(64/66): openssl-devel-1.0.1e-34.el7_0.7.x86_64.rpm | 1.2 MB 00:00:10
(65/66): mariadb-embedded-devel-5.5.41-2.el7_0.x86_64.rpm | 7.4 MB 00:00:13
(66/66): perl-5.16.3-283.el7.x86_64.rpm | 8.0 MB 00:00:11
———————————————————————————————————————————————————————————————–
Total 3.0 MB/s | 57 MB 00:00:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libaio-0.3.109-12.el7.x86_64 1/66
Installing : libjpeg-turbo-1.2.90-5.el7.x86_64 2/66
Installing : 2:libpng-1.5.13-5.el7.x86_64 3/66
Installing : 1:mariadb-embedded-5.5.41-2.el7_0.x86_64 4/66
Installing : 1:perl-parent-0.225-244.el7.noarch 5/66
Installing : perl-HTTP-Tiny-0.033-3.el7.noarch 6/66
Installing : perl-Pod-Perldoc-3.20-4.el7.noarch 7/66
Installing : perl-podlators-2.5.1-3.el7.noarch 8/66
Installing : 1:perl-Pod-Escapes-1.04-283.el7.noarch 9/66
Installing : perl-Pod-Usage-1.63-3.el7.noarch 10/66
Installing : perl-Encode-2.51-7.el7.x86_64 11/66
Installing : perl-Text-ParseWords-3.29-4.el7.noarch 12/66
Installing : 4:perl-libs-5.16.3-283.el7.x86_64 13/66
Installing : perl-Exporter-5.68-3.el7.noarch 14/66
Installing : perl-constant-1.27-2.el7.noarch 15/66
Installing : perl-Time-Local-1.2300-2.el7.noarch 16/66
Installing : perl-Socket-2.010-3.el7.x86_64 17/66
Installing : perl-Carp-1.26-244.el7.noarch 18/66
Installing : perl-Storable-2.45-3.el7.x86_64 19/66
Installing : perl-PathTools-3.40-5.el7.x86_64 20/66
Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64 21/66
Installing : perl-File-Temp-0.23.01-3.el7.noarch 22/66
Installing : perl-File-Path-2.09-2.el7.noarch 23/66
Installing : perl-threads-shared-1.43-6.el7.x86_64 24/66
Installing : perl-threads-1.87-4.el7.x86_64 25/66
Installing : perl-Filter-1.49-3.el7.x86_64 26/66
Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch 27/66
Installing : perl-Getopt-Long-2.40-2.el7.noarch 28/66
Installing : 4:perl-macros-5.16.3-283.el7.x86_64 29/66
Installing : 4:perl-5.16.3-283.el7.x86_64 30/66
Installing : perl-Data-Dumper-2.145-3.el7.x86_64 31/66
Installing : 1:mariadb-5.5.41-2.el7_0.x86_64 32/66
Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 33/66
Installing : perl-Test-Harness-3.28-2.el7.noarch 34/66
Installing : perl-Test-Simple-0.98-243.el7.noarch 35/66
Installing : perl-Env-1.04-2.el7.noarch 36/66
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 37/66
Installing : perl-Net-Daemon-0.48-5.el7.noarch 38/66
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 39/66
Installing : perl-IO-Compress-2.061-2.el7.noarch 40/66
Installing : perl-PlRPC-0.2020-14.el7.noarch 41/66
Installing : perl-DBI-1.627-4.el7.x86_64 42/66
Installing : perl-DBD-MySQL-4.023-5.el7.x86_64 43/66
Installing : 1:mariadb-server-5.5.41-2.el7_0.x86_64 44/66
Installing : libXau-1.0.8-2.1.el7.x86_64 45/66
Installing : libxcb-1.9-5.el7.x86_64 46/66
Installing : libverto-devel-0.2.5-4.el7.x86_64 47/66
Installing : zlib-devel-1.2.7-13.el7.x86_64 48/66
Installing : pcre-devel-8.32-12.el7.x86_64 49/66
Installing : fontpackages-filesystem-1.44-8.el7.noarch 50/66
Installing : fontconfig-2.10.95-7.el7.x86_64 51/66
Installing : libcom_err-devel-1.42.9-4.el7.x86_64 52/66
Installing : libX11-common-1.6.0-2.1.el7.noarch 53/66
Installing : libX11-1.6.0-2.1.el7.x86_64 54/66
Installing : libXpm-3.5.10-5.1.el7.x86_64 55/66
Installing : gd-2.0.35-26.el7.x86_64 56/66
Installing : perl-GD-2.49-3.el7.x86_64 57/66
Installing : libsepol-devel-2.1.9-3.el7.x86_64 58/66
Installing : libselinux-devel-2.2.2-6.el7.x86_64 59/66
Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 60/66
Installing : krb5-devel-1.11.3-49.el7.x86_64 61/66
Installing : 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64 62/66
Installing : 1:mariadb-devel-5.5.41-2.el7_0.x86_64 63/66
Installing : 1:mariadb-embedded-devel-5.5.41-2.el7_0.x86_64 64/66
Installing : 1:mariadb-bench-5.5.41-2.el7_0.x86_64 65/66
Installing : 1:mariadb-test-5.5.41-2.el7_0.x86_64 66/66
Verifying : 4:perl-macros-5.16.3-283.el7.x86_64 1/66
Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 2/66
Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 3/66
Verifying : 1:mariadb-embedded-5.5.41-2.el7_0.x86_64 4/66
Verifying : libsepol-devel-2.1.9-3.el7.x86_64 5/66
Verifying : libX11-common-1.6.0-2.1.el7.noarch 6/66
Verifying : perl-threads-shared-1.43-6.el7.x86_64 7/66
Verifying : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 8/66
Verifying : 2:libpng-1.5.13-5.el7.x86_64 9/66
Verifying : perl-Exporter-5.68-3.el7.noarch 10/66
Verifying : perl-constant-1.27-2.el7.noarch 11/66
Verifying : perl-PathTools-3.40-5.el7.x86_64 12/66
Verifying : libcom_err-devel-1.42.9-4.el7.x86_64 13/66
Verifying : libaio-0.3.109-12.el7.x86_64 14/66
Verifying : libXpm-3.5.10-5.1.el7.x86_64 15/66
Verifying : perl-Test-Harness-3.28-2.el7.noarch 16/66
Verifying : fontpackages-filesystem-1.44-8.el7.noarch 17/66
Verifying : 1:openssl-devel-1.0.1e-34.el7_0.7.x86_64 18/66
Verifying : perl-Env-1.04-2.el7.noarch 19/66
Verifying : 1:perl-parent-0.225-244.el7.noarch 20/66
Verifying : perl-Test-Simple-0.98-243.el7.noarch 21/66
Verifying : perl-GD-2.49-3.el7.x86_64 22/66
Verifying : 1:mariadb-test-5.5.41-2.el7_0.x86_64 23/66
Verifying : 1:perl-Pod-Simple-3.28-4.el7.noarch 24/66
Verifying : 1:mariadb-server-5.5.41-2.el7_0.x86_64 25/66
Verifying : perl-File-Temp-0.23.01-3.el7.noarch 26/66
Verifying : 4:perl-libs-5.16.3-283.el7.x86_64 27/66
Verifying : perl-Time-Local-1.2300-2.el7.noarch 28/66
Verifying : pcre-devel-8.32-12.el7.x86_64 29/66
Verifying : perl-Pod-Perldoc-3.20-4.el7.noarch 30/66
Verifying : perl-DBI-1.627-4.el7.x86_64 31/66
Verifying : perl-Socket-2.010-3.el7.x86_64 32/66
Verifying : 1:mariadb-5.5.41-2.el7_0.x86_64 33/66
Verifying : libxcb-1.9-5.el7.x86_64 34/66
Verifying : 4:perl-5.16.3-283.el7.x86_64 35/66
Verifying : perl-Carp-1.26-244.el7.noarch 36/66
Verifying : libselinux-devel-2.2.2-6.el7.x86_64 37/66
Verifying : 1:mariadb-bench-5.5.41-2.el7_0.x86_64 38/66
Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 39/66
Verifying : perl-podlators-2.5.1-3.el7.noarch 40/66
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 41/66
Verifying : libjpeg-turbo-1.2.90-5.el7.x86_64 42/66
Verifying : perl-Storable-2.45-3.el7.x86_64 43/66
Verifying : perl-Scalar-List-Utils-1.27-248.el7.x86_64 44/66
Verifying : gd-2.0.35-26.el7.x86_64 45/66
Verifying : zlib-devel-1.2.7-13.el7.x86_64 46/66
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 47/66
Verifying : libX11-1.6.0-2.1.el7.x86_64 48/66
Verifying : perl-IO-Compress-2.061-2.el7.noarch 49/66
Verifying : perl-Pod-Usage-1.63-3.el7.noarch 50/66
Verifying : perl-DBD-MySQL-4.023-5.el7.x86_64 51/66
Verifying : perl-Encode-2.51-7.el7.x86_64 52/66
Verifying : libverto-devel-0.2.5-4.el7.x86_64 53/66
Verifying : perl-Getopt-Long-2.40-2.el7.noarch 54/66
Verifying : 1:mariadb-embedded-devel-5.5.41-2.el7_0.x86_64 55/66
Verifying : libXau-1.0.8-2.1.el7.x86_64 56/66
Verifying : perl-File-Path-2.09-2.el7.noarch 57/66
Verifying : perl-PlRPC-0.2020-14.el7.noarch 58/66
Verifying : 1:mariadb-devel-5.5.41-2.el7_0.x86_64 59/66
Verifying : perl-threads-1.87-4.el7.x86_64 60/66
Verifying : fontconfig-2.10.95-7.el7.x86_64 61/66
Verifying : perl-Filter-1.49-3.el7.x86_64 62/66
Verifying : 1:perl-Pod-Escapes-1.04-283.el7.noarch 63/66
Verifying : perl-Text-ParseWords-3.29-4.el7.noarch 64/66
Verifying : krb5-devel-1.11.3-49.el7.x86_64 65/66
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 66/66
Installed:
mariadb.x86_64 1:5.5.41-2.el7_0 mariadb-bench.x86_64 1:5.5.41-2.el7_0 mariadb-devel.x86_64 1:5.5.41-2.el7_0 mariadb-embedded.x86_64 1:5.5.41-2.el7_0
mariadb-embedded-devel.x86_64 1:5.5.41-2.el7_0 mariadb-server.x86_64 1:5.5.41-2.el7_0 mariadb-test.x86_64 1:5.5.41-2.el7_0
Dependency Installed:
fontconfig.x86_64 0:2.10.95-7.el7 fontpackages-filesystem.noarch 0:1.44-8.el7 gd.x86_64 0:2.0.35-26.el7 keyutils-libs-devel.x86_64 0:1.5.8-3.el7
krb5-devel.x86_64 0:1.11.3-49.el7 libX11.x86_64 0:1.6.0-2.1.el7 libX11-common.noarch 0:1.6.0-2.1.el7 libXau.x86_64 0:1.0.8-2.1.el7
libXpm.x86_64 0:3.5.10-5.1.el7 libaio.x86_64 0:0.3.109-12.el7 libcom_err-devel.x86_64 0:1.42.9-4.el7 libjpeg-turbo.x86_64 0:1.2.90-5.el7
libpng.x86_64 2:1.5.13-5.el7 libselinux-devel.x86_64 0:2.2.2-6.el7 libsepol-devel.x86_64 0:2.1.9-3.el7 libverto-devel.x86_64 0:0.2.5-4.el7
libxcb.x86_64 0:1.9-5.el7 openssl-devel.x86_64 1:1.0.1e-34.el7_0.7 pcre-devel.x86_64 0:8.32-12.el7 perl.x86_64 4:5.16.3-283.el7
perl-Carp.noarch 0:1.26-244.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-5.el7
perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-Encode.x86_64 0:2.51-7.el7 perl-Env.noarch 0:1.04-2.el7
perl-Exporter.noarch 0:5.68-3.el7 perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 perl-Filter.x86_64 0:1.49-3.el7
perl-GD.x86_64 0:2.49-3.el7 perl-Getopt-Long.noarch 0:2.40-2.el7 perl-HTTP-Tiny.noarch 0:0.033-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PathTools.x86_64 0:3.40-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 perl-Pod-Escapes.noarch 1:1.04-283.el7
perl-Pod-Perldoc.noarch 0:3.20-4.el7 perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
perl-Socket.x86_64 0:2.010-3.el7 perl-Storable.x86_64 0:2.45-3.el7 perl-Test-Harness.noarch 0:3.28-2.el7 perl-Test-Simple.noarch 0:0.98-243.el7
perl-Text-ParseWords.noarch 0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7 perl-constant.noarch 0:1.27-2.el7
perl-libs.x86_64 4:5.16.3-283.el7 perl-macros.x86_64 4:5.16.3-283.el7 perl-parent.noarch 1:0.225-244.el7 perl-podlators.noarch 0:2.5.1-3.el7
perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7 zlib-devel.x86_64 0:1.2.7-13.el7
Complete!
[root@clusterserver1 ~]# systemctl start mariadb
[root@clusterserver1 ~]# systemctl enable mariadb
ln -s ‘/usr/lib/systemd/system/mariadb.service’ ‘/etc/systemd/system/multi-user.target.wants/mariadb.service’
[root@clusterserver1 ~]#
[root@clusterserver1 ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
4 rows in set (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> create database serverdb;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> use serverdb;
Database changed
MariaDB [serverdb]>
MariaDB [serverdb]> create table student (id int not null auto_increment, name varchar(10), birthday date, primary key (id));
Query OK, 0 rows affected (0.01 sec)
MariaDB [serverdb]> insert into student (name,birthday) values (“july”,”1981-93-03″), (“david”,”1988-09-02″);
Query OK, 2 rows affected, 1 warning (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 1
MariaDB [serverdb]> select * from student;
+—-+——-+————+
| id | name | birthday |
+—-+——-+————+
| 1 | july | 0000-00-00 |
| 2 | david | 1988-09-02 |
+—-+——-+————+
2 rows in set (0.00 sec)
MariaDB [serverdb]> update student set birthday=”1988-10-01″ where name=”Jack”;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
MariaDB [serverdb]> create table student2 select * from student;
Query OK, 2 rows affected (0.01 sec)
Records: 2 Duplicates: 0 Warnings: 0
MariaDB [serverdb]> select * from student2;
+—-+——-+————+
| id | name | birthday |
+—-+——-+————+
| 1 | july | 0000-00-00 |
| 2 | david | 1988-09-02 |
+—-+——-+————+
2 rows in set (0.00 sec)
MariaDB [serverdb]>
MariaDB [serverdb]> alter table student2 add column sex varchar(10);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
MariaDB [serverdb]> select * from student2;
+—-+——-+————+——+
| id | name | birthday | sex |
+—-+——-+————+——+
| 1 | july | 0000-00-00 | NULL |
| 2 | david | 1988-09-02 | NULL |
+—-+——-+————+——+
2 rows in set (0.00 sec)
MariaDB [serverdb]> insert into student2 set birthday=”1988-10-01″, name=”raj”;
Query OK, 1 row affected (0.00 sec)
MariaDB [serverdb]> select * from student2;
+—-+——-+————+——+
| id | name | birthday | sex |
+—-+——-+————+——+
| 1 | july | 1933-10-01 | NULL |
| 2 | david | 1988-09-02 | NULL |
| 0 | raj | 1988-10-01 | NULL |
+—-+——-+————+——+
3 rows in set (0.00 sec)
MariaDB [serverdb]> create table math (stuid int, result int, foreign key(stuid) references student(id) on delete cascade);
Query OK, 0 rows affected (0.00 sec)
MariaDB [serverdb]> select user();
+—————-+
| user() |
+—————-+
| root@localhost |
+—————-+
1 row in set (0.00 sec)
MariaDB [serverdb]>
MariaDB [serverdb]> 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]> show tables;
+—————————+
| Tables_in_mysql |
+—————————+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+—————————+
24 rows in set (0.00 sec)
[root@clusterserver1 ~]# mysqladmin -u root password test123
[root@clusterserver1 ~]# mysqladmin -u root password ‘test123’
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
[root@clusterserver1 ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> set password=password(‘test123’);
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
skip-grant-table
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[root@clusterserver1 ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> create user mohan@’localhost’
-> ;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> create user mohan@’localhost’
-> ;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> set password for mohan@’localhost’=password(‘test123’);
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
[root@clusterserver1 ~]#
[root@clusterserver1 ~]# mysql -u mohan -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> set password for mohan@’localhost’=password(‘test123’);
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> select host,user,password from mysql.user;
ERROR 1142 (42000): SELECT command denied to user ‘mohan’@’localhost’ for table ‘user’
MariaDB [(none)]>
MariaDB [(none)]> show grants for mohan@’localhost’;
+————————————————————————————————————–+
| Grants for mohan@localhost |
+————————————————————————————————————–+
| GRANT USAGE ON *.* TO ‘mohan’@’localhost’ IDENTIFIED BY PASSWORD ‘*676243218923905CF94CB52A3C9D3EB30CE8E20D’ |
+————————————————————————————————————–+
1 row in set (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> SHOW PRIVILEGES\G
*************************** 1. row ***************************
Privilege: Alter
Context: Tables
Comment: To alter the table
*************************** 2. row ***************************
Privilege: Alter routine
Context: Functions,Procedures
Comment: To alter or drop stored functions/procedures
*************************** 3. row ***************************
Privilege: Create
Context: Databases,Tables,Indexes
Comment: To create new databases and tables
*************************** 4. row ***************************
Privilege: Create routine
Context: Databases
Comment: To use CREATE FUNCTION/PROCEDURE
*************************** 5. row ***************************
Privilege: Create temporary tables
Context: Databases
Comment: To use CREATE TEMPORARY TABLE
*************************** 6. row ***************************
Privilege: Create view
Context: Tables
Comment: To create new views
*************************** 7. row ***************************
Privilege: Create user
Context: Server Admin
Comment: To create new users
*************************** 8. row ***************************
Privilege: Delete
Context: Tables
Comment: To delete existing rows
*************************** 9. row ***************************
Privilege: Drop
Context: Databases,Tables
Comment: To drop databases, tables, and views
*************************** 10. row ***************************
Privilege: Event
Context: Server Admin
Comment: To create, alter, drop and execute events
*************************** 11. row ***************************
Privilege: Execute
Context: Functions,Procedures
Comment: To execute stored routines
*************************** 12. row ***************************
Privilege: File
Context: File access on server
Comment: To read and write files on the server
*************************** 13. row ***************************
Privilege: Grant option
Context: Databases,Tables,Functions,Procedures
Comment: To give to other users those privileges you possess
*************************** 14. row ***************************
Privilege: Index
Context: Tables
Comment: To create or drop indexes
*************************** 15. row ***************************
Privilege: Insert
Context: Tables
Comment: To insert data into tables
*************************** 16. row ***************************
Privilege: Lock tables
Context: Databases
Comment: To use LOCK TABLES (together with SELECT privilege)
*************************** 17. row ***************************
Privilege: Process
Context: Server Admin
Comment: To view the plain text of currently executing queries
*************************** 18. row ***************************
Privilege: Proxy
Context: Server Admin
Comment: To make proxy user possible
*************************** 19. row ***************************
Privilege: References
Context: Databases,Tables
Comment: To have references on tables
*************************** 20. row ***************************
Privilege: Reload
Context: Server Admin
Comment: To reload or refresh tables, logs and privileges
*************************** 21. row ***************************
Privilege: Replication client
Context: Server Admin
Comment: To ask where the slave or master servers are
*************************** 22. row ***************************
Privilege: Replication slave
Context: Server Admin
Comment: To read binary log events from the master
*************************** 23. row ***************************
Privilege: Select
Context: Tables
Comment: To retrieve rows from table
*************************** 24. row ***************************
Privilege: Show databases
Context: Server Admin
Comment: To see all databases with SHOW DATABASES
*************************** 25. row ***************************
Privilege: Show view
Context: Tables
Comment: To see views with SHOW CREATE VIEW
*************************** 26. row ***************************
Privilege: Shutdown
Context: Server Admin
Comment: To shut down the server
*************************** 27. row ***************************
Privilege: Super
Context: Server Admin
Comment: To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
*************************** 28. row ***************************
Privilege: Trigger
Context: Tables
Comment: To use triggers
*************************** 29. row ***************************
Privilege: Create tablespace
Context: Server Admin
Comment: To create/alter/drop tablespaces
*************************** 30. row ***************************
Privilege: Update
Context: Tables
Comment: To update existing rows
*************************** 31. row ***************************
Privilege: Usage
Context: Server Admin
Comment: No privileges – allow connect only
31 rows in set (0.00 sec)
MariaDB [(none)]>
o begin, sign into MySQL or MariaDB with the following command:
mysql -u root -p
Enter the administrator password you set up during installation. You will be given a MySQL/MariaDB prompt.
We can now create a database by typing the following command:
CREATE DATABASE new_database;
Query OK, 1 row affected (0.00 sec)
To avoid errors in the event that the database name we’ve chosen already exists, use the following command:
CREATE DATABASE IF NOT EXISTS new_database;
Query OK, 1 row affected, 1 warning (0.01 sec)
The warning indicates that the database already existed and no new database was created.
If we leave the “IF NOT EXISTS” option off, and the database already exists, we will receive the following error:
ERROR 1007 (HY000): Can't create database 'other_database'; database exists
How to View Databases in MySQL and MariaDB
To view a list of the current databases that you have created, use the following command:
SHOW DATABASES;
+--------------------+ | Database | +--------------------+ | information_schema | | mysql | | new_database | | other_database | | performance_schema | +--------------------+ 5 rows in set (0.00 sec)
The “information_schema”, “performance_schema”, and “mysql” databases are set up by default in most cases and should be left alone unless you know what you are doing.
How to Change Databases in MySQL and MariaDB
Any operations performed without explicitly specifying a database will be performed on the currently selected database.
Find out which database is currently selected with the following command:
SELECT database();
+------------+ | database() | +------------+ | NULL | +------------+ 1 row in set (0.01 sec)
We have received a result of “null”. This means that no database is currently selected.
To select a database to use for subsequent operations, use the following command:
USE new_database;
Database changed
We can see that the database has been selected by re-issuing the command we ran previously:
SELECT database();
+--------------+ | database() | +--------------+ | new_database | +--------------+ 1 row in set (0.00 sec)
How to Delete a Database in MySQL and MariaDB
To delete a database in MySQL or MariaDB, use the following command:
DROP DATABASE new_database;
Query OK, 0 rows affected (0.00 sec)
This operation cannot be reversed! Make certain you wish to delete before pressing enter!
If this command is executed on a database that does not exist, the following error message will be given:
DROP DATABASE new_database;
ERROR 1008 (HY000): Can't drop database 'new_database'; database doesn't exist
To prevent this error, and ensure that the command executes successfully regardless of if the database exists, call it with the following syntax:
DROP DATABASE IF EXISTS new_database;
Query OK, 0 rows affected, 1 warning (0.00 sec)
Lost Root Password
When you install MariaDB on Linux you have the option to create a root password. Chances are you immediately forgot it. No worries, because as long as you have Linux root access you can get into MariaDB.
First stop your database if it’s running. On Red Hat Linux, CentOS, and Fedora use the systemctl
command:
$ sudo systemctl stop mariadb.service
On Debian, Ubuntu, and Linux Mint you can still use the service
command:
$ sudo service mysql stop * Stopping MariaDB database server mysqld
Next, restart MariaDB with the mysqld_safe
command, which is the safest way to start MariaDB. --skip-grant-tables
starts the server with no user restrictions, so it’s wide open:
$ sudo mysqld_safe --skip-grant-tables --skip-networking & [1] 11278 carla@studio:~/Documents/1articles/linuxcom$ 141029 19:37:57 mysqld_safe Logging to syslog. 141029 19:37:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
The --skip-networking
option prevents anyone from sneaking in over the network. Obviously, don’t use this if you’re logging in remotely. Now you can reset the root password by using the mysql
command shell. Login to MariaDB, select the mysql
database, reset the root password, and then immediately exit:
$ mysql -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1 Server version: 5.5.39-MariaDB-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2014, Oracle, Monty Program 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]> update user set password=PASSWORD("new-password") where User='root'; Query OK, 4 rows affected (0.00 sec) Rows matched: 4 Changed: 4 Warnings: 0 MariaDB [mysql]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [mysql]> exit Bye
Now try logging in with your new password:
$ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.39-MariaDB-0ubuntu0.14.04.1 (Ubuntu)
Use this one-liner to change the password of any user without logging in to the MariaDB shell:
$ mysqladmin -u carla -p 'old-password' password 'new-password' Backup of the database
[root@server ~]# mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql Enter password: -- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
Recent Comments