環(huán)境:
[root@www.linuxidc.com ~]# lsb_release -a
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.下載安裝cmark
下載地址: http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
# cd cmake-version
# ./configure
# make
# make install
2.下載安裝mysql
下載地址: http://www.mysql.com/downloads/mysql/
# groupadd mysql
# useradd -r -g mysql 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
安裝完成后可能登陸root用戶沒有設(shè)置密碼,因此要設(shè)置密碼
# /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: <輸入新設(shè)的密碼newpassword>
mysql>show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|