Record every encounter with Linux little white about MySQL script installation ex ante

Source: Internet
Author: User

People: I: Not getting Started Linux rookie

Brother Fat: Teacher

Story:

Brother from the script since the advocating through scripting to learn the deployment of various services, the pros and cons of the party through the script Automation deployment if you do not carefully read the contents of the script, understand the connotation of decision-making, it is inevitable that the subsequent service parameters of the adjustment to increase the difficulty, in the words of the elder brother said is "to make a job

Given the ability to have limited time, draw on the brother script as follows:

650) this.width=650; "title=" 2015-08-24_143423.png "alt=" wkiol1xcd7sye7ziaakttaci__8888.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m01/71/f8/wkiol1xcd7sye7ziaakttaci__8888.jpg "/>

As shown in the script, in the Minimal installation environment (basic, and development tools, no desktop, installation package about 700) in the deployment of MySQL, the idea of the elder brother is clear, first of all to solve the environment of the dependency package problem, yum-y install ncurses-* If it is networked state, Depending on the proper configuration of the Yum source, the dependencies can be installed properly, but the problem comes if the local Yum source is configured (by mounting the CENTOS-CD1 CD to/mnt, and then editing the Xxx.repo file yourself to/etc/yum.repo.d/) Will be reported ncurses dependent installation is not successful, the preliminary explanation is CD1 in the ncurses of the package is not complete, the specific reasons to be explored later, here again, to replace the Yum source to use Yum clean to clear the previous cache, Otherwise it is easy to influence the Yum installation after the change.

After viewing the data, someone found that the following settings were used to solve the problem:

650) this.width=650; "title=" 2015-08-24_150423.png "alt=" wkiom1xce4ns0bvcaaft_qn0kbm065.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m00/71/fd/wkiom1xce4ns0bvcaaft_qn0kbm065.jpg "/>

Seems to be basically consistent with the content of the elder brother, but the precise definition of the file name may make it possible to install the Yum on a non-networked environment with the local CD, and of course, the successor can also use Rsync to integrate CD2 and CD1 content to solve the problem of missing packets.

The basic environment CMake and MySQL compression packs are released to/USR/SRC for ease of management (estimating long-term usage should require regular clear understanding of compressed content) and the focus is on customizing the MySQL compilation and installation related parameters

#################################################################################

Cmake-dcmake_install_prefix=/usr/local/mysql-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_ extra_charsets=all-dsysconfdir=/etc/
Make &&make Install

#################################################################################

First of all, MySQL's main file installed under the/usr/local/mysql, that is, the basic majority of the files are in here, some questions about the character set is not detailed query, but all UTF-8 estimates are basically the public settings, and here is to say

-dsysconfdir=/etc/
The MySQL English official website explains this configuration item as follows

650) this.width=650; "title=" 2015-08-24111111111111_152037.png "alt=" wkiol1xcgyvazht3aadte-8x5bi186.jpg "src=" http ://s3.51cto.com/wyfs02/m02/71/f9/wkiol1xcgyvazht3aadte-8x5bi186.jpg "/>

Specifies the location of the default storage folder for MY.CNF, and the subsequent explanation mentions that MySQL cannot set the location of this folder when it is turned on, but it can be specified when MySQL is turned on--defaults-file=file_name

Speaking of this my.cnf file, let's take a look at what it looks like.

650) this.width=650; "title=" 2015-08-24_1530222222222222222212.png "alt=" wkiol1xcg6zj1cjyaaqep0zyci4182.jpg "src=" Http://s3.51cto.com/wyfs02/M02/71/F9/wKioL1XcG6zj1CjyAAQEP0zYci4182.jpg "/>

650) this.width=650; "title=" 2015-08-24_1333333333333333353152.png "alt=" wkiol1xchbjhssiiaaff_2k-qdo969.jpg "src=" Http://s3.51cto.com/wyfs02/M00/71/F9/wKioL1XcHBjhSsiiAAFf_2K-Qdo969.jpg "/>

Remove some of the comments off, play a role in the basic of these, from the content can be intuitive to see MySQL is really CS structure, through 3306 port for monitoring, focus, whether it is the service side or client, interface (socket probably this means, for the moment so understand it!) The indicated path is/tmp/mysql.sock, and/TMP has a permission of 777, and if the permissions are missing in some cases there is a problem that does not start MySQL. Not at the time, probably the following question

650) this.width=650; "title=" 2015-08-24_44444444444444154337.png "alt=" wkiom1xchnpgj8draadug4jhjwc749.jpg "src=" Http://s3.51cto.com/wyfs02/M00/71/FD/wKiom1XcHNPgj8dRAADUG4jHjwc749.jpg "/>

About MySQL issues related records and questions to be written here, if you encounter related issues and continue to serial

To be Continued ...

This article from "Sherry and George" blog, declined reprint!

Record every encounter with Linux little white about MySQL script installation ex ante

Related Article

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.