个人记录
建立个目录执行下面命令下载tar包
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
解压后为了方便建立个软链接
ln -s /home/mysql/mysql-5.7.13-linux-glibc2.5-x86_64 /usr/local/mysql
mysql目录下创建data目录
mkdir data
chmod -R 777 /usr/local/mysql/data/
开启ssl链接
bin/mysql_ssl_rsa_setup
创建root账号(记下自动生成随机密码)
sudo yum install libaio
bin/mysqld --initialize --user=root
加入服务
cp support-files/mysql.server /etc/init.d/mysql.server
添加环境变量:
vi /etc/profile
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin
保存并使其生效
source /etc/profile
登录mysql
mysql -uroot –p上面生成的随机密码
设置随机密码
use mysql;
SET PASSWORD = PASSWORD('你的密码');
其他机器远程链接权限
grant all privileges on *.* to 'root' @'%' identified by '你的密码';
flush privileges;
ln -s /home/kurumi/myenv/hadoop-2.6.1 /usr/local/hadoop-2.6.1
mysqld_safe/mysqld --user=root &
来源:oschina
链接:https://my.oschina.net/u/2380402/blog/3135302