Environment:
[Root @ Linux ~] # Lsb_release-
LSB version: core-3.1-ia32: core-3.1-noarch: graphics-3.1-ia32: graphics-3.1-noarch
Distributor ID: centos
Description: centos release 5.5 (final)
Release: 5.5
Codename: Final
1. Download and install cmark
: Http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
# Cd cmake-version
#./Configure
# Make
# Make install
2. Download and install MySQL
: Http://www.mysql.com/downloads/mysql/
# Groupadd MySQL
# Useradd-r-g MySQL
# Tar zxvf mysql-VERSION.tar.gz
# Cd mysql-version
# Cmake.
# Make
# Make install
# Cd/usr/local/MySQL
# Chown-r MySQL.
# Chgrp-r MySQL.
# Scripts/mysql_install_db -- user = MySQL
# Chown-r root.
# Chgrp-r Mysql Data
# Cp support-files/my-medium.cnf/etc/My. CNF
# Bin/mysqld_safe -- user = MySQL &
# Cp support-files/MySQL. Server/etc/init. d/MySQL. Server
After the installation is complete, you may log on to the root user without setting a password. Therefore, you must set a password.
#/Etc/init. d/MySQL stop
# Mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# Mysql-u root MySQL
Mysql> Update user SET Password = PASSWORD ('newpassword') where user = 'root ';
Mysql> flush privileges;
Mysql> quit
#/Etc/init. d/MySQL restart
# Mysql-uroot-P
Enter Password: <enter the new password newpassword>
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| MySQL |
| Performance_schema |
| Test |
+ -------------------- +
4 rows in SET (0.00 Sec)