安装环境
- 系统: 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的初始密码,并依次修改其它选项。
本文介绍在CentOS6系统上安装MySQL5.6的具体步骤,包括安装过程中遇到的问题及解决方法,如版本冲突、启动失败等,并提供安装后的配置建议。
3118

被折叠的 条评论
为什么被折叠?



