Environment:
Root@www.bkjia.com ~ # 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)