首页 > 数据库技术 > 详细

mysql安装

时间:2018-01-23 21:09:29      阅读:286      评论:0      收藏:0      [点我收藏+]
#!/bin/sh

####安装ncurses-5.9.tar.gz
cd /usr/local/src/
tar -zxvf ncurses-5.9.tar.gz
cd  ncurses-5.9
./configure --with-shared --without-debug --without-ada --enable-overwrite
make #or make test  #测试编译
make install #开始编译安装

####安装cmake-2.8.8.tar.gz
cd /usr/local/src/
tar -zxvf cmake-2.8.8.tar.gz
cd  cmake-2.8.8
./configure
make #or make test  #测试编译
make install #开始编译安装

groupadd mysql
useradd -g mysql mysql mysql -s /bin/false 
mkdir -p /usr/local/data/mysql
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/data/mysql -DSYSCONFDIR=/etc
make
make install
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql

####系统开启自动启动
#vim /root/.bash_profile
#PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/lib
#source  /root/.bash_profile #配置马上生效
cd /usr/local/mysql
./bin/mysqld_safe  --defaults-file=/usr/local/mysql/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data  --user=mysql &

#### GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";
#### update user set password=password(‘root‘) where user=‘root‘;

  

mysql安装

原文:https://www.cnblogs.com/gan-wenjun/p/8337841.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!