[MariaDB]: MariaDB yum installation

Choose the yum repo as per your linux flavour and place as below.

[root@dbversityhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]# cat /proc/version
Linux version 3.14.35-28.38.amzn1.x86_64 (mockbuild@gobi-build-64012) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Mar 11 22:50:37 UTC 2015
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]# vi MariaDB.repo
# MariaDB 5.5 RedHat repository list – created 2013-08-11 14:31 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/rhel5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
[root@dbversityhost yum.repos.d]#
Install with you command as below.

[root@dbversityhost yum.repos.d]# yum -y install MariaDB MariaDB-server
Loaded plugins: priorities, update-motd, upgrade-helper
mariadb | 2.5 kB 00:00
mariadb/primary_db | 18 kB 00:00
4 packages excluded due to repository priority protections
Resolving Dependencies
–> Running transaction check
—> Package MariaDB-server.x86_64 0:5.5.43-1 will be installed
–> Processing Dependency: perl(Data::Dumper) for package: MariaDB-server-5.5.43-1.x86_64
–> Processing Dependency: MariaDB-common for package: MariaDB-server-5.5.43-1.x86_64
–> Processing Dependency: MariaDB-client for package: MariaDB-server-5.5.43-1.x86_64
–> Processing Dependency: perl(DBI) for package: MariaDB-server-5.5.43-1.x86_64
–> Processing Dependency: libssl.so.6()(64bit) for package: MariaDB-server-5.5.43-1.x86_64
–> Processing Dependency: libcrypto.so.6()(64bit) for package: MariaDB-server-5.5.43-1.x86_64
–> Running transaction check
—> Package MariaDB-client.x86_64 0:5.5.43-1 will be installed
–> Processing Dependency: libreadline.so.5()(64bit) for package: MariaDB-client-5.5.43-1.x86_64
—> Package MariaDB-common.x86_64 0:5.5.43-1 will be installed
—> Package openssl098e.x86_64 0:0.9.8e-18.2.14.amzn1 will be installed
—> Package perl-DBI.x86_64 0:1.627-4.8.amzn1 will be installed
–> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.8.amzn1.x86_64
–> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.8.amzn1.x86_64
—> Package perl-Data-Dumper.x86_64 0:2.145-3.5.amzn1 will be installed
–> Running transaction check
—> Package compat-readline5.x86_64 0:5.2-17.3.amzn1 will be installed
—> Package perl-PlRPC.noarch 0:0.2020-14.7.amzn1 will be installed
–> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
–> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
–> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
–> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
–> Running transaction check
—> Package perl-IO-Compress.noarch 0:2.061-2.12.amzn1 will be installed
–> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.12.amzn1.noarch
–> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.12.amzn1.noarch
—> Package perl-Net-Daemon.noarch 0:0.48-5.5.amzn1 will be installed
–> Running transaction check
—> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.11.amzn1 will be installed
—> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.1.amzn1 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
MariaDB-server x86_64 5.5.43-1 mariadb 43 M
Installing for dependencies:
MariaDB-client x86_64 5.5.43-1 mariadb 12 M
MariaDB-common x86_64 5.5.43-1 mariadb 29 k
compat-readline5 x86_64 5.2-17.3.amzn1 amzn-main 156 k
openssl098e x86_64 0.9.8e-18.2.14.amzn1 amzn-main 892 k
perl-Compress-Raw-Bzip2 x86_64 2.061-3.11.amzn1 amzn-main 33 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.1.amzn1 amzn-main 61 k
perl-DBI x86_64 1.627-4.8.amzn1 amzn-main 855 k
perl-Data-Dumper x86_64 2.145-3.5.amzn1 amzn-main 49 k
perl-IO-Compress noarch 2.061-2.12.amzn1 amzn-main 298 k
perl-Net-Daemon noarch 0.48-5.5.amzn1 amzn-main 58 k
perl-PlRPC noarch 0.2020-14.7.amzn1 amzn-main 39 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package (+11 Dependent packages)

Total download size: 58 M
Installed size: 182 M
Downloading packages:
warning: /var/cache/yum/x86_64/latest/mariadb/packages/MariaDB-5.5.43-rhel5-x86_64-client.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY 11 MB 00:00 ETA
Public key for MariaDB-5.5.43-rhel5-x86_64-client.rpm is not installed
(1/12): MariaDB-5.5.43-rhel5-x86_64-client.rpm | 12 MB 00:03
(2/12): MariaDB-5.5.43-rhel5-x86_64-common.rpm | 29 kB 00:00
(3/12): MariaDB-5.5.43-rhel5-x86_64-server.rpm | 43 MB 00:05
(4/12): compat-readline5-5.2-17.3.amzn1.x86_64.rpm | 156 kB 00:00
(5/12): openssl098e-0.9.8e-18.2.14.amzn1.x86_64.rpm | 892 kB 00:00
(6/12): perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64.rpm | 33 kB 00:00
(7/12): perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64.rpm | 61 kB 00:00
(8/12): perl-DBI-1.627-4.8.amzn1.x86_64.rpm | 855 kB 00:00
(9/12): perl-Data-Dumper-2.145-3.5.amzn1.x86_64.rpm | 49 kB 00:00
(10/12): perl-IO-Compress-2.061-2.12.amzn1.noarch.rpm | 298 kB 00:00
(11/12): perl-Net-Daemon-0.48-5.5.amzn1.noarch.rpm | 58 kB 00:00
(12/12): perl-PlRPC-0.2020-14.7.amzn1.noarch.rpm | 39 kB 00:00
————————————————————————————————————————————————————————
Total 6.3 MB/s | 58 MB 00:00:09
Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Importing GPG key 0x1BB943DB:
Userid : “MariaDB Package Signing Key <package-signing-key@mariadb.org>”
Fingerprint: 1993 69e5 404b d5fc 7d2f e43b cbcb 082a 1bb9 43db
From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Data-Dumper-2.145-3.5.amzn1.x86_64 1/12
Installing : openssl098e-0.9.8e-18.2.14.amzn1.x86_64 2/12
Installing : MariaDB-common-5.5.43-1.x86_64 3/12
Installing : perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64 4/12
Installing : perl-Net-Daemon-0.48-5.5.amzn1.noarch 5/12
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64 6/12
Installing : perl-IO-Compress-2.061-2.12.amzn1.noarch 7/12
Installing : perl-PlRPC-0.2020-14.7.amzn1.noarch 8/12
Installing : perl-DBI-1.627-4.8.amzn1.x86_64 9/12
Installing : compat-readline5-5.2-17.3.amzn1.x86_64 10/12
Installing : MariaDB-client-5.5.43-1.x86_64 11/12
Installing : MariaDB-server-5.5.43-1.x86_64 12/12
chown: cannot access ‘/var/lib/mysql’: No such file or directory
150507 16:40:21 [Note] /usr/sbin/mysqld (mysqld 5.5.43-MariaDB) starting as process 2383 …
150507 16:40:21 [Note] /usr/sbin/mysqld (mysqld 5.5.43-MariaDB) starting as process 2392 …

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 dbversityhost 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
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/

Verifying : MariaDB-common-5.5.43-1.x86_64 1/12
Verifying : perl-DBI-1.627-4.8.amzn1.x86_64 2/12
Verifying : MariaDB-server-5.5.43-1.x86_64 3/12
Verifying : compat-readline5-5.2-17.3.amzn1.x86_64 4/12
Verifying : openssl098e-0.9.8e-18.2.14.amzn1.x86_64 5/12
Verifying : perl-IO-Compress-2.061-2.12.amzn1.noarch 6/12
Verifying : perl-PlRPC-0.2020-14.7.amzn1.noarch 7/12
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.1.amzn1.x86_64 8/12
Verifying : perl-Net-Daemon-0.48-5.5.amzn1.noarch 9/12
Verifying : perl-Compress-Raw-Bzip2-2.061-3.11.amzn1.x86_64 10/12
Verifying : MariaDB-client-5.5.43-1.x86_64 11/12
Verifying : perl-Data-Dumper-2.145-3.5.amzn1.x86_64 12/12

Installed:
MariaDB-server.x86_64 0:5.5.43-1

Dependency Installed:
MariaDB-client.x86_64 0:5.5.43-1 MariaDB-common.x86_64 0:5.5.43-1 compat-readline5.x86_64 0:5.2-17.3.amzn1
openssl098e.x86_64 0:0.9.8e-18.2.14.amzn1 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.11.amzn1 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.1.amzn1
perl-DBI.x86_64 0:1.627-4.8.amzn1 perl-Data-Dumper.x86_64 0:2.145-3.5.amzn1 perl-IO-Compress.noarch 0:2.061-2.12.amzn1
perl-Net-Daemon.noarch 0:0.48-5.5.amzn1 perl-PlRPC.noarch 0:0.2020-14.7.amzn1

Complete!
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]# cat MariaDB.repo
# MariaDB 5.5 RedHat repository list – created 2013-08-11 14:31 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/rhel5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#

[root@dbversityhost yum.repos.d]# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.43-MariaDB MariaDB Server

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

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

MariaDB [(none)]>
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
4 rows in set (0.00 sec)

MariaDB [(none)]> quit
Bye
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

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):
OK, successfully used password, moving on…

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

Set root password? [Y/n] n
… skipping.

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] n
… skipping.

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] n
… skipping.

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@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#
[root@dbversityhost yum.repos.d]#

  • Ask Question