CentOS 6.6 MySQL 5.5.32 Green Edition installation configuration

Source: Internet
Author: User
Tags administrator password

MySQL 5.5.32 Green Edition installation configuration

    1. Basic information

System version: CentOS 6.6

MySQL version:5.5.32 Green Edition

    1. Initialize MySQL, there is a yellow section two OK, indicating correct initialization

[[email protected] tools]# useradd-s/sbin/nologin-m MySQL

[Email protected] tools]# tar zxvfmysql-5.5.32-linux2.6-x86_64.tar.gz

[Email protected] tools]# mvmysql-5.5.32-linux2.6-x86_64/application/mysql-5.5.32

[Email protected] tools]# Ln-s/application/mysql-5.5.32/application/mysql

[Email protected] application]#/application/mysql/scripts/mysql_install_db--basedir=/application/mysql/-- datadir=/application/mysql/data/--user=mysql

Installing MySQL system tables ...

Ok

Filling Help Tables ...

Ok

To start mysqld at boot timeyou with to copy

Support-files/mysql.server tothe right place for your system

REMEMBER to SET Apassword for the MySQL root USER!

To does 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 lnmp02 password ' new-password '

Alternatively you can run:

/application/mysql//bin/mysql_secure_installation

Which would also give you theoption of removing the test

Databases and anonymous usercreated by default. This is

Strongly recommended forproduction servers.

See the Manual for Moreinstructions.

You can start the MySQL daemonwith:

cd/application/mysql/,/application/mysql//bin/mysqld_safe &

You can test the MySQL daemonwith mysql-test-run.pl

Cd/application/mysql//mysql-test; Perl mysql-test-run.pl

Problems Withthe/application/mysql//scripts/mysqlbug script!

    1. change The/application/mysql owner and Group,CP config file, change the path in MySQL startup script

[Email protected] ~]# chown-rmysql.mysql/application/mysql/

[Email protected] ~]# CP/APPLICATION/MYSQL/SUPPORT-FILES/MY-SMALL.CNF/ETC/MY.CNF

[[email protected] ~]# sed-i ' s#/usr/local/mysql#/application/mysql#g '/application/mysql/bin/mysqld_safe # # # Modify the installation path in the script

[[Email protected] ~]#/application/mysql/bin/mysqld_safe & # # # starts MySQL in the background process mode

    1. View does MySQL start normally

[Email protected] ~]# lsof-i:3306

[Email protected] ~]# Netstat-tulpn|grep 3306

[Email protected] ~]# Ps-ef|grepmysql

    1. Configuring Environment variables

[Email protected] ~]# echo "Path=/application/mysql/bin: $PATH" >>/etc/profile

[Email protected] ~]# Source/etc/profile

[[email protected] ~]# which MySQL # # determine if it is a green version of MySQL instead of yum installed MySQL

/application/mysql/bin/mysql

    1. Login Mysql

[[email protected] ~]# MySQL

Welcome to the Mysqlmonitor. Commands End With; or \g.

Your MySQL Connection ID is 3

Server version:5.5.32 mysqlcommunity Server (GPL)

Copyright (c), 2013,oracle and/or its affiliates. All rights reserved.

Oracle is a registeredtrademark of the Oracle Corporation and/or its

Affiliates. Other names Betrademarks of their respective

Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql>

    1. Configure the traditional way to start Mysql

[Email protected] ~]# Cp/application/mysql/support-files/mysql.server/etc/init.d/mysqld

[[email protected] ~]# sed-i ' s#/usr/local/mysql#/application/mysql#g '/etc/init.d/mysqld # # Modify the MySQL installation path

[[email protected] ~]# Killall mysqld # # # kills the MySQL process started before

[[email protected] ~]# lsof-i:3306 # # # Confirm whether the MySQL process has been killed

[[email protected] ~]#/etc/init.d/mysqld Start # # # Restart the MySQL process in the traditional way

    1. set the MySQL administrator password, the default administrator is the root user

[Email protected] ~]# mysqladmin-uroot password "123456"

[[email protected] ~]# mysql-uroot-p123456 # # # login to MySQL, note that there can be no space between-p and password

[[email protected] ~]# mysqladmin-uroot-p123456 password "wangning" # # # Change Password

    1. Viewing the error log

[Email protected] ~]# Cat/application/mysql/data/lnmp02.err # # # # This error log file is named with the hostname plus the. err suffix .


This article is from the "Galloping Camel" blog, make sure to keep this source http://wn2100.blog.51cto.com/9915310/1941597

CentOS 6.6 MySQL 5.5.32 Green Edition installation configuration

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.