@H_502_1@
原文链接:https://www.f2er.com/centos/382103.html安装环境
- 系统: CentOS6 64位
安装步骤
开始通过命令sudo yum install MysqL-server
安装后,使用MysqL --version
查看版本,为 5.1.73。
因为要安装5.6版,故卸载5.1版,下载本地包重新安装,如下所示
# rpm -ivh MysqL-server-5.6.15-1.el6.i686.rpm
# rpm -ivh MysqL-client-5.6.15-1.el6.i686.rpm
# rpm -ivh MysqL-shared-5.6.15-1.el6.i686.rpm
安装完成后,使用命令/etc/init.d/MysqL start
启动时报错:Starting MysqL.The server quit without updating PID file (/[Failed]MysqL/namenode.pid)
。
查看/var/lib/MysqL/namenode.err
,错误详情如下
2016-06-06 14:44:37 29727 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages,max 0 (relevant if non-zero) pages!
2016-06-06 14:44:37 29727 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace,and it Failed here,you should now edit innodb_data_file_path in my.cnf back to what it was,and remove the new ibdata files InnoDB created in this Failed attempt. InnoDB only wrote those files full of zeros,but did not yet use them in any way. But be careful: do not remove old data files which contain your precIoUs data!
参照MySQL 5.6 Failure中的SUGGESTION #1 : UNINSTALL AND REINSTALL MysqL 5.6
解决,即去除旧数据后重新安装即可。
安装完成时,有如下提示
A RANDOM PASSWORD HAS BEEN SET FOR THE MysqL root USER ! You will find that password in '/root/.MysqL_secret'. You must change that password on your first connect,no other statement but 'SET PASSWORD' will be accepted. See the manual for the semantics of the 'password expired' flag. Also,the account for the anonymous user has been removed. In addition,you can run: /usr/bin/MysqL_secure_installation which will also give you the option of removing the test database. This is strongly recommended for production servers. See the manual for more instructions. Please report any problems with the /usr/bin/MysqLbug script! The latest information about MysqL is available on the web at http://www.MysqL.com Support MysqL by buying support/licenses at http://shop.MysqL.com New default config file was created as /usr/my.cnf and will be used by default by the server when you start it. You may edit this file to change server settings
意为
- 安装完成后,已为root用户生成随机密码,在 ‘/root/.MysqL_secret’文件中。
- 第一次连接时必须修改密码,请执行
/usr/bin/MysqL_secure_installation
输入root的初始密码,并依次修改其它选项。