MYSQL Study案例之--RedHat EL55源码安装Mysql-5.6
MYSQL Study案例之--RedHat EL55源码安装Mysql-5.6
系统环境:
操作系统:RedHat EL55
DB Soft: Mysql 5.6.4-m7
1、系统环境
[root@rh55 Packages]# uname -a Linux rh6 2.6.18-194.el5.xen #1 SMP Tue Jan 29 11:47:41 EST 2013 i386 i686 GNU/Linux [root@rh55 Packages]#
2、安装cmake软件
对于RedHat EL55系统,安装光盘不包含cmake文件,需要从网上下载安装
下载地址:http://www.cmake.org/download/
[root@rh55 soft]# ls
cmake-3.2.3 cmake-3.2.3.tar.gz
[root@rh55 soft]# tar zxvf cmake-3.2.3.tar.gz
cmake-3.2.3/Utilities/cmliblzma/liblzma/delta/delta_decoder.h cmake-3.2.3/Utilities/cmliblzma/liblzma/delta/delta_encoder.c cmake-3.2.3/Utilities/cmliblzma/liblzma/delta/delta_encoder.h cmake-3.2.3/Utilities/cmliblzma/liblzma/delta/delta_private.h cmake-3.2.3/Utilities/cmliblzma/liblzma/liblzma.pc.in cmake-3.2.3/Utilities/cmliblzma/liblzma/liblzma_w32res.rc cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_decoder.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_decoder.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_encoder.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_encoder.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash_table.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lz/lz_encoder_mf.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/fastpos.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/fastpos_table.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/fastpos_tablegen.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/lzma2_decoder.c cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/lzma2_decoder.h cmake-3.2.3/Utilities/cmliblzma/liblzma/lzma/lzma2_encoder.c ......
通过源码包编译安装cmake:
[root@rh55 cmake-3.2.3]# ./configure --prefix=/usr/local/cmake
CMake 3.2.3, Copyright 2000-2015 Kitware, Inc. Found GNU toolchain C compiler on this system is: gcc C++ compiler on this system is: g++ Makefile processor on this system is: gmake g++ is GNU compiler g++ has setenv g++ has unsetenv g++ does not have environ in stdlib.h g++ has STL in std:: namespace g++ has ANSI streams g++ has streams in std:: namespace g++ has sstream g++ has operator!=(string, char*) g++ has stl iterator_traits g++ has standard template allocator g++ has allocator<>::rebind<> g++ does not have non-standard allocator<>::max_size argument g++ has stl containers supporting allocator objects g++ has stl wstring g++ has header cstddef g++ requires template friends to use <> g++ supports member templates g++ has standard template specialization syntax g++ has argument dependent lookup .......
[root@rh55 cmake-3.2.3]# make
Scanning dependencies of target cmIML_test [ 0%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test.c.o [ 0%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_ABI_C.c.o [ 0%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_INT_C.c.o [ 0%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_include_C.c.o [ 1%] Building CXX object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_ABI_CXX.cxx.o [ 1%] Building CXX object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_INT_CXX.cxx.o [ 1%] Building CXX object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_include_CXX.cxx.o Linking CXX executable cmIML_test [ 1%] Built target cmIML_test Scanning dependencies of target cmsys [ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.c.o [ 1%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Base64.c.o [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/EncodingC.c.o [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/MD5.c.o [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/Terminal.c.o [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/System.c.o [ 2%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/String.c.o [ 2%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Directory.cxx.o [ 3%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/DynamicLoader.cxx.o [ 3%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/EncodingCXX.cxx.o [ 3%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/Glob.cxx.o ...... [100%] Built target foo
[root@rh55 cmake-3.2.3]# make install
[ 1%] Built target cmIML_test [ 4%] Built target cmsys [ 4%] Built target cmsysTestDynload [ 5%] Built target cmsys_c [ 5%] Built target cmsysTestProcess [ 5%] Built target cmsysTestSharedForward [ 6%] Built target cmsysTestsC [ 8%] Built target cmsysTestsCxx [ 10%] Built target cmzlib [ 28%] Built target cmcurl [ 28%] Built target LIBCURL [ 29%] Built target cmcompress [ 30%] Built target cmbzip2 [ 41%] Built target cmliblzma [ 58%] Built target cmlibarchive [ 59%] Built target cmexpat [ 59%] Built target cmjsoncpp [ 66%] Built target cmForm [ 84%] Built target CMakeLib [ 87%] Built target CPackLib [ 95%] Built target CTestLib ...... Installing: /usr/local/cmake/bin/cmake -- Installing: /usr/local/cmake/bin/ctest -- Installing: /usr/local/cmake/bin/cpack -- Installing: /usr/local/cmake/share/cmake-3.2/include/cmCPluginAPI.h -- Installing: /usr/local/cmake/share/cmake-3.2/editors/vim/cmake-help.vim -- Installing: /usr/local/cmake/share/cmake-3.2/editors/vim/cmake-indent.vim -- Installing: /usr/local/cmake/share/cmake-3.2/editors/vim/cmake-syntax.vim -- Installing: /usr/local/cmake/share/cmake-3.2/editors/emacs/cmake-mode.el -- Installing: /usr/local/cmake/share/aclocal/cmake.m4 -- Installing: /usr/local/cmake/share/cmake-3.2/completions/cmake -- Installing: /usr/local/cmake/share/cmake-3.2/completions/cpack -- Installing: /usr/local/cmake/share/cmake-3.2/completions/ctest
安装完成校验:
[root@rh55 ~]# cd /usr/local/cmake
[root@rh55 cmake]# ls -l
total 12
drwxr-xr-x 2 root root 4096 Jun 9 17:47 bin
drwxr-xr-x 3 root root 4096 Jun 9 17:47 doc
drwxr-xr-x 4 root root 4096 Jun 9 17:47 share
[root@rh55 cmake]# cd bin
[root@rh55 bin]# ls -l
total 41812
-rwxr-xr-x 1 root root 10054392 Jun 9 17:46 ccmake
-rwxr-xr-x 1 root root 9969999 Jun 9 17:46 cmake
-rwxr-xr-x 1 root root 10764389 Jun 9 17:46 cpack
-rwxr-xr-x 1 root root 11948376 Jun 9 17:46 ctest
建立可执行文件查找路径:
[root@rh55 bin]# cat /etc/profile
export PATH=$PATH:/usr/local/cmake/bin
cmake安装成功后,安装mysql源码包:
3、源码安装mysql
[root@rh55 Packages]# cd /home/oracle/mysql-5.6.4-m7
[root@rh55 mysql-5.6.4-m7]# ls
BUILD config.h.cmake extra libservices README storage vio
BUILD-CMAKE configure.cmake include man regex strings win
client COPYING INSTALL-SOURCE mysql-test scripts support-files zlib
cmake dbug INSTALL-WIN-SOURCE mysys sql tests
CMakeLists.txt Docs libmysql packaging sql-bench unittest
cmd-line-utils Doxyfile-perfschema libmysqld plugin sql-common VERSION
查看编译环境:
[root@rh55 mysql-5.6.4-m7]# cmake ./ -- Check size of wchar_t - done -- Check size of wctype_t -- Check size of wctype_t - done -- Check size of wint_t -- Check size of wint_t - done -- Found Curses: /usr/lib64/libcurses.so -- Looking for tputs in /usr/lib64/libcurses.so -- Looking for tputs in /usr/lib64/libcurses.so - found -- Performing Test HAVE_DECL_TGOTO -- Performing Test HAVE_DECL_TGOTO - Success -- Looking for strvis -- Looking for strvis - not found -- Looking for strunvis -- Looking for strunvis - not found -- Looking for include files HAVE_LIBAIO_H -- Looking for include files HAVE_LIBAIO_H - found -- Looking for io_queue_init in aio -- Looking for io_queue_init in aio - found -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS -- Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS - Success -- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC -- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success -- Check size of pthread_t -- Check size of pthread_t - done -- Performing Test HAVE_PEERCRED -- Performing Test HAVE_PEERCRED - Success -- Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source. -- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://foo.bar.com:80 -- Configuring done -- Generating done -- Build files have been written to: /home/oracle/mysql-5.6.4-m7
编译:
[root@rh55 mysql-5.6.4-m7]# make Scanning dependencies of target INFO_BIN [ 0%] Built target INFO_BIN Scanning dependencies of target INFO_SRC [ 0%] Built target INFO_SRC Scanning dependencies of target abi_check [ 0%] Built target abi_check [ 1%] Generating common.h [ 1%] Generating help.c [ 1%] Generating help.h [ 1%] Generating vi.h [ 1%] Generating emacs.h [ 1%] Generating fcns.c [ 1%] Generating fcns.h Scanning dependencies of target edit [ 1%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o [ 1%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chartype.c.o [ 1%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/el.c.o
安装:
[root@rh55 mysql-5.6.4-m7]# make install [ 0%] Built target INFO_BIN [ 0%] Built target INFO_SRC [ 0%] Built target abi_check [ 5%] Built target edit [ 6%] Built target mysqlservices [ 12%] Built target strings [ 25%] Built target mysys [ 25%] Built target dbug [ 25%] Built target comp_err [ 25%] Built target GenError [ 25%] Built target blackhole [ 25%] Built target example [ 25%] Built target archive [ 34%] Built target perfschema [ 35%] Built target mytap [ 35%] Built target pfs-t [ 35%] Built target pfs_account-oom-t [ 35%] Built target pfs_host-oom-t [ 36%] Built target pfs_instr-oom-t [ 36%] Built target pfs_instr-t [ 36%] Built target pfs_instr_class-oom-t [ 36%] Built target pfs_instr_class-t [ 36%] Built target pfs_user-oom-t
4、数据库初始化
[root@rh55 mysql-5.6.4-m7]# cd /usr/local/mysql [root@rh55 mysql]# ls bin data include lib mysql-test scripts sql-bench COPYING docs INSTALL-BINARY man README share support-files [root@rh55 mysql]# ls -l total 76 drwxr-xr-x 2 root root 4096 Jan 28 17:16 bin -rw-r--r-- 1 root root 17987 Dec 14 2011 COPYING drwxr-xr-x 4 root root 4096 Jan 28 17:16 data drwxr-xr-x 2 root root 4096 Jan 28 17:16 docs drwxr-xr-x 3 root root 4096 Jan 28 17:16 include -rw-r--r-- 1 root root 7369 Dec 14 2011 INSTALL-BINARY drwxr-xr-x 3 root root 4096 Jan 28 17:16 lib drwxr-xr-x 4 root root 4096 Jan 28 17:16 man drwxr-xr-x 10 root root 4096 Jan 28 17:16 mysql-test -rw-r--r-- 1 root root 2552 Dec 14 2011 README drwxr-xr-x 2 root root 4096 Jan 28 17:16 scripts drwxr-xr-x 27 root root 4096 Jan 28 17:16 share drwxr-xr-x 4 root root 4096 Jan 28 17:16 sql-bench drwxr-xr-x 2 root root 4096 Jan 28 17:16 support-files [root@rh55 mysql]# id mysql uid=27(mysql) gid=27(mysql) groups=27(mysql) [root@rh55 mysql]# chown -R mysql:mysql . [root@rh55 mysql]# ls -l total 76 drwxr-xr-x 2 mysql mysql 4096 Jan 28 17:16 bin -rw-r--r-- 1 mysql mysql 17987 Dec 14 2011 COPYING drwxr-xr-x 4 mysql mysql 4096 Jan 28 17:16 data drwxr-xr-x 2 mysql mysql 4096 Jan 28 17:16 docs drwxr-xr-x 3 mysql mysql 4096 Jan 28 17:16 include -rw-r--r-- 1 mysql mysql 7369 Dec 14 2011 INSTALL-BINARY drwxr-xr-x 3 mysql mysql 4096 Jan 28 17:16 lib drwxr-xr-x 4 mysql mysql 4096 Jan 28 17:16 man drwxr-xr-x 10 mysql mysql 4096 Jan 28 17:16 mysql-test -rw-r--r-- 1 mysql mysql 2552 Dec 14 2011 README drwxr-xr-x 2 mysql mysql 4096 Jan 28 17:16 scripts drwxr-xr-x 27 mysql mysql 4096 Jan 28 17:16 share drwxr-xr-x 4 mysql mysql 4096 Jan 28 17:16 sql-bench drwxr-xr-x 2 mysql mysql 4096 Jan 28 17:16 support-files [root@rh55 mysql]# scripts/mysql_install_db --user=mysql Installing MySQL system tables... 150128 17:21:30 InnoDB: The InnoDB memory heap is disabled 150128 17:21:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150128 17:21:30 InnoDB: Compressed tables use zlib 1.2.3 150128 17:21:30 InnoDB: Using Linux native AIO 150128 17:21:30 InnoDB: CPU does not support crc32 instructions 150128 17:21:30 InnoDB: Initializing buffer pool, size = 128.0M 150128 17:21:30 InnoDB: Completed initialization of buffer pool InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 150128 17:21:30 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 150128 17:21:31 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 150128 17:21:31 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created 150128 17:21:31 InnoDB: 128 rollback segment(s) are active. InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 150128 17:21:31 InnoDB: Waiting for the background threads to start ...... 150128 17:21:38 [Note] Shutting down plugin ‘mysql_native_password‘ 150128 17:21:38 [Note] Shutting down plugin ‘binlog‘ 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 rh6 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@rh55 mysql]# chown -R mysql:mysql ./data [root@rh55 mysql]# chmod -R ug+rws . [root@rh55 mysql]# ls -l total 76 drwsrwsr-x 2 mysql mysql 4096 Jan 28 17:16 bin -rwSrwSr-- 1 mysql mysql 17987 Dec 14 2011 COPYING drwsrwsr-x 4 mysql mysql 4096 Jan 28 17:16 data drwsrwsr-x 2 mysql mysql 4096 Jan 28 17:16 docs drwsrwsr-x 3 mysql mysql 4096 Jan 28 17:16 include -rwSrwSr-- 1 mysql mysql 7369 Dec 14 2011 INSTALL-BINARY drwsrwsr-x 3 mysql mysql 4096 Jan 28 17:16 lib drwsrwsr-x 4 mysql mysql 4096 Jan 28 17:16 man drwsrwsr-x 10 mysql mysql 4096 Jan 28 17:16 mysql-test -rwSrwSr-- 1 mysql mysql 2552 Dec 14 2011 README drwsrwsr-x 2 mysql mysql 4096 Jan 28 17:16 scripts drwsrwsr-x 27 mysql mysql 4096 Jan 28 17:16 share drwsrwsr-x 4 mysql mysql 4096 Jan 28 17:16 sql-bench drwsrwsr-x 2 mysql mysql 4096 Jan 28 17:16 support-files
5、查看mysql配置文件
[root@rh55 mysql]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
6、启动mysqld服务
[root@rh55 mysql]# bin/mysqld_safe --user=mysql & [1] 13138 [root@rh55 mysql]# 150128 17:25:19 mysqld_safe Logging to ‘/var/log/mysqld.log‘. 150128 17:25:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql [root@rh55 mysql]# ps -ef |grep mysql root 13138 2175 1 17:25 pts/0 00:00:00 /bin/sh bin/mysqld_safe --user=mysql mysql 13276 13138 3 17:25 pts/0 00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock [root@rh55 mysql]# netstat -an |grep :3306 tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 查看系统日志: [root@rh6 log]# more /var/log/mysqld.log 150128 17:25:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 150128 17:25:19 InnoDB: The InnoDB memory heap is disabled 150128 17:25:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150128 17:25:19 InnoDB: Compressed tables use zlib 1.2.3 150128 17:25:19 InnoDB: Using Linux native AIO 150128 17:25:19 InnoDB: CPU does not support crc32 instructions 150128 17:25:19 InnoDB: Initializing buffer pool, size = 128.0M 150128 17:25:19 InnoDB: Completed initialization of buffer pool 150128 17:25:19 InnoDB: highest supported file format is Barracuda. 150128 17:25:20 InnoDB: 128 rollback segment(s) are active. 150128 17:25:20 InnoDB: Waiting for the background threads to start 150128 17:25:21 InnoDB: 1.2.4 started; log sequence number 1602851 150128 17:25:21 [Warning] No existing UUID has been found, so we assume that this is the first time that this serv er has been started. Generating a new UUID: 94adecc3-a6cf-11e4-87f0-080027ac3540. 150128 17:25:21 [Note] Event Scheduler: Loaded 0 events 150128 17:25:21 [Note] /usr/local/mysql/bin/mysqld: ready for connections. Version: ‘5.6.4-m7‘ socket: ‘/var/lib/mysql/mysql.sock‘ port: 3306 Source distribution [root@rh6 log]#
7、修改root(mysql)用户口令
[root@rh55 mysql]# mysqladmin version mysqladmin Ver 8.42 Distrib 5.1.66, for redhat-linux-gnu on x86_64 Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.6.4-m7 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 11 min 16 sec Threads: 1 Questions: 1 Slow queries: 0 Opens: 66 Flush tables: 1 Open tables: 59 Queries per second avg: 0.001 [root@rh55 mysql]# mysqladmin -u root -p password "oracle" Enter password: mysqladmin: connect to server at ‘localhost‘ failed error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘ [root@rh6 mysql]# mysqladmin -u root -p password "oracle" Enter password: mysqladmin: connect to server at ‘localhost‘ failed error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘ [root@rh55 mysql]# mysqladmin -u root -p password "oracle" Enter password:
8、连接mysql server
[root@rh55 mysql]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.6.4-m7 Source distribution Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.01 sec) mysql> use test; Database changed mysql> show tables; Empty set (0.00 sec) mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +---------------------------+ | Tables_in_mysql | +---------------------------+ | columns_priv | | db | | event | | func | | general_log | | help_category | | help_keyword | | help_relation | | help_topic | | host | | innodb_index_stats | | innodb_table_stats | | ndb_binlog_index | | plugin | | proc | | procs_priv | | proxies_priv | | servers | | slave_master_info | | slave_relay_log_info | | slave_worker_info | | slow_log | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | +---------------------------+ 29 rows in set (0.00 sec) mysql>
9 查看mysql引擎
mysql> show engines; +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ | MyISAM | YES | MyISAM storage engine | NO | NO | NO | | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ 6 rows in set (0.01 sec) [root@rh6 bin]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.4-m7 Source distribution Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> show engines \G *************************** 1. row *************************** Engine: MyISAM Support: YES Comment: MyISAM storage engine Transactions: NO XA: NO Savepoints: NO *************************** 2. row *************************** Engine: InnoDB Support: DEFAULT Comment: Supports transactions, row-level locking, and foreign keys Transactions: YES XA: YES Savepoints: YES *************************** 3. row *************************** Engine: MRG_MYISAM Support: YES Comment: Collection of identical MyISAM tables Transactions: NO XA: NO Savepoints: NO *************************** 4. row *************************** Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance Schema Transactions: NO XA: NO Savepoints: NO *************************** 5. row *************************** Engine: CSV Support: YES Comment: CSV storage engine Transactions: NO XA: NO Savepoints: NO *************************** 6. row *************************** Engine: MEMORY Support: YES Comment: Hash based, stored in memory, useful for temporary tables Transactions: NO XA: NO Savepoints: NO 6 rows in set (0.01 sec)
默认引擎是:InnoDB
@至此,mysql安装已经完成!
本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/1660501
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。