您好,登錄后才能下訂單哦!
由MySQL AB公司開(kāi)發(fā),是最流行的開(kāi)放源碼SQL數(shù)據(jù)庫(kù)管理系統(tǒng),主要特點(diǎn):
1、是一種數(shù)據(jù)庫(kù)管理系統(tǒng)
2、是一種關(guān)聯(lián)數(shù)據(jù)庫(kù)管理系統(tǒng)
3、是一種開(kāi)放源碼軟件,且有大量可用的共享MySQL軟件
4、MySQL數(shù)據(jù)庫(kù)服務(wù)器具有快速、可靠和易于使用的特點(diǎn)
5、MySQL服務(wù)器工作在客戶端/服務(wù)器模式下,或嵌入式系統(tǒng)中
InnoDB存儲(chǔ)引擎將InnoDB表保存在一個(gè)表空間內(nèi),該表空間可由數(shù)個(gè)文件創(chuàng)建。這樣,表的大小就能超過(guò)單獨(dú)文件的最大容量。表空間可包括原始磁盤分區(qū),從而使得很大的表成為可能。表空間的最大容量為64TB。
2.1、編譯安裝前準(zhǔn)備
確認(rèn)系統(tǒng)環(huán)境
[root@lamp mysql]# uname -a
Linux lamp 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@lamp ~]# ll
-rw-r--r--. 1 root root 5691656 Mar 6 08:54 cmake-2.8.8.tar.gz
-rw-r--r--. 1 root root 24739429 Mar 6 09:04 mysql-5.5.28.tar.gz
[root@lamp ~]# rpm -qa gcc gcc-c++ openssl ncurses-devel
gcc-4.4.4-13.el6.x86_64
gcc-c++-4.4.4-13.el6.x86_64
ncurses-devel-5.7-3.20090208.el6.x86_64
openssl-1.0.0-4.el6.x86_64
安裝前需確認(rèn)開(kāi)發(fā)環(huán)境組是否安裝:Development Tools(開(kāi)發(fā)工具)和Development Libraries(開(kāi)發(fā)庫(kù))
[root@lamp ~]# yum groupinstall "Development Tools"
[root@lamp ~]# yum groupinstall "Development Libraries"
** mysql數(shù)據(jù)庫(kù)隨著時(shí)間的增長(zhǎng),數(shù)據(jù)會(huì)越來(lái)越大,所以應(yīng)該把數(shù)據(jù)庫(kù)數(shù)據(jù)放置在一個(gè)單獨(dú)的可擴(kuò)展的分區(qū)卷上,以便后期管理和備份,掛載在邏輯卷,方法如下:
[root@lamp ~]# fdisk /dev/sda #新建分區(qū)
aCommand (m for help): n
p
Partition number (1-4): 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): +10G
Command (m for help): T
Hex code (type L to list codes): 8e
Command (m for help): p
Device Boot Start End Blocks Id System
/dev/sdb1 1 1306 10490413+ 8e Linux LVM
Command (m for help): w
[root@lamp ~]# partprobe /dev/sda #通知內(nèi)核重讀sda分區(qū)
[root@lamp ~]# fdisk -l #查看分區(qū)
Device Boot Start End Blocks Id System
/dev/sdb1 1 2612 20980858+ 8e Linux LVM
[root@lamp ~]# pvcreate /dev/sda1 #先把/dev/sda1分區(qū)建立一個(gè)pv物理卷
Physical volume "/dev/sda1" successfully created
[root@lamp ~]# pvs #查看物理卷
PV VG Fmt Attr PSize PFree
/dev/sdb1 lvm2 a- 10.00g 10.00g
[root@lamp ~]# vgcreate myvg /dev/sda1 #以/dev/sda1分區(qū)創(chuàng)建myvg卷組
Volume group "myvg" successfully created
[root@lamp ~]# vgs #查看卷組
VG #PV #LV #SN Attr VSize VFree
myvg 1 0 0 wz--n- 10.00g 10.00g
[root@lamp ~]# lvcreate -n mydata -L 10G myvg #在卷組myvg中建立一個(gè)大小為10G,
名稱為mydata 的邏輯卷
Logical volume "mydata" created
[root@lamp ~]# lvs #查看邏輯卷
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
mydata myvg -wi-a- 10.00g
[root@lamp ~]# mke2fs -t ext4 /dev/myvg/mydata #格式化mydata邏輯卷
[root@lamp ~]# mkdir /mydata #建立一個(gè)目錄作為掛載點(diǎn)
[root@lamp ~]# vim /etc/fstab #設(shè)定邏輯卷開(kāi)機(jī)自動(dòng)掛載
# /etc/fstab
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/myvg/mydata /mydata ext4 defaults 0 0 #新增該行內(nèi)容
[root@lamp ~]# mount -a #重讀/etc/fstab硬盤掛載文件,使得新增的分區(qū)掛載成功
[root@lamp ~]# mount #查看已經(jīng)掛載的分區(qū)
...
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/mapper/myvg-mydata on /mydata type ext4 (rw) #邏輯卷mydata已經(jīng)掛載到/mydata目錄
[root@lamp ~]# mkdir /mydata/data
[root@lamp ~]# ll /mydata
總用量 20
drwxr-xr-x. 2 root root 4096 2月 17 17:30 data
drwx------. 2 root root 16384 2月 17 15:11 lost+found
[root@lamp ~]# groupadd -r mysql #-r建立一個(gè)系統(tǒng)組
groupadd: group 'mysql' already exists
[root@lamp ~]# useradd -r -g mysql -s /sbin/nologin mysql #建立一個(gè)系統(tǒng)用戶不能登錄
useradd: user 'mysql' already exists
[root@lamp ~]# id mysql #查看用戶信息
uid=27(mysql) gid=27(mysql) groups=27(mysql)
[root@lamp ~]# chown -R mysql.mysql /mydata/data/ #更改文件夾屬主和屬組-R遞歸
[root@lamp ~]# ll /mydata
總用量 20
drwxr-xr-x. 2 mysql mysql 4096 2月 17 17:30 data
drwx------. 2 root root 16384 2月 17 15:11 lost+found
[root@lamp ~]# chmod o-rx /mydata/data/ #刪除/data組其他人的讀和執(zhí)行權(quán)限
[root@lamp ~]# ll /mydata
總用量 20
drwxr-x---. 2 mysql mysql 4096 2月 17 17:30 data
drwx------. 2 root root 16384 2月 17 15:11 lost+found
2.2、編譯安裝cmake-2.8.8.tar.gz:
[root@lamp ~]# tar vxf cmake-2.8.8.tar.gz
[root@lamp ~]# cd cmake-2.8.8
[root@lamp cmake-2.8.8]# ./configure
[root@lamp cmake-2.8.8]# make && make install
...........
-- Installing: /usr/local/doc/cmake-2.8/ccmake.docbook
-- Installing: /usr/local/share/aclocal/cmake.m4 #編譯安裝cmake完成
2.3、使用cmake編譯安裝mysql5.5.28:
清理此前的編譯所生成的文件,則需使用如下命令:make clean
[root@lamp ~]# tar vxf mysql-5.5.28.tar.gz
[root@lamp ~]# cd mysql-5.5.28
[root@lamp mysql-5.5.28]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
# -DCMKE_INSTALL_PREFIX=安裝路徑,-DMYSQL_DATADIR=數(shù)據(jù)存放路徑,-DSYSCONFDIR=配置文件路徑,
-DWITH_INNOBASE_STORAGE_ENGINE=1 (是否包含INNOBASE引擎1表示包含0表示不包含),
-DWITH_ARCHIVE_STORAGE_ENGINE=1 (是否包含ARCHIVE引擎1表示包含0表示不包含),
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 (是否包含BLACKHOLE空洞引擎1表示包含0表示不包含),
.........
-- Performing Test HAVE_PEERCRED - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /root/mysql-5.5.28 #編譯完成
[root@lamp mysql-5.5.28]# make && make install
.......
-- Installing: /usr/local/mysql/man/man1/mysql.1
-- Installing: /usr/local/mysql/man/man1/mysql-test-run.pl.1
-- Installing: /usr/local/mysql/man/man8/mysqld.8 #安裝mysql完成
2.4、配置mysql腳本讓其開(kāi)機(jī)自動(dòng)啟動(dòng)及運(yùn)行:
[root@lamp mysql-5.5.28]# chown -R :mysql /usr/local/mysql #更改組為mysql
[root@lamp mysql-5.5.28]# cd /usr/local/mysql
[root@lamp mysql]# scripts/mysql_install_db --user=mysql --datadir=/mydata/data #初始化mysql,指定用戶和數(shù)據(jù)目錄
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h lamp password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script! #初始化完成
[root@lamp mysql]# mv /etc/my.cnf /etc/my.cnf.back #把原系統(tǒng)中配置文檔改名
[root@lamp mysql]# cp support-files/my-large.cnf /etc/my.cnf #復(fù)制配置文檔至/etc目錄
[root@lamp mysql]# cp support-files/mysql.server /etc/init.d/mysqld #復(fù)制啟動(dòng)腳本至/etc/init.d目錄中
[root@lamp mysql]# chkconfig --add mysqld #把mysqld啟動(dòng)腳本加到開(kāi)機(jī)啟動(dòng)列表
[root@lamp mysql]# chkconfig --list mysqld #查看mysqld腳本是否開(kāi)機(jī)啟動(dòng)
mysqld 0:off1:off2:on3:on4:on5:on6:off
[root@lamp mysql]# service mysqld start #啟動(dòng)mysql腳本
Starting MySQL... [ OK ]
[root@lamp mysql]# vim /etc/profile.d/mysql.sh #編輯環(huán)境變量使得mysql命令在PATH變量中
export PATH=$PATH:/usr/local/mysql/bin #新增該行內(nèi)容
[root@lamp mysql]# . /etc/profile.d/mysql.sh #讀取mysql.sh腳本的內(nèi)容
[root@lamp mysql]# echo $PATH #輸出PATH變量?jī)?nèi)容
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/mysql/bin #PATH變量中的路徑已生效
[root@lamp mysql]# mysql #啟動(dòng)mysql客戶端程序
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.28-log Source distribution
mysql> SHOW DATABASES; #查看基本數(shù)據(jù)
mysql> SHOW ENGINES; #查看支持的引擎
| Engine | Support | Comment | Transactions | XA | Savepoints |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys ...
| BLACKHOLE|YES|/dev/null storage engine (anything you write to it disappears)|YES|YES| YES|
| CSV | YES | CSV storage engine| MRG_MYISAM | ...
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |...
+----------+---------+--------------------------+--------------+------+------------+
8 rows in set (0.00 sec)
mysql> \q #退出mysql
Bye
[root@lamp mysql]# vim /etc/my.cnf #修改mysql的配置文檔
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8 #線程數(shù)量需要與實(shí)際一樣
datadir = /mydata/data #新增此行,指定mysql數(shù)據(jù)路徑
[root@lamp mysql]# mysql
mysql> USE mysql; #設(shè)定mysql數(shù)據(jù)庫(kù)為默認(rèn)database
Database changed
mysql> SELECT User,Host,Password FROM user; #查詢user表中關(guān)于User,Host,密碼三個(gè)字段的信息
+------+-----------+----------+
| User | Host | Password |
+------+-----------+----------+
| root | localhost | |
| root | lamp | |
| root | 127.0.0.1 | |
| root | ::1 | |
| | localhost | |
| | lamp | |
+------+-----------+----------+
6 rows in set (0.00 sec)
mysql> DROP USER ''@localhost; #刪除初始的匿名登錄用戶
Query OK, 0 rows affected (0.00 sec)
mysql> DROP USER ''@lamp; #刪除初始的匿名登錄用戶
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT User,Host,Password FROM user; #再次查看,匿名用戶已經(jīng)刪除成功
+------+-----------+----------+
| User | Host | Password |
+------+-----------+----------+
| root | localhost | |
| root | lamp | |
| root | 127.0.0.1 | |
| root | ::1 | |
+------+-----------+----------+
4 rows in set (0.00 sec)
mysql> UPDATE user SET Password=PASSWORD('123456') WHERE user='root'; #設(shè)定root用戶的密碼
Query OK, 4 rows affected (0.02 sec)
Rows matched: 4 Changed: 4 Warnings: 0
mysql> SELECT User,Host,Password FROM user; #再次查看,所有root用戶已經(jīng)設(shè)置好密碼
+------+-----------+-------------------------------------------+
| User | Host | Password |
+------+-----------+-------------------------------------------+
| root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | lamp | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | 127.0.0.1 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | ::1 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+-----------+-------------------------------------------+
4 rows in set (0.00 sec)
mysql> FLUSH PRIVILEGES; #使設(shè)置立即生效
Query OK, 0 rows affected (0.00 sec)
[root@lamp mysql]# mysql #再次登錄mysql,提示錯(cuò)誤,因?yàn)橐呀?jīng)設(shè)定了密碼。
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@lamp mysql]# mysql -uroot -p #從本機(jī)登錄mysql,輸入剛設(shè)定的密碼
Enter password: 123456
mysql> #正常登錄mysql
3.2. 如何設(shè)定本機(jī)本地登錄mysql不用輸入密碼:
在家目錄下,新建一個(gè).my.cnf文檔,里面添加以下內(nèi)容:
[root@lamp ~]# vim .my.cnf
[client]
user=root
host=localhost
password=123456
#即使root用戶設(shè)定了密碼,也可以免密碼直接讀取家目錄下面的.my.cnf的隱藏文件進(jìn)行登錄認(rèn)證。
3.3. 為innodb引擎設(shè)置了每表都單獨(dú)為一個(gè)空間
[root@lamp ~]# cd /mydata/data/mysql
[root@lamp mysql]# ll
total 1016
-rw-rw----. 1 mysql mysql 8820 May 11 16:12 columns_priv.frm
-rw-rw----. 1 mysql mysql 0 May 11 16:12 columns_priv.MYD
-rw-rw----. 1 mysql mysql 4096 May 11 16:12 columns_priv.MYI
-rw-rw----. 1 mysql mysql 9582 May 11 16:12 db.frm #MyISAM引擎 表的結(jié)構(gòu)文件
-rw-rw----. 1 mysql mysql 880 May 11 16:12 db.MYD #MyISAM引擎 存放數(shù)據(jù)的文件
-rw-rw----. 1 mysql mysql 5120 May 11 16:12 db.MYI #MyISAM引擎 數(shù)據(jù)索引文件
-rw-rw----. 1 mysql mysql 10223 May 11 16:12 event.frm
-rw-rw----. 1 mysql mysql 0 May 11 16:12 event.MYD
-rw-rw----. 1 mysql mysql 2048 May 11 16:12 event.MYI
...
mysql> mysql
mysql> SHOW VARIABLES LIKE '%innodb%'; #查看關(guān)于innodb引擎的相關(guān)變量參數(shù)
+----------------------------+------------------------+
| Variable_name | Value |
+----------------------------+------------------------+
| have_innodb | YES |
| ignore_builtin_innodb | OFF |
| innodb_adaptive_flushing | ON |
| innodb_adaptive_hash_index | ON |
| innodb_additional_mem_pool_size | 8388608 |
| innodb_autoextend_increment | 8 |
| innodb_autoinc_lock_mode | 1 |
| innodb_buffer_pool_instances | 1 |
| innodb_buffer_pool_size | 134217728 |
| innodb_change_buffering | all |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | 1 |
| innodb_file_format | Antelope |
| innodb_file_format_check | ON |
| innodb_file_format_max | Antelope |
| innodb_file_per_table | OFF | #該項(xiàng)表示innodb引擎是否每個(gè)表都開(kāi)啟獨(dú)立空間
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method |
[root@lamp mysql]# vim /etc/my.cnf #編輯mysql配置文件,開(kāi)啟innodb引擎對(duì)于每個(gè)表的獨(dú)立空間
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
innodb_file_per_table = 1 # 增加此行,1為啟用,0為禁用
[root@lamp mysql]# service mysqld restart #重啟mysql服務(wù)
Shutting down MySQL. [ OK ]
Starting MySQL.. [ OK ]
[root@lamp mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
...
mysql> SHOW VARIABLES LIKE '%innodb%';
+---------------------------------+------------------------+
| Variable_name | Value |
+---------------------------------+------------------------+
...
| innodb_file_format_max | Antelope |
| innodb_file_per_table | ON | #已經(jīng)為innodb引擎設(shè)置了每表都單獨(dú)為一個(gè)空間
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
mysql> CREATE DATABASE mydb; #創(chuàng)建新的數(shù)據(jù)庫(kù)
Query OK, 1 row affected (0.00 sec)
mysql> USE mydb; #設(shè)定mydb為默認(rèn)數(shù)據(jù)庫(kù)
Database changed
mysql> CREATE TABLE testdb(id INT NOT NULL,name CHAR(30)); #建立testdb表2行
Query OK, 0 rows affected (0.03 sec)
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mydb |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
mysql> SHOW TABLES FROM mydb; #mydb數(shù)據(jù)庫(kù)中包含的表
+----------------+
| Tables_in_mydb |
+----------------+
| testdb |
+----------------+
1 row in set (0.00 sec)
[root@lamp ~]# cd /mydata/data/mydb
[root@lamp mydb]# ll -h
total 112K
-rw-rw----. 1 mysql mysql 61 Apr 18 15:25 db.opt
-rw-rw----. 1 mysql mysql 8.4K Apr 18 15:27 testdb.frm #test表的結(jié)構(gòu)文件存放
-rw-rw----. 1 mysql mysql 96K Apr 18 15:27 testdb.ibd #test表的數(shù)據(jù)和索引文件
[root@lamp ~]# vim test.sql
CREATE DATABASE testdb; #創(chuàng)建一個(gè)testdb數(shù)據(jù)庫(kù)
CREATE TABLE testdb.tb1(id INT,name CHAR(20)); #在testdb庫(kù)中建立tb1表。
mysql> \. /root/test.sql #把test.sql中的內(nèi)容導(dǎo)入到mysql內(nèi)執(zhí)行,
或者不進(jìn)入數(shù)據(jù),直接執(zhí)行:mysql < /root/test.sql 輸入重定向一樣。
Query OK, 1 row affected (0.00 sec)
Query OK, 0 rows affected (0.02 sec)
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mydb |
| mysql |
| performance_schema |
| test |
| testdb |
+--------------------+
6 rows in set (0.00 sec)
mysql> USE testdb
Database changed
mysql> SHOW TABLES;
+------------------+
| Tables_in_testdb |
+------------------+
| tb1 |
+------------------+
1 row in set (0.00 sec)
mysql> DROP DATABASE testdb; #刪除testdb庫(kù)
Query OK, 1 row affected (0.01 sec)
附1:
編譯mysql出現(xiàn)CMake Error atcmake/readlineNaNake:83
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readlineNaNake:83 (MESSAGE):
Curses library not found. Please installappropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu,package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readlineNaNake:127 (FIND_CURSES)
cmake/readlineNaNake:217(MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:257 (MYSQL_CHECK_READLINE)
-- Configuring incomplete, errors occurred!
該報(bào)錯(cuò)原因是未安裝ncurses-devel,運(yùn)行下面命令
第一步:安裝
#yum -y install ncurses-devel
第二步:刪除CMakeCache.txt
這里是因?yàn)?,我們?cè)诙啻芜\(yùn)行cmake有個(gè)文件我們需要?jiǎng)h除,刪除當(dāng)前目錄下CMakeCache.txt文件并重新編譯,再次運(yùn)行cmake命令就會(huì)正常!
[root@mysql mysql-5.6.12]# rm -rf CMakeCache.txt
或者通過(guò)find命令找到所有CMakeCache.txt文檔的位置
#find / -name CMakeCache.txt
然后全部刪除:
# rm -rf/usr/local/src/cmake-2.8.6/Tests/Complex/Cache/CMakeCache.txt
# rm -rf/usr/local/src/cmake-2.8.6/Tests/ComplexOneConfig/Cache/CMakeCache.txt
# rm -rf /usr/local/src/cmake-2.8.6/Tests/ComplexRelativePaths/Cache/CMakeCache.txt
# rm -rf /usr/local/src/mysql-5.5.18/CMakeCache.txt
全部刪除后再重新cmake就OK了。
附2:
mysql5.5.28.tar.gz下載地址:http://down.51cto.com/data/700556
cmake-2.8.8.tar.gz下載地址:http://vdisk.weibo.com/s/usonnBN1894A3
---end---
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。