<<Back to MySQL & MariaDB Main Page
Installing MySQL or MariaDB Database Using Binary Tarballs on Linux
Before beginning to download an installation package, you must decide which version of MySQL or MariaDB to install.For MySQL, the best choice is usually the latest stable version recommended by Oracle on its site, the version called the generally available (GA) release. For MariaDB, the latest GA release will be the current stable version.
Step1> Download the required Software
Download MySQL Database Software here
Download MariaDB Database Software here
Step2> Transfer the Binary Files in the directory of your choice.
Copy the database binary file (tar file) on the target server using winscp or scp. Because I want to install it in /var/lib/mariadb I have copied it here
Step3>Extract the tar archive
# tar -zxvpf mariadb-10.3.9-linux-x86_64.tar.gz
Step4> Create softlink
#ln -s /var/lib/mariadb/mariadb-10.3.9-linux-x86_64 /var/lib/mariadb/MySQL
Note: The symlinking with ln -s is recommended as it makes it easy to install many MariaDB version at the same time (for easy testing, upgrading, downgrading etc).
Step5> Create mysql user and group
#groupadd mysql
#useradd -g mysql mysql
Step6: Change ownership of the binary files
#chown -R mysql:mysql /var/lib/mariadb/MySQL
Step7: Prepare /etc/my.cnf
# cat /etc/my.cnf
[mysqld]
basedir=/var/lib/mariadb/mysql
datadir=/var/lib/mariadb/data
user=mysql
Step8: Run MySQL/MariaDB installer
#cd /var/lib/mariadb/mysql
# ./scripts/mysql_install_db --user=mysql
Installing MariaDB/MySQL system tables in '/var/lib/mariadb/data' ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/var/lib/mariadb/mysql/bin/mysqladmin' -u root password 'new-password'
'/var/lib/mariadb/mysql/bin/mysqladmin' -u root -h test1 password 'new-password'
Alternatively you can run:
'/var/lib/mariadb/mysql/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.
You can start the MariaDB daemon with:
cd '/var/lib/mariadb/mysql' ; /var/lib/mariadb/mysql/bin/mysqld_safe --datadir='/var/lib/mariadb/data'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/var/lib/mariadb/mysql/mysql-test' ; perl mysql-test-run.pl
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/
Step9: Change the Permission as root because we want to install it as root
# chown -R root .
# chown -R mysql data
Step10: Start MySQL or MariaDB Server
# /var/lib/mariadb/mysql/bin/mysqld_safe --datadir='/var/lib/mariadb/data' &
[1] 17259
# 181004 14:16:41 mysqld_safe Logging to '/var/lib/mariadb/test1.err'.
181004 14:16:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mariadb
Step11: Test connection to the Database server
#export PATH=$PATH:/var/lib/mariadb/mysql/bin
# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.3.9-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 databases;
+--------------------------------------+
| Database |
+--------------------------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------------------------+
4 rows in set (0.002 sec)
MariaDB [(none)]>
Step12>Configure Auto Start of MySQL or MariaDB Server Restart
#cp /var/lib/mariadb/mysql/support-files/mysql.server /etc/init.d/mysql
#chmod +x /etc/init.d/mysql
#chkconfig --add mysql
Step By Step How To Install Mysql Or Mariadb Database Using Binary Tarball >>>>> Download Now
ReplyDelete>>>>> Download Full
Step By Step How To Install Mysql Or Mariadb Database Using Binary Tarball >>>>> Download LINK
>>>>> Download Now
Step By Step How To Install Mysql Or Mariadb Database Using Binary Tarball >>>>> Download Full
>>>>> Download LINK D8