MySQL5.7原始碼安裝問題彙總
編譯安裝mysql5.7版本,想試用一下新的版本特性,發現跟之前的5.6版本編譯有了一些變化,總結一下避免以後繼續入坑。5.6安裝方式
cmake版本
5.7編譯cmake要求版本最低為2.8,當前為2.6,所以需要升級cmake版本。資訊如下
shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data CMake Error at CMakeLists.txt:21 (CMAKE_MINIMUM_REQUIRED): CMake 2.8.2 or higher is required. You are running version 2.6.4 -- Configuring incomplete, errors occurred! shell> cmake --version cmake version 2.6-patch 4
cmake官網下載地址
shell> tar zxvf cmake-3.2.2.tar.gz shell> cd cmake-3.2.2/ shell> ./bootstrap shell> make && make install shell> cmake --version cmake version 3.2.2
BOOST庫
5.7編譯需要boost類庫,可使用 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=
問題描述 shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data CMake suite maintained and supported by Kitware (kitware.com/cmake). -- Could not find (the correct version of) boost. -- MySQL currently requires boost_1_57_0 CMake Error at cmake/boost.cmake:76 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=安裝boost庫 shell> tar jxvf boost_1_57_0.tar.bz2 shell> cd boost_1_57_0/ shell> ./bootstrap.sh shell> ./b2 install 安裝後目錄 shell> ls /usr/local/include/ boost shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data
mysql_install_db
之前版本mysql_install_db是在mysql_basedir/script下,5.7放在了mysql_install_db/bin目錄下,且已被廢棄。
shell> cd /db/mysql/mysql_57 shell> bin/mysql_install_db --basedir=. --datadir=data --user=mysql [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize shell> bin/mysqld --initialize 2015-04-21T18:17:53.169216Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2015-04-21T18:17:58.702510Z 0 [Warning] InnoDB: New log files created, LSN=45790 2015-04-21T18:17:59.538811Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2015-04-21T18:17:59.646010Z 0 [Warning] Failed to setup SSL 2015-04-21T18:17:59.646105Z 0 [Warning] SSL error: SSL context is not usable without certificate and private key 2015-04-21T18:17:59.663795Z 1 [Warning] A temporary password is generated for root@localhost: rq/Oh8VWs1Yh
初始化密碼
mysql5.7會生成一個初始化密碼,而在之前的版本首次登陸不需要登入。
shell> cat /root/.mysql_secret # Password set for user 'root@localhost' at 2015-04-22 22:13:23 ?G5W&tz1z.cN 修改預設密碼 shell> bin/mysqladmin -h localhost -u root password '123@qwe' -p'?G5W&tz1z.cN' mysqladmin: [Warning] Using a password on the command line interface can be insecure. Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
另外mysql5.7的mysql.user表結構被修改
修改mysql.user方式修改密碼 mysql> update mysql.user set authentication_string=password('123qwe') where user='svoid' and Host = 'localhost'; Query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
整理自網路
Svoid
2015-04-21
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29733787/viewspace-1590891/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rabbitmq安裝使用問題彙總MQ
- PLSQL安裝與使用問題彙總SQL
- AIX安裝oracle遇到的問題彙總AIOracle
- 安裝PHP常見問題彙總薦PHP
- ambari安裝過程中的問題彙總
- mysql5.7安裝及問題處理MySql
- SQL server 2005安裝問題彙總(4)SQLServer
- SQL server 2005安裝問題彙總(3)SQLServer
- SQL server 2005安裝問題彙總(2)SQLServer
- WCF x509證書安裝問題彙總
- mysql原始碼安裝時遇到的問題MySql原始碼
- DRF原始碼彙總原始碼
- plsql+html亂碼問題彙總SQLHTML
- PHP原始碼包編譯安裝錯誤及解決方法彙總PHP原始碼編譯
- CSS問題彙總CSS
- RecyclerView問題彙總View
- Redis問題彙總Redis
- nginx 問題彙總Nginx
- 基於Linux的MySQL5.7原始碼編譯安裝LinuxMySql原始碼編譯
- flutter安裝問題總結Flutter
- AIX6104安裝Oracle11GR2 RAC問題彙總AIOracle
- 機器學習面試問題彙總機器學習面試
- 騰訊雲問題彙總
- 原始碼安裝apache(附遇到的問題及解決)原始碼Apache
- 原始碼閱讀系列彙總原始碼
- 在Ubuntu上原始碼安裝MySQL+安裝問題解決+安全優化Ubuntu原始碼MySql優化
- 在CentOS上原始碼安裝MySQL+安裝問題解決+安全優化CentOS原始碼MySql優化
- Adobe系列安裝問題彙總,Adobe錯誤程式碼對照表及解決方案
- Redis常見問題彙總Redis
- Java 常見問題彙總Java
- ubuntu所遇問題彙總Ubuntu
- openni niviewer問題彙總View
- Bootstrap常見問題彙總boot
- pigossbsm 使用問題彙總Go
- 一些小問題彙總
- Windows安裝Filebeat遇到問題總結Windows
- eclipse 中文亂碼問題解決方案彙總Eclipse
- mysql5.7 安裝教程MySql