Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

(3) Construction of lnmp environment: installation of mysql source code

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

About mysql: MySQL is a relational database management system, developed by MySQL AB, Sweden, and currently belongs to Oracle products. MySQL is the most popular relational database management system. MySQL is one of the best RDBMS (Relational Database Management System, relational database management system) applications in WEB applications.

MySQL is an associated database management system that stores data in different tables instead of all data in a large warehouse, which increases speed and flexibility.

The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts the dual licensing policy, which is divided into community version and commercial version. Because of its small size, high speed and low total cost of ownership, especially open source, the development of small and medium-sized websites generally choose MySQL as the website database.

Software environment: redhat6.5

Iptables off and selinux disabled

Installation of mysql:

Required software package: mysql-boost-5.7.11.tar.gz,cmake-2.8.12.2-4.el6.x86_64.rpm

1tar zxf mysql-boost-5.7.11.tar.gz1cd mysql-boost-5.7.11123yum install cmake- yyum update cmake-2.8.12.2-4.el6.x86_64.rpmyum install gcc gcc-c++ ncurses-devel bison-y # # solves dependency 1cmake-DCMAKE_INSTALL_PREFIX=/usr/local/lnmp/mysql-DMYSQL_DATADIR=/usr/local/lnmp/mysql/data-DMYSQL_UNIX_ADDR=/usr/local/lnmp/mysql/data/mysql.sock-DWITH_MYISAM_ STORAGE_ENGINE=1-DWITH_INNOBASE_STORAGE_ENGINE=1-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DEXTRA_CHARSETS=all-DWITH_BOOST=boost/boost_1_59_0/

Make-j2 # compiled with two cpu

Note: errors may be reported during compilation, possibly due to insufficient disk space

To expand the disk space, add a virtual disk first

123456fdisk-cu / dev/vdb (8e) pvcreate / dev/vdb1vgextend VolGroup/ dev/vdb1lvextend-l + 2047 / dev/VolGroup/lv_root # # (add the remaining 2047 to it) (lvs;vgs) resize2fs / dev/VolGroup/lv_rootdf-h1make install12useradd-u 27-s / sbin/nologin mysqlgroupmod-g 27 mysql1234cd / usr/local/mysql/support-filescp mysql.server / etc/init.d/mysqldmv / etc/my.cnf / etc/my.cnf.bak

Cp my-defaule.cnf / etc/my.cnf

Add environment variabl

12vim / root/.bash_profile

Source ~ / .bash_profile # to make the changed environment variable effective

1mysql-- initialize-- user=mysql # initialize the database 12chown-R mysql.mysql / usr/local/lnmp/mysql/data # change users and use their group / etc/init.d/mysqld start1

Mysql-p # login without password

Successfully log in to mysql

1mysql_secure_installation # secure initialization to data password

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report