Installing MySQL on the CentOS7

Source: Internet
Author: User

The installation process is just a few lines of command, and we'll be ready to install it soon. But what do these lines mean for me, the little white that just started to learn about Linux, databases, and cloud computing? It took me some time to figure it out and share it with you.

CentOS 7 's Yum source does not appear to be properly installed when MySQL mysql-sever file, need to go to official Web download:

13 commands to complete the installation
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm# rpm -ivh mysql-community-release-el7-5.noarch.rpm# yum install mysql-community-server
1.1 wget

The first command, wget, is a command to download mysql-community-release to a local, and its detailed usage can refer to the blog post: http://blog.csdn.net/cds86333774/article/details/51132736.

The default download path for wget is the directory under which you execute this command, and it will download the asking price under which path:

As we can see at this point, the second command is actually dealing with the installation package that we downloaded with wget, and the suffix of this installation package is. RMP, so they are corresponding and are set.

1.2 rpm

Let's take a look at RMP's official website:
Welcome to the home of the official RPM package Manager (RPM) code base!
RPM is a powerful and mature command-line driven package management system capable of installing, uninstalling, verify ING, querying, and updating Unix software packages. Each software package consists of a archive of files along with information on the package like its version, a Descrip tion, and the like. There is also a library API, permitting advanced developers to manage such transactions from programming languages such as C, Perl or Python.

Traditionally, RPM is a core component of many Linux distributions, including Red Hat Enterprise Linux, Fedora, Novell SUS E Linux Enterprise, OpenSUSE, CentOS, Mandriva Linux, and many others. But RPM was also used for software packaging on many other Unix operating systems like FreeBSD, Sun OpenSolaris, IBM AIX an D Apple Mac OS X through the cross-platform Unix software distribution openpkg. Additionally, the RPM archive format is a official part of the Linux standard Base (LSB).

Bloggers look at the overview of preference to see the original English, because the foreigner summary is often more comprehensive, accurate, refined. For a detailed introduction and usage of RMP, please refer to this post: http://blog.csdn.net/cds86333774/article/details/51133007.

1.3 Yum

RPM is a package management method developed by Red Hat, which allows us to install, query, uninstall and upgrade the software conveniently. However, the dependencies between RPM packages are often cumbersome, especially when the software is made up of multiple RPM packages.

RPM is a software package name for Linux, with the. RMP end, the installation syntax is: RPM-IVH,RPM package installation has a big drawback is that the file is too large, sometimes installed a software to install a lot of other packages, very troublesome, So Redhat Little Red Hat developed the Yum installation method, he can completely solve the problem of relevance, very convenient.

Yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat and SuSE. Based on RPM package management, the ability to automatically download the RPM package from the specified server and install, can automatically handle dependency relationships, and install all dependent software packages at once, without the tedious download and installation.

So, the second RMP command only installs that one installation package, and the first two commands are used because there is no Mysql-sever file on Yum, and if it is a complete installation package on Yum, a single command is done. A detailed description of Yum can be found in the blog post: http://blog.csdn.net/cds86333774/article/details/51133231.

To show the power of Yum, I cut a few more pictures:
(1) Get dependent

(2) Download all required installation packages

(3) Install all installation packages automatically

2 most basic MySQL settings

The initial installation of MySQL is a root account without a password
How to set a password

# mysql -urootsetfor [email protected] = password(‘123456‘);  //这里注意自己替换密码mysql> exit

Create a full superuser who can connect to the server from anywhere, but must use a password

ontoby ‘123456’

Installing MySQL on the CentOS7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.