Innodb plugins 的安裝(二)

aaqwsh發表於2010-12-25
前面安裝新版本的沒有成功,暫時用老的試試:
 
這裡使用MySQL5.1.45和InnoDB Plugin1.0.6版本安裝,參考了網上的一些文章:
make clean
# autoreconf --force --install
# libtoolize --automake --force
# automake --force --add-missing
#設定一下 CFLAGS 和 CXXFLAGS,尤其要注意開啟 HAVE_DLOPEN 選項
 CFLAGS='-O2 -DHAVE_DLOPEN -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions -fstack-protector -param=ssp-buffer-size=4 -m64 -mtune=generic'
 CXXFLAGS='-O2 -DHAVE_DLOPEN -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions -fstack-protector -param=ssp-buffer-size=4 -m64 -mtune=generic'
 
./configure --prefix=/opt/mysqldata \
            --localstatedir=/opt/mysqldata/data \
            --with-charset=utf8 \
            --with-collation=utf8_general_ci \
            --with-extra-charsets=all \
            --with-plugins=partition,archive,csv,innobase,myisam,heap \
            --with-unix-socket-path=/opt/mysqldata/mysql.sock \
            --enable-local-infile \
            --enable-assembler \
            --with-client-ldflags=-all-static \
            --with-mysqld-ldflags=-all-static \
            --enable-thread-safe-client \
            --without-test
 
make
make install
cp support-files/my-small.cnf /etc/my.cnf
cp  support-files/mysql.server /etc/init.d/mysql
chmod u+x /etc/init.d/mysql
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R mysql:mysql *
chkconfig --add mysql
chkconfig --level 345 mysql on
 
service mysql restart
ln -s /opt/mysqldata/bin/mysql /sbin/mysql
ln -s /opt/mysqldata/bin/mysqladmin /sbin/mysqladmin
 
終於成功了:
mysql> show plugin
    -> ;
+---------------------+--------+--------------------+---------+---------+
| Name                | Status | Type               | Library | License |
+---------------------+--------+--------------------+---------+---------+
| binlog              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| partition           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| ARCHIVE             | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| CSV                 | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MEMORY              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| InnoDB              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_TRX          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS        | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS   | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP          | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET    | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| MyISAM              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MRG_MYISAM          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
+---------------------+--------+--------------------+---------+---------+
15 rows in set, 1 warning (0.00 sec)
 
mysql> select @@innodb_version;
+------------------+
| @@innodb_version |
+------------------+
| 1.0.6            |
+------------------+
1 row in set (0.00 sec)
mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| ARCHIVE    | YES     | Archive storage engine                                     | NO           | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables  | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance     | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)
 
mysql> show engine innodb status\G
*************************** 1. row ***************************
  Type: InnoDB
  Name:
Status:
=====================================
101225 17:23:29 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 6 seconds
----------
BACKGROUND THREAD
----------
srv_master_thread loops: 1 1_second, 1 sleeps, 0 10_second, 2 background, 2 flush
srv_master_thread log flush and writes: 1
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 7, signal count 7
Mutex spin waits 0, rounds 0, OS waits 0
RW-shared spins 7, OS waits 7; RW-excl spins 0, OS waits 0
Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 301
Purge done for trx's n:o < 0 undo n:o < 0
History list length 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started, process no 23607, OS thread id 4639632
MySQL thread id 2, query id 9 localhost root
show engine innodb status
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (read thread)
I/O thread 4 state: waiting for i/o request (read thread)
I/O thread 5 state: waiting for i/o request (read thread)
I/O thread 6 state: waiting for i/o request (write thread)
I/O thread 7 state: waiting for i/o request (write thread)
I/O thread 8 state: waiting for i/o request (write thread)
I/O thread 9 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
0 OS file reads, 38 OS file writes, 16 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
0 inserts, 0 merged recs, 0 merges
Hash table size 553193, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 44244
Log flushed up to   44244
Last checkpoint at  44244
0 pending log writes, 0 pending chkp writes
11 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 136609792; in additional pool allocated 0
Dictionary memory allocated 20888
Buffer pool size   8191
Free buffers       8012
Database pages     178
Old database pages 0
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 0, created 178, written 189
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s
LRU len: 178, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 23607, id 2950171536, state: waiting for server activity
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
1 row in set (0.00 sec)

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-682603/,如需轉載,請註明出處,否則將追究法律責任。

相關文章