suse源码编译安装mysql8_Linux 下 MySQL 5.5.8 源码编译安装记录

6. bison

----shell:~$ sudo apt-get install bison

----可选。没有这个工具,在make的时候报出警告。

----警告记录:

---------------------------------

Warning: Bison executables not found in PATH

---------------------------------

7.chkconfig

----后面配置MySQL服务自启动的时候需要。

----shell:~$ sudo apt-get install chkconfig

=>mysql安装:

1.解压源代码文件

----shell定位到源代码文件所在目录

----解压

shell:~$ tar zxvf mysql-5.5.8.tar.gz

2.cmake操作

----shell定位到解压出的源代码文件夹目录(文件夹:mysql-5.5.8)

----cmake执行:

---------------------------------

shell:~$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql

-DMYSQL_DATADIR=/home/system_username/Programming/mysql/mysqldata

-DSYSCONFDIR=/etc

-DWITH_INNOBASE_STORAGE_ENGINE=1

-DWITH_ARCHIVE_STORAGE_ENGINE=1

-DWITH_BLACKHOLE_STORAGE_ENGINE=1

-DWITH_FEDERATED_STORAGE_ENGINE=1

-DWITH_PARTITION_STORAGE_ENGINE=1

-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock

-DMYSQL_TCP_PORT=3306

-DENABLED_LOCAL_INFILE=1

-DEXTRA_CHARSETS=all

-DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8-general_ci

-DMYSQL_USER=mysql

注:没有换行。官方文档上,cmake 命令后面加个点不懂什么意思。在这里加上命令执行不了

---------------------------------

源代码配置选项说明:

//mysql安装的主目录,5.5.8版本默认为/usr/local/mysql,所以可以不添加

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql

//mysql数据保存的路径,自定义

-DMYSQL_DATADIR=/home/system_username/mysql/mysqldata

//mysql配置文件地址------The default my.cnf option file directory

-DSYSCONFDIR=/etc

//Compile storage engine xxx statically into server

/*Storage engines are built as plugins. You can build a plugin as a static module (compiled into the server)

*or a dynamic module  (built as a dynamic library that must be installed into the server using the INSTALL

*PLUGIN statement or the --plugin-load option before it can be used). Some plugins might not support static

*or dynamic building.

*/

-DWITH_INNOBASE_STORAGE_ENGINE=1

-DWITH_ARCHIVE_STORAGE_ENGINE=1

-DWITH_BLACKHOLE_STORAGE_ENGINE=1

-DWITH_FEDERATED_STORAGE_ENGINE=1

-DWITH_PARTITION_STORAGE_ENGINE=1

//Unix socket file

/*

*The Unix socket file path on which the server listens for socket connections. This must be an absolute path

*name. The default is /tmp/mysql.sock

*/

-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock

//数据库服务器TCP/IP连接的监听端口,默认为3306

-DMYSQL_TCP_PORT=3306

//Whether to enable LOCAL capability in the client library for LOAD DATA INFILE

//默认为关闭,这里开启

-DENABLED_LOCAL_INFILE=1

//数据库编码设置

-DEXTRA_CHARSETS=all

-DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8-general_ci0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值