欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

Mysql安装卸载全过程

来源:本站整理 作者:佚名 时间:2017-08-27 TAG: 我要投稿
Verifying  : mysql-community-server-5.7.18-1.el6.x86_64                                                                     1/4
Verifying  : mysql-community-libs-5.7.18-1.el6.x86_64                                                                       2/4
Verifying  : mysql-community-common-5.7.18-1.el6.x86_64                                                                     3/4
Verifying  : mysql-community-client-5.7.18-1.el6.x86_64                                                                     4/4
Installed:
mysql-community-client.x86_64 0:5.7.18-1.el6                    mysql-community-common.x86_64 0:5.7.18-1.el6
mysql-community-libs.x86_64 0:5.7.18-1.el6                      mysql-community-server.x86_64 0:5.7.18-1.el6
Complete!
12. 最后检查,已经安装成功
# rpm -qa|grep mysql
mysql-community-client-5.7.18-1.el6.x86_64
mysql-community-libs-5.7.18-1.el6.x86_64
mysql-community-common-5.7.18-1.el6.x86_64
mysql-community-server-5.7.18-1.el6.x86_64
13. 安装完成,但是启动的时候遇到了问题:
# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Initializing MySQL database:  2017-07-11T15:23:50.462866Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-07-11T15:23:50.465315Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-07-11T15:23:50.465365Z 0 [ERROR] Aborting
[FAILED]
14. 百度的解决方法(是由于之前老版本的数据库已经占用这个文件夹,需要清空,或者在/etc/my.cnf中重新指定--datadir)
保证 --datadir目录为空。 /usr/local/var/mysql 这个目录

15. 启动成功
# cd /var/lib/mysql
# ls
auto.cnf  ib_buffer_pool  ibdata1  ib_logfile0  ib_logfile1
# rm *
rm: remove regular file `auto.cnf'? y
rm: remove regular file `ib_buffer_pool'? y
rm: remove regular file `ibdata1'? y
rm: remove regular file `ib_logfile0'? y
rm: remove regular file `ib_logfile1'? y
# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Initializing MySQL database:                               [  OK  ]
Installing validate password plugin:                       [  OK  ]
Starting mysqld:                                           [  OK  ]
# ps -ef|grep mysql
root      4533     1  0 23:25 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql

上一页  [1] [2] [3] [4]  下一页

【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载