当前位置:Gxlcms > mysql > CMAKE安装MYSQL5.6.10_MySQL

CMAKE安装MYSQL5.6.10_MySQL

时间:2021-07-01 10:21:17 帮助过:31人阅读

bitsCN.com

CMAKE安装MYSQL 5.6.10

mysql5.6.10不支持configure安装了,提供了CMAKE安装方式

#sudo groupadd mysql

#sudo useradd mysql -g mysql

#sudo mkdir -p /home/mysql/data

#sudo mkdir /usr/local/mysql

#sudo mkdir /var/log/mysql

#sudo chown -R mysql:mysql /home/mysql/data

#sudo chown -R mysql:mysql /usr/local/mysql

#sudo chown -R mysql:mysql /var/log/mysql

#vi /etc/profile

Append these 2 lines to the end of the file:

PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH

export PATH

#sudo apt-get install g++

#sudo apt-get install libncurses5-dev

#sudo rm -rf CMakeCache.txt

#sudo apt-get install cmake

#sudo cmake -DCMAKE_STALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/home/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 -DSYSCONFDIR=/etc -DEXTRA_CHARSETS=all

#make && make install

#sudo cp support-files/my-default.cnf /etc/my.cnf

#sudo ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/home/mysql/data

#cd /usr/local/mysql

#sudo vim.tiny /etc/mysql/my.cnf添加

explicit_defaults_for_timestamp=true

#sudo mysqld_safe --basedir=/usr/local/mysql --datadir=/window/d/software/mysql/data --user=mysql &

bitsCN.com

人气教程排行