MySQL5.5 compilation installation of LNMP architecture

Source: Internet
Author: User

Simply put, the database is a repository of data, the warehouse is organized according to a certain data structure to organize storage, we can use the database to provide a variety of methods to manage the data

NoSQL is not meant to be only a relational database so NoSQL is not to completely negate the relational database, but as an effective complement to the traditional relational database

Types of non-relational databases
1, Key-value
A key-value database is similar to a hash table used in a traditional language, and can be added by key to query or delete data because it is accessed using key primary key, so it is very high performance and scalability.
The key-value database uses a hash table, which has a specific key and a pointer to the specific data, the advantage: simple and easy to deploy high concurrency

Typical product: memcached Redis

Column Store Database
Columnstore database stores data in a column family

Typical product: Cassandra HBase

Document-oriented database
Data is stored as a document, and each document is a self-contained unit of data, a collection of data items

Typical product: MongoDB


MySQL installation method
1. RPM Package
2, the normal way to compile MySQL
3. CMake Compile and install MySQL
4. Binary mode free compilation install MySQL

Database installation    (centos6.7) [[email protected] tools]# yum install cmake - Y Dependency Package yum install ncurses-devel -y Create user useradd mysql -s /sbin/nologin -m[[ Email protected] tools]# tar xf mysql-5.5.32.tar.gz [[email protected]  tools]# cd mysql-5.5.32[[email protected] tools]# cmake . -dcmake_ Install_prefix=/application/mysql-5.5.32 -dmysql_datadir=/application/mysql-5.5.32/data -dmysql_unix _addr=/application/mysql-5.5.32/tmp/mysql.sock -ddefault_charset=utf8 -ddefault_collation=utf8_ General_ci -dextra_charsets=gbk,gb2312,utf8,ascii -denabled_local_infile=on -dwith_innobase_ Storage_engine=1 -dwith_federated_storage_engine=1 -dwith_blackhole_storage_engine=1 -dwithout_ Example_storage_engine=1 -dwithout_partition_storage_engine=1 -dwith_fast_mutexes=1 -dwith_zlib =bundled -denabled_local_infile=1 -dwith_readline=1 -dwith_embedded_server=1 -dwith_debug=0[[email protected]  mysql-5.5.32]# make && make install[[email protected] mysql-5.5.32]#  ln -s /application/mysql-5.5.32/ /application/mysql[[email protected]  mysql-5.5.32]# cp support-files/my-small.cnf /etc/my.cnf[[email protected]ample  mysql-5.5.32]# chown -r mysql.mysql /application/mysql/[[email protected]  Mysql-5.5.32]# chmod -r 1777 /tmp/[[email protected] mysql-5.5.32]# cd  /application/mysql/scripts/[[email protected] scripts]# ./mysql_install_db --basedir =/application/mysql/  --datadir=/application/mysql/data/ --user=mysqlinstalling mysql  system tables ... Okfilling help tables ... Okto start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemplease remember  to set a password for the mysql root user ! to do so, start the server, then issue the following  commands:/application/mysql//bin/mysqladmin -u root password  ' New-password '/application/ mysql//bin/mysqladmin -u root -h centos03 password  ' New-password ' Alternatively  you can run:/application/mysql//bin/mysql_secure_installationwhich will also  Give you the option of removing the testdatabases and anonymous  user created by default.  This isstrongly recommended for  Production servers. See the manual for more instructions. You can start the mysql daemon with:cD /application/mysql/ ; /application/mysql//bin/mysqld_safe &you can test  the MySQL daemon with mysql-test-run.plcd /application/mysql//mysql-test ;  perl mysql-test-run.plplease report any problems with the / application/mysql//scripts/mysqlbug script! [[email protected] scripts]# cp /tools/mysql-5.5.32/support-files/mysql.server /etc/ init.d/mysqld[[email protected] scripts]# chmod +x /etc/init.d/mysqld[[email  Protected] scripts]# /etc/init.d/mysqld startstarting mysql.... success! [[email  protected] scripts]# lsof -i :3306COMMAND   PID  USER    fd   type device size/off node namemysqld  14177  mysql   10u  ipv4  52218      0t0  tcp *:mysql  (LISTEN) Add environment variable [[Email protected] scripts]# echo   "Export path=/application/mysql/bin: $PATH"   >> /etc/profile[[email  protected] scripts]# source /etc/profile[[email protected] scripts]#  Mysqlwelcome to the mysql monitor.  commands end with ; or  \g.your mysql connection id is 1server version: 5.5.32 source  distributionCopyright  (c)  2000, 2013, oracle and/or its affiliates.  all rights reserved. oracle is a registered trademark of oracle corporation and/or  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input statement.mysql> select user,host from mysql.user;  +----- -+-----------+| user | host      |+------+-----------+| root  | 127.0.0.1 | |  root | ::1       | |       | centos03  | |  root | centos03  | |       | localhost | |  root | localhost |+------+-----------+6 rows in set  (0.00 sec) Mysql> delete from mysql.user where user= ';    #删除用户名是空的用户Query  OK, 2 rows affected  (0.00 sec) mysql> select user,host from  mysql.user;    +------+-----------+| user | host       |+------+-----------+| root | 127.0.0.1 | |  root | ::1       | |  root | centos03  | |  root | localhost |+------+-----------+4 rows in set  (0.00 sec) mysql> delete from mysql.user where host= ' Centos03 '; query ok, 1 row affected  (0.00 sec) mysql> delete from  Mysql.user where host= ':: 1 ';     query ok, 1 row  affected  (0.00 sec) mysql> select user,host from mysql.user;             +------+-----------+| user | host       |+------+-----------+| root | 127.0.0.1 | |  root | localhost |+------+-----------+2 rows in set  (0.00 sec) mysql> drop database test; Query ok, 0 rows affected  (0.03 sec) mysql> show databases;+--------------------+| database            |+--------------------+| information_ schema | |  mysql              | |  performance_schema |+--------------------+3 rows in set  (0.00 sec) [email  protected] scripts]# mysqladmin -u root password  ' 123456 '       #为root账户设置密码123456    [[email protected] scripts]# mysql -uroot  -p123456Welcome to the MySQL monitor.  Commands end with ;  or \g.Your MySQL connection id is 3Server version: 5.5.32  source distributioncopyright  (c)  2000, 2013, Oracle and/or its  Affiliates. all righTs reserved. oracle is a registered trademark of oracle corporation and/or  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input  statement.mysql>[[email protected] scripts]# chkconfig mysqld on


Simply install the process

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/7B/wKiom1eku1jBXf-4AAG3-jHf3oM505.png "style=" float: none; "title=" 1.png "alt=" Wkiom1eku1jbxf-4aag3-jhf3om505.png "/>



650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/7A/wKioL1eku2KT4BfPAANyAkCuSVM505.png "style=" float: none; "title=" 4.png "alt=" Wkiol1eku2kt4bfpaanyakcusvm505.png "/>


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/85/7B/wKiom1eku2XAHXeUAAKkR1CqZIo643.png "style=" float: none; "title=" 5.png "alt=" Wkiom1eku2xahxeuaakkr1cqzio643.png "/>


This article from "Thick tak" blog, declined reprint!

MySQL5.5 compilation installation of LNMP architecture

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.