Nine week Fourth class (February 26) 11.1 Lamp Architecture Introduction 11.2 mysql, mariadb introduction 11.3/11.4/11.5 mysql Installation extension mysql5.5 source compilation installation

Source: Internet
Author: User
Tags crc32 deprecated


11.1 Lamp Architecture Introduction
11.2 MySQL, Mariadb Introduction
11.3/11.4/11.5 MySQL Installation
Extended
mysql5.5 source code Compilation installation http://www.aminglinux.com/bbs/thread-1059-1-1.html

mysql5.7 binary package installation (large variation) http://www.apelearn.com/bbs/thread-10105-1-1.html ========================================= ===========================================================

============================================================================================================ ======================================================================================================

Last Login:mon Feb 26 20:46:31 2018
[Email protected] ~]# CD/USR/LOCAL/SRC
[[email protected] src]# ls
httpd-2.2.34 httpd-2.2.34.tar.gz
[Email protected] src]# uname-a
Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 16:42:41 UTC x86_64 x86_64 x86_64 gnu/linux
[Email protected] src]# wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
--2018-02-26 22:01:36--http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
Parsing host mirrors.sohu.com (mirrors.sohu.com) ... 221.236.12.140
Connecting mirrors.sohu.com (mirrors.sohu.com) |221.236.12.140|:80 ... is connected.
An HTTP request has been made and is waiting for a response ... OK
Length: 316320366 (302M) [Application/octet-stream]
Saving to: "Mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz"

100%[=================================>] 316,320,366 2.40mb/s spents 2m 6s

2018-02-26 22:03:43 (2.39 MB/s)-Saved "mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz" [316320366/316320366])

[[email protected] src]# ls
httpd-2.2.34 mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
Httpd-2.2.34.tar.gz
[Email protected] src]# tar zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
Mysql-5.6.36-linux-glibc2.5-x86_64/mysql-test/readme
Mysql-5.6.36-linux-glibc2.5-x86_64/mysql-test/purify.supp
Mysql-5.6.36-linux-glibc2.5-x86_64/mysql-test/collections/readme
Mysql-5.6.36-linux-glibc2.5-x86_64/mysql-test/collections/default.weekly-valgrind
Mysql-5.6.36-linux-glibc2.5-x86_64/mysql-test/collections/disabled-gtid-on.list
==================================== Decompression Section Delete (too many ~) ============================================================== =============================================================================================================== =====================================
[Email protected] src]# http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz
-bash:http://mirrors.sohu.com/mysql/mysql-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz: No file or directory
[Email protected] src]# MV Mysql-5.6.36-linux-glibc2.5-x86_64/usr/local/mysql
[Email protected] src]# cd/usr/local/mysql/
[[email protected] mysql]# ls
Bin data include man README share Support-files
COPYING docs lib Mysql-test scripts sql-bench
[Email protected] mysql]#/scripts/mysql_install_db ^c
[[email protected] mysql]# useradd MySQL
[Email protected] mysql]# Mkdir/data
[Email protected] mysql]# ls/data/
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--datadir=/data/mysql
FATAL Error:please Install the following Perl modules before executing./SCRIPTS/MYSQL_INSTALL_DB:
Data::D umper
[email protected] mysql]# Yum install-y perl-xml-dumper
Loaded plugins: Fastestmirror
Repodata is over 2 weeks old. Install Yum-cron? Or Run:yum Makecache Fast
Base | 3.6 KB 00:00
Epel/x86_64/metalink | 6.3 KB 00:00
Epel | 4.7 KB 00:00
Extras | 3.4 KB 00:00
Updates | 3.4 KB 00:00
(1/3): Epel/x86_64/updateinfo | 892 KB 00:00
(2/3): epel/x86_64/primary_db | 6.2 MB 00:00
(3/3): updates/7/x86_64/primary_db | 6.0 MB 00:01
Determining fastest Mirrors
* epel:mirrors.ustc.edu.cn
Resolving dependencies
--Checking transactions
---> Package perl-xml-dumper.noarch.0.0.81-17.el7 will be installed
and is working on Dependencies Perl (XML::P arser), which is required by the package Perl-xml-dumper-0.81-17.el7.noarch
--Checking transactions
---> Package perl-xml-parser.x86_64.0.2.41-10.el7 will be installed
--Resolve dependency completion

Dependency resolution

===========================================================================
Package schema version Source size
===========================================================================
Installing:
Perl-xml-dumper Noarch 0.81-17.el7 Base K
To install for dependency:
Perl-xml-parser x86_64 2.41-10.EL7 Base 223 k

Transaction summary
===========================================================================
Install 1 packages (+1 dependent packages)

Total Downloads: 247 K
Installation size: 669 K
Downloading packages:
(a): perl-xml-dumper-0.81-17.el7.noarch.rpm | KB 00:00
(2/2): perl-xml-parser-2.41-10.el7.x86_64.rpm | 223 KB 00:00
---------------------------------------------------------------------------
Total 840 kb/s | 247 KB 00:00
Running transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-xml-parser-2.41-10.el7.x86_64 1/2
Installing: Perl-xml-dumper-0.81-17.el7.noarch 2/2
Verified in: Perl-xml-dumper-0.81-17.el7.noarch 1/2
Verified in: perl-xml-parser-2.41-10.el7.x86_64 2/2

has been installed:
Perl-xml-dumper.noarch 0:0.81-17.EL7

To be installed as a dependency:
Perl-xml-parser.x86_64 0:2.41-10.EL7

Complete!
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--datadir=/data/mysql
FATAL Error:please Install the following Perl modules before executing./SCRIPTS/MYSQL_INSTALL_DB:
Data::D umper
[email protected] mysql]# Yum install-y perl-data-dumper
Loaded plugins: Fastestmirror
Loading mirror speeds from cached hostfile
* epel:mirrors.ustc.edu.cn
Resolving dependencies
--Checking transactions
---> Package perl-data-dumper.x86_64.0.2.145-3.el7 will be installed
--Resolve dependency completion

Dependency resolution

===========================================================================
Package schema version Source size
===========================================================================
Installing:
Perl-data-dumper x86_64 2.145-3.el7 Base K

Transaction summary
===========================================================================
Installing the 1 package

Total Downloads: K
Installation Size: $ k
Downloading packages:
perl-data-dumper-2.145-3.el7.x86_64.rpm | KB 00:01
Running transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-data-dumper-2.145-3.el7.x86_64 1/1
Verified in: perl-data-dumper-2.145-3.el7.x86_64 1/1

has been installed:
Perl-data-dumper.x86_64 0:2.145-3.EL7

Complete!
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql--datadir=/data/mysql
Installing MySQL system tables ... 2018-02-26 22:17:38 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-26 22:17:38 0 [Note] ignoring--secure-file-priv value as server is running with--bootstrap.
2018-02-26 22:17:38 0 [Note]./bin/mysqld (mysqld 5.6.36) starting as Process 3050 ...
2018-02-26 22:17:38 3050 [Note] innodb:using Atomics to ref count buffer pool pages
2018-02-26 22:17:38 3050 [Note] innodb:the InnoDB memory heap is disabled
2018-02-26 22:17:38 3050 [Note] innodb:mutexes and rw_locks use GCC atomic builtins
2018-02-26 22:17:38 3050 [Note] innodb:memory barrier is not used
2018-02-26 22:17:38 3050 [Note] innodb:compressed tables use zlib 1.2.3
2018-02-26 22:17:38 3050 [Note] innodb:using Linux native AIO
2018-02-26 22:17:38 3050 [Note] innodb:using CPU CRC32 Instructions
2018-02-26 22:17:38 3050 [Note] innodb:initializing buffer pool, size = 128.0M
2018-02-26 22:17:38 3050 [Note] innodb:completed initialization of buffer pool
2018-02-26 22:17:38 3050 [Note] innodb:the first specified data file./ibdata1 did not exist:a new database to be create D!
2018-02-26 22:17:38 3050 [Note] innodb:setting file./ibdata1 size to MB
2018-02-26 22:17:38 3050 [Note] Innodb:database physically writes the file full:wait ...
2018-02-26 22:17:38 3050 [Note] innodb:setting log file./ib_logfile101 size to + MB
2018-02-26 22:17:38 3050 [Note] innodb:setting log file./ib_logfile1 size to + MB
2018-02-26 22:17:39 3050 [Note] innodb:renaming log file./ib_logfile101 to./ib_logfile0
2018-02-26 22:17:39 3050 [Warning] innodb:new log files created, lsn=45781
2018-02-26 22:17:39 3050 [Note] innodb:doublewrite buffer not found:creating new
2018-02-26 22:17:39 3050 [Note] Innodb:doublewrite buffer created
2018-02-26 22:17:39 3050 [Note] innodb:128 rollback segment (s) is active.
2018-02-26 22:17:39 3050 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2018-02-26 22:17:39 3050 [Note] innodb:foreign key constraint system tables created
2018-02-26 22:17:39 3050 [Note] innodb:creating tablespace and datafile system tables.
2018-02-26 22:17:39 3050 [Note] innodb:tablespace and datafile system tables created.
2018-02-26 22:17:39 3050 [Note] innodb:waiting for purge to start
2018-02-26 22:17:39 3050 [Note] innodb:5.6.36 started; Log sequence number 0
2018-02-26 22:17:39 3050 [Note] Binlog End
2018-02-26 22:17:39 3050 [Note] innodb:fts optimize thread exiting.
2018-02-26 22:17:39 3050 [Note] innodb:starting shutdown ...
2018-02-26 22:17:41 3050 [Note] Innodb:shutdown completed; Log sequence Number 1625977
Ok

Filling Help Tables ... 2018-02-26 22:17:41 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-26 22:17:41 0 [Note] ignoring--secure-file-priv value as server is running with--bootstrap.
2018-02-26 22:17:41 0 [Note]./bin/mysqld (mysqld 5.6.36) starting as Process 3072 ...
2018-02-26 22:17:41 3072 [Note] innodb:using Atomics to ref count buffer pool pages
2018-02-26 22:17:41 3072 [Note] innodb:the InnoDB memory heap is disabled
2018-02-26 22:17:41 3072 [Note] innodb:mutexes and rw_locks use GCC atomic builtins
2018-02-26 22:17:41 3072 [Note] innodb:memory barrier is not used
2018-02-26 22:17:41 3072 [Note] innodb:compressed tables use zlib 1.2.3
2018-02-26 22:17:41 3072 [Note] innodb:using Linux native AIO
2018-02-26 22:17:41 3072 [Note] innodb:using CPU CRC32 Instructions
2018-02-26 22:17:41 3072 [Note] innodb:initializing buffer pool, size = 128.0M
2018-02-26 22:17:41 3072 [Note] innodb:completed initialization of buffer pool
2018-02-26 22:17:41 3072 [Note] innodb:highest supported file format is Barracuda.
2018-02-26 22:17:41 3072 [Note] innodb:128 rollback segment (s) is active.
2018-02-26 22:17:41 3072 [Note] innodb:waiting for purge to start
2018-02-26 22:17:41 3072 [Note] innodb:5.6.36 started; Log sequence Number 1625977
2018-02-26 22:17:41 3072 [Note] Binlog End
2018-02-26 22:17:41 3072 [Note] innodb:fts optimize thread exiting.
2018-02-26 22:17:41 3072 [Note] innodb:starting shutdown ...
2018-02-26 22:17:43 3072 [Note] Innodb:shutdown completed; Log sequence Number 1625987
Ok

To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system

REMEMBER to SET A PASSWORD for the MySQL root USER!
To does so, start the server, then issue the following commands:

./bin/mysqladmin-u root password ' new-password '
./bin/mysqladmin-u root-h localhost.localdomain password ' new-password '

Alternatively you can run:

./bin/mysql_secure_installation

Which would 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 Manual for more instructions.

You can start the MySQL daemon with:

Cd. ;./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

CD mysql-test; Perl mysql-test-run.pl

Problems at http://bugs.mysql.com/

The latest information about MySQL was available on the Web at

Http://www.mysql.com

Support for MySQL by buying support/licenses at http://shop.mysql.com

New Default Config file was created as./my.cnf and
Would be used by default by the server when you start it.
You could edit this file to the Change server settings

Warning:default config FILE/ETC/MY.CNF exists on the system
This file is being read by default by the MySQL server
Either remove it, or use the want
--defaults-file argument to Mysqld_safe when starting the server

[[email protected] mysql]# echo $?
0
[email protected] mysql]# CP support-files/my-default.cnf/etc/my.cnf^c
[Email protected] mysql]# VIM/ETC/MY.CNF
[[email protected] mysql]# ls
Bin data include man mysql-test scripts Sql-bench
COPYING docs lib my.cnf README share support-files
[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld
[Email protected] mysql]# Vi/etc/init.d/mysqld
[Email protected] mysql]# ls-l/etc/init.d/mysqld
-rwxr-xr-x 1 root root 10592 February 22:30/etc/init.d/mysqld
[Email protected] mysql]# chkconfig--add mysqld
[Email protected] mysql]# chkconfig--list

Note: This output shows only the SysV service and does not contain the native SYSTEMD service. SysV configuration data may be overwritten by native SYSTEMD configuration.
If you would like to list the SYSTEMD service, please do ' systemctl list-unit-files '.
To view services enabled for a specific target, perform
' Systemctl list-dependencies [target] '.

Mysqld 0: Off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off
Netconsole 0: Off 1: Off 2: Off 3: Off 4: off 5: off 6: Off
Network 0: Off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off
[[Email protected] mysql]# service mysqld start
Starting mysql.logging to '/data/mysql/localhost.localdomain.err '.
.. success!
[[Email protected] mysql]# PS aux |grep mysql
Root 3358 0.0 0.0 11776 1584 pts/0 S 22:33 0:00/bin/sh/usr/local/mysql/bin/mysqld_safe--datadir=/data/mysql--pid-file= /data/mysql/localhost.localdomain.pid
MySQL 3495 5.6 10.8 1300792 453080 pts/0 Sl 22:33 0:02/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/d Ata/mysql--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error=/data/mysql/localhost.localdomain.err --pid-file=/data/mysql/localhost.localdomain.pid--socket=/tmp/mysql.sock
Root 3523 0.0 0.0 112676 976 pts/0 s+ 22:34 0:00 grep--color=auto MySQL
[Email protected] mysql]# NETSTAT-LNTP
Active Internet connections (only servers)
Proto recv-q send-q Local address Foreign address State Pid/program Name
TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1091/sshd
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1638/master
TCP6 0 0::: 3306:::* LISTEN 3495/mysqld
TCP6 0 0::: $:::* LISTEN 1091/sshd
TCP6 0 0:: 1:25:::* LISTEN 1638/master
[Email protected] mysql]# Killall 3358
-bash:killall: Command not found
[[email protected] mysql]# killall MySQL
-bash:killall: Command not found
[[email protected] mysql]#/etc/init.d/mysqld stop
Shutting down MySQL. success!
[Email protected] mysql]# NETSTAT-LNTP
Active Internet connections (only servers)
Proto recv-q send-q Local address Foreign address State Pid/program Name
TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1091/sshd
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1638/master
TCP6 0 0::: $:::* LISTEN 1091/sshd
TCP6 0 0:: 1:25:::* LISTEN 1638/master
[Email protected] mysql]#

Nine week Fourth class (February 26) 11.1 Lamp Architecture Introduction 11.2 mysql, mariadb introduction 11.3/11.4/11.5 mysql Installation extension mysql5.5 source compilation installation

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.