MySQL compilation installation

Source: Internet
Author: User

To create a MySQL user, group:

# Groupadd MySQL

# Useradd Mysql-m-s/sbin/nologin


To start a compilation installation:

# CD mysql-5.6.28

#./configure \

--prefix=/application/mysql5.6.28 \ #指定路径

--with-unix-socket-path=/application/mysql5.6.28/tmp/mysql.sock \ #指定sock的路径

Localstatedir=/application/mysql5.6.28/data \ #数据路径

--enable-assembler \ #

--enable-thread-safe-client \

--with-mysqld-user=mysql \

--with-big-tables \

--without-debug \

--with-pathread \

--enable-assembler \

--with-extra-charsets=complex \

--with-readline \

--WITH-SSL \

--with-embedded-server \

--enable-local-infile \

--with-plugins=partition,innobase \

--with-mysqld-ldflags=-all-static \

--with-client-ldflags=-all-static \

# make

# make Install

Copy the configuration file:

# CP/HOME/ALEX/TOOLS/MYSQL-5.1.72/SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF

To create a data catalog:

# mkdir/application/mysql/data-p

Modify the user groups and users of the data catalog:

# Chown-r Mysql.mysql/application/mysql/data

Initialize the database:

#/application/mysql/bin/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data--user= Mysql

To start the MySQL service:

#/application/mysql/bin/mysqld_safe &

View Port 3306 to see if the service is started:

# NETSTAT-TUNPL |grep 3306

To set a password for a mysqlroot user:

# mysqladmin-uroot password ' redhat '


MySQL Simple statement:

Querying MySQL Users

Select User,host from Mysql.user;

To delete a user who is the root host localhost

drop user [email protected];

To remove a user who is an empty host for localhost

Drop user "" @localhost;

Update Mysql.user This library

Update mysql.user set host= ' localhost ' where user= ' root ' and host= ' 127.0.0.1 ';


Alex will update the following PHP error resolution for you, I hope that the above blog for Linux enthusiasts to use ~ ~


Linux Operational Communication Group: 288746884




This article is from the "11794562" blog, please be sure to keep this source http://11804562.blog.51cto.com/11794562/1899622

MySQL 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.