树莓派ubuntu 源码编译MySQL5.6

0人浏览 / 0人评论

树莓派ubuntu 源码编译MySQL5.6

[toc] 标签: mysql ubuntu
##安装编译环境和必要的库
sudo apt-get install gcc g++
#centos
yum -y install  gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake

编译安装ncurses

pi@ubuntu:~$ wget https://invisible-mirror.net/archives/ncurses/ncurses-6.1.tar.gz
pi@ubuntu:~$ tar -zxvf ncurses-6.1.tar.gz
pi@ubuntu:~$ cd ncurses-6.1/
pi@ubuntu:~/ncurses-6.1$ ./configure
pi@ubuntu:~/ncurses-6.1$ make -j4
pi@ubuntu:~/ncurses-6.1$ sudo make install
##安装编译mysql
pi@ubuntu:~$ wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.39.tar.gz
pi@ubuntu:~$ tar -zxvf mysql-5.6.39.tar.gz
pi@ubuntu:~$ cd mysql-5.6.39/
pi@ubuntu:~/mysql-5.6.39$ cmake ./ -DCMAKE_INSTALL_PREFIX=/admxj/server/mysql \-DMYSQL_DATADIR=/admxj/server/mysql/data -DSYSCONFDIR=/admxj/server/mysql -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
pi@ubuntu:~/mysql-5.6.39$ make -j4
pi@ubuntu:~/mysql-5.6.39$ sudo make install