enerating a 2048 bit RSA private key
.....................................+++
...................+++
writing new private key to 'client-key.pem'
-----
[root@mdb01 mysql]#
4.目录权限修改
shell> chown -R root .
shell> chown -R mysql data
?
Basedir mysql user
[root@mdb01 mysql-5.7.9]# cd /opt
[root@mdb01 opt]# chown mysql mysql
[root@mdb01 opt]# ll
total 4
drwxr-xr-x. 11 mysql mysql 4096 Oct 30 06:09 mysql
?
5.启动 MySQL
shell> bin/mysqld_safe --user=mysql &
?
六、首次登陆 MySQL
1.登录MySQL
[root@rhel6 mysql]# bin/mysql -u root -p
Enter password: 安装时生成的临时密码(Ek&!sA9(qYds)
Welcome to the MySQL monitor.? Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.9-log
?
?
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
?
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
?
mysql>
?
2.修改登录密码root密码
?
* As of MySQL 5.7.6, use ALTER USER:
?
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
?
3.配置启动项
?
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysqld
?
PATH环境变量
vi /etc/profile
.....
.....
unset i
unset pathmunge
export PATH=/opt/mysql/bin:$PATH