为了账号安全,请及时绑定邮箱和手机立即绑定

cmake怎么使用呀。讲的粗心大意的。卧槽

cmake \ 命令无效呀

正在回答

2 回答

1. tar -jxvf mysql.tar.bz2

2. yum install -y git gcc gcc-c++ ncurses ncurses-devel bison cmake libaio-devel openssl openssl-devel

3. groupadd mysql; useradd -g mysql mysql

4. tar -jxvf boost.tar.bz2

5. cd /usr/local/boost

6. ./bootstrap.sh --prefix=/usr/local/include/boost

7. ./b2 install

8. 

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql  \

-DMYSQL_DATADIR=/usr/local/mysql/data/ -DSYSCONFDIR=\etc\mysql \

-DWITH_INNOBASE_STORAGE_ENGINE=1   \

-DMYSQL_TCP_PORT=3306   \

-DENABLED_LOCAL_INFILE=1   \

-DEXTRA_CHARSETS=all   \

-DDEFAULT_CHARSET=utf8   \

-DDEFAULT_COLLATION=utf8_general_ci  \

-DWITH_BOOST=/usr/local/src/boost/boost_1_67_0/

-DDOWNLOAD_BOOST=1


9. make

10. make install


# 初始化mysql

11. cd /usr/local/mysql

12.(/usr/local/mysql/data/ 目录必须NULL)

bin/mysqld --initialize --user=mysql  --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/

13. bin/mysql_ssl_rsa_setup

14. cp ./support-files/my-default.cnf /etc/my.cnf 

15. vim /etc/my.cnf

[mysqld]

datadir=/usr/local/mysql/data/

socket=/var/lib/mysql/mysql.sock

user=mysql

character-set-server=utf8mb4

port=3306

# Settings user and group are ignored when systemd is used.

# If you need to run mysqld under a different user or group,

# customize your systemd unit file for mariadb according to the

# instructions in http://fedoraproject.org/wiki/Systemd


[mysqld_safe]

log-error=/var/log/mariadb/mariadb.log

pid-file=/var/run/mariadb/mariadb.pid


#

# include all files from the config directory

#

!includedir /etc/my.cnf.d


16. vim /etc/environment   need reboot

在PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"中加入“:/usr/local/mysql/bin”


17. cd /usr/local/mysql

18. cp support-files/mysql.server /etc/init.d/mysql.server

19. service mysql.server start (临时密码在此)

20. 修改密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123';

可能还会有问题,我这样配置成功了,整理了一下


1 回复 有任何疑惑可以回复我~

哈哈,他是复制粘贴的配置信息

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
PHP环境LAMP/LNMP安装与配置
  • 参与学习       45317    人
  • 解答问题       224    个

本课程适于PHP初学者,手把手教你LAMP/LNMP环境安装配置

进入课程

cmake怎么使用呀。讲的粗心大意的。卧槽

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信