MySQL 5.5.32 Green Edition installation configuration
Basic information
System version: CentOS 6.6
MySQL version:5.5.32 Green Edition
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!
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
View does MySQL start normally
[Email protected] ~]# lsof-i:3306
[Email protected] ~]# Netstat-tulpn|grep 3306
[Email protected] ~]# Ps-ef|grepmysql
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
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>
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
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
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