Mysql-5.5.32 cmake安裝
1.複製cmake-2.8.8.tar.gz和mysql-5.5.32.tar.gz至/opt資料夾下
2.切換到opt目錄
[root@mysql
~]# cd /opt
[root@mysql
opt]# ls
cmake-2.8.8.tar.gz
mysql-5.5.32.tar.gz rh
3.解壓cmake檔案
[root@mysql
opt]# tar xf cmake-2.8.8.tar.gz
[root@mysql
opt]# cd cmake-2.8.8
[root@mysql
cmake-2.8.8]# ls
bootstrap
CompileFlags.cmake doxygen.config
ChangeLog.manual
configure
Example
ChangeLog.txt
Copyright.txt Modules
CMakeCPack.cmake
CTestConfig.cmake Readme.txt
CMakeCPackOptions.cmake.in
CTestCustom.cmake.in Source
CMakeGraphVizOptions.cmake
CTestCustom.ctest.in Templates
CMakeLists.txt
DartConfig.cmake Tests
CMakeLogo.gif
DartLocal.conf.in Utilities
cmake_uninstall.cmake.in
Docs
4.進行cmake的安裝
[root@mysql
cmake-2.8.8]# ./configure
CMake
has bootstrapped. Now run gmake.
[root@mysql
cmake-2.8.8]# gmake
[root@mysql
cmake-2.8.8]# gmake install
5.新增mysql使用者和組
[root@mysql
cmake-2.8.8]# groupadd mysql
[root@mysql
cmake-2.8.8]# useradd mysql -s /sbin/nologin -M -g mysql
6.yum安裝ncurses-devel
[root@mysql
/]# yum install ncurses-devel -y
7.解壓mysql檔案
[root@mysql
/]# cd /opt
[root@mysql
opt]# tar xf mysql-5.5.32.tar.gz
[root@mysql
opt]# cd mysql-5.5.32
[root@mysql
mysql-5.5.32]# ls
BUILD
CMakeLists.txt COPYING
include
libmysqld mysys
regex sql-common
tests win
BUILD-CMAKE
cmd-line-utils dbug
INSTALL-SOURCE libservices packaging
scripts storage
unittest zlib
client
config.h.cmake Docs
INSTALL-WIN-SOURCE
man
plugin sql
strings VERSION
cmake
configure.cmake extra
libmysql
mysql-test README sql-bench
support-files vio
8.安裝之前編譯mysql
cmake .
-DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.32 \
-DMYSQL_DATADIR=/application/mysql-5.5.32/data
\
-DMYSQL_UNIX_ADDR=/application/mysql-5.5.32/tmp/mysql.sock
\
-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii
\
-DENABLED_LOCAL_INFILE=ON
\
-DWITH_INNOBASE_STORAGE_ENGINE=1
\
-DWITH_FEDERATED_STORAGE_ENGINE=1
\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
\
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
\
-DWITH_FAST_MUTEXES=1
\
-DWITH_ZLIB=bundled
\
-DENABLED_LOCAL_INFILE=1
\
-DWITH_READLINE=1
\
-DWITH_EMBEDDED_SERVER=1
\
-DWITH_DEBUG=0
9.mysql安裝
[root@mysql mysql-5.5.32]# make && make
install
[root@mysql mysql-5.5.32]# ln -s
/application/mysql-5.5.32/ /application/mysql
如果make到63%左右出現錯誤:
make[2]: ***
[storage/perfschema/unittest/pfs_connect_attr-t] Error 1
make[1]: ***
[storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
則:cmake去掉-DWITH_PARTITION_STORAGE_ENGINE=1引數重新編譯
10.選擇配置檔案
[root@mysql
mysql-5.5.32]# cp support-files/my-small.cnf /etc/my.cnf
cp:
overwrite `/etc/my.cnf'? y
11.檢視是否有mysql/data目錄
[root@mysql mysql-5.5.32]# ll
/application/mysql/data/
total
4
drwxr-xr-x.
2 root root 4096 Aug 15 15:38 test
12.相關授權
[root@mysql mysql-5.5.32]# chown -R mysql.mysql
/application/mysql/data/
[root@mysql
mysql-5.5.32]# chmod -R 1777 /tmp/
13.資料庫初始化
[root@mysql mysql-5.5.32]# cd
/application/mysql/scripts/
[root@mysql
scripts]# ls
mysql_install_db
[root@mysql
scripts]# cd /application/mysql/scripts/
[root@mysql
scripts]# ./mysql_install_db --basedir=/application/mysql/
--datadir=/application/mysql/data/ --user=mysql
Installing
MySQL system tables...
OK
Filling
help tables...
OK
14.啟動配置
[root@mysql
mysql]# cd /opt/mysql-5.5.32
[root@mysql
mysql-5.5.32]# cp support-files/mysql.server /etc/init.d/mysqld
[root@mysql
mysql-5.5.32]# chmod +x /etc/init.d/mysqld
[root@mysql
mysql-5.5.32]# /etc/init.d/mysqld start
Starting
MySQL.. SUCCESS!
[root@mysql
mysql-5.5.32]# netstat -lntup|grep 3306
tcp
0 0
0.0.0.0:3306
0.0.0.0:*
LISTEN 28462/mysqld
15.配置環境變數
[root@mysql mysql-5.5.32]# echo 'export
PATH=/application/mysql/bin:$PATH'>>/etc/profile
[root@mysql
mysql-5.5.32]# tail -1 /etc/profile
export
PATH=/application/mysql/bin:$PATH
[root@mysql
mysql-5.5.32]# source /etc/profile
[root@mysql
mysql-5.5.32]# echo $PATH
/application/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
16.登陸mysql,刪除無用配置
[root@mysql mysql-5.5.32]# mysql
mysql>
delete from mysql.user where user='';
mysql>
delete from mysql.user where host='mysql';
mysql>
delete from mysql.user where host='::1';
mysql>
select user,host from mysql.user;
+------+-----------+
|
user | host |
+------+-----------+
|
root | 127.0.0.1 |
|
root | localhost |
+------+-----------+
mysql>
drop database test;
17.配置登陸密碼
[root@mysql mysql-5.5.32]#
/application/mysql//bin/mysqladmin -u root password 'cancer'
18.設定mysql開機啟動
[root@mysql mysql-5.5.32]# chkconfig mysqld on
[root@mysql
mysql-5.5.32]# chkconfig --list mysqld
mysqld
0:off 1:off 2:on
3:on 4:on 5:on 6:off
19.檢視系統語言
[root@mysql mysql-5.5.32]# cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29812844/viewspace-1988762/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ubuntu安裝CMakeUbuntu
- (CMake):CMake安裝及快速入門案例
- CMake的安裝和使用
- CentOS下安裝配置cmakeCentOS
- CMAKE安裝mysql5.5MySql
- windows安裝cmake、opencv、qtWindowsOpenCVQT
- MySQL 5.7.17 安裝報錯CMake Error at cmake/boost.cmake:81 (MESSAGE)MySqlError
- mysql5.6的安裝(cmake)MySql
- Windows下CMake編譯安裝OpenCVWindows編譯OpenCV
- MYSQL 5.6 安裝時cmake引數MySql
- mysql在linux上cmake安裝方法(自己安裝版)MySqlLinux
- 在CentOS 6.3中安裝與配置cmakeCentOS
- CMake 學習【七】—— 生成一個安裝器
- Mysql安裝過程中CMAKE編譯出錯MySql編譯
- MySQL 5.5編譯安裝cmake引數說明MySql編譯
- Linux 安裝 mysql 5.5.8(cmake原始碼安裝mysql5.5以上版本)[轉]LinuxMySql原始碼
- cmake使用教程(三)-安裝、測試、系統自檢
- CentOS6.7下使用cmake編譯安裝MySQL5.5.32CentOS編譯MySql
- mysql5.5資料庫cmake原始碼編譯安裝MySql資料庫原始碼編譯
- protobuf cmake Visual Studio 編譯安裝 (全命令列)編譯命令列
- gRPC cmake Visual Studio編譯安裝 (全命令列)RPC編譯命令列
- 在Linux Mint中安裝Clion遇到CMake Error的解決辦法LinuxError
- MySQL-5.5.32 配置檔案優化詳解MySql優化
- 【CMake】掌握CMake基本操作
- cmake報錯CMake Error: Could not find CMAKE_ROOTError
- CMake 簡介和 CMake 模板
- cmake使用教程(五)-cpack生成安裝包
- cmake
- cmake 模板
- cmake cuda
- cmake + JNI
- CMake 使用
- <<Modern CMake>> 翻譯 2. CMake 基礎
- <<Modern CMake>> 翻譯 2.2 CMake 程式設計程式設計
- MariaDB 10.1原始碼安裝報錯"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""原始碼Symbol
- codis安裝 (java 安裝 + zookeeper 安裝 + go 安裝 + codis 安裝JavaGo
- CMake Error at cmake/readline.cmake:85 (MESSAGE): Curses library not found.Error
- Cmake 入門