Install Cmake
1. download cmake source code at http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
2. ./configure & make & make install
1. cmake -DCMAKE_INSTALL_PREFIX=/root/wyg/mysql/mysql-5.7.4-m14/install_dir -DMYSQL_DATADIR=/root/wyg/mysql/mysql-5.7.4-m14/install_dir/data -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/root/wyg.mysql/mysql-5.7.4-m14/install_dir/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1
2. make
3 make install
error:
150102 07:38:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql2015-01-02T15:38:50.816712Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation formore details).2015-01-02T15:38:50.816831Z 0 [Note] /root/wyg/mysql/mysql-5.7.4-m14/install_dir/bin/mysqld (mysqld 5.7.4-m14) starting as process 24795...2015-01-02T15:38:50.820220Z 0 [Note] Plugin 'FEDERATED' isdisabled.
mysqld: Table'mysql.plugin' doesn't exist
2015-01-02T15:38:50.820709Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-01-02T15:38:50.820841Z 0 [Note] InnoDB: Using atomics to ref count buffer pool pages2015-01-02T15:38:50.820851Z 0 [Note] InnoDB: Mutexes andrw_locks use GCC atomic builtins2015-01-02T15:38:50.820855Z 0 [Note] InnoDB: Uses event mutexes2015-01-02T15:38:50.820859Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-01-02T15:38:50.823055Z 0 [Note] InnoDB: Number of pools: 1
2015-01-02T15:38:50.823158Z 0 [Note] InnoDB: Using CPU crc32 instructions2015-01-02T15:38:50.823775Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128.0M, instances = 1
fix:
sudo ./scripts/mysql_install_db --user=mysql --datadir=/root/wyg/mysql/mysql-5.7.4-m14/install_dir/data
error:
Installing MySQL system tables...2015-01-02T16:29:37.730743Z 1 [ERROR] 1 Can't create/write to file'/root/wyg/mysql/mysql-5.7.4-m14/install_dir/data/mysql/db.MYI'(Errcode: 13 - Permission denied)
2015-01-02T16:29:37.730826Z 0 [ERROR] Aborting