Simple installation of mysql and mysql
For simple installation of mysql, we can download the binary distribution version of Mysql directly from the Mysql official website, such as LInux x86_64, and decompress the package to use it in green. Http://www.mysql.com/downloads/
Create OS users and groups
Groupadd mysql
Useradd-g mysql
The group name and user name are not named as mysql, and the group name and user name are not required to be consistent.
Decompress green
Extract the installation media to/usr/local or any directory that you have permission.
[Root @ erpt1 ~] # Tar-xzvf mysql-5.6.20-linux-glibc2.5-x86_64.tar.gz-C/usr/local
[Root @ erpt1] #
[Root @ erpt1] # cd/usr/local & ln-s/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64 mysql
The Russian soft connection is established later to make it easier for us to access the mysql directory.
Change owner
# Chown-R mysql: mysql/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64
[Root] # chown-R mysql: mysql/usr/local/mysql
Environment Variable
Add/usr/local/mysql/bin to PATH
Install db
[Mysql @ erpt1 mysql] $ cd/usr/local/mysql & scripts/mysql_install_db -- user = mysql
Mysql_install_db creates a default option my. cnf in the basic directory.
Start mysql database
Mysqld_safe &
Log on to Mysqlmysql-uroot
How to easily check that the mysql database has been installed
Open the task manager and check whether there are any processes with 'mysql'. If yes, mysql is running.
Which of the following is a simple installation method for installing mysql in linux?
Rpm is easier than tar.gz. Rpmis equivalent to manual installation, and tar.gz is equivalent to custom installation.