mysql启动报错解决-3

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介:

场景还原:

初始化

#/usr/local/webserver/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/webserver/mysql/ --datadir=/home/mysqldata

Installing MySQL system tables...
150205 11:48:00 [Note] Flashcache bypass: disabled
150205 11:48:00 [Note] Flashcache setup error is : ioctl failed

OK
Filling help tables...
150205 11:48:00 [Note] Flashcache bypass: disabled
150205 11:48:00 [Note] Flashcache setup error is : ioctl failed

OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/webserver/mysql//bin/mysqladmin -u root password 'new-password'
/usr/local/webserver/mysql//bin/mysqladmin -u root -h kooxoo17.ktep3.kuxun.cn password 'new-password'

Alternatively you can run:
/usr/local/webserver/mysql//bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/webserver/mysql/ ; /usr/local/webserver/mysql//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/webserver/mysql//mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/webserver/mysql//scripts/mysqlbug script!

Percona recommends that all production deployments be protected with a support
contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team's productivity.

启动

/usr/local/webserver/mysql/bin/mysqld_safe --defaults-file=/home/mysql_config/my.cnf --user=mysql --basedir=/usr/local/webserver/mysql/ --datadir=/home/mysqldata  &

未启动成功:
看日志报错如下:

150205 16:17:03 mysqld_safe Starting mysqld daemon with databases from /home/mysqldata
150205 16:17:03 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
150205 16:17:03 [Warning] '--log-long-format' is deprecated and will be removed in a future release. Please use '--log-short-format' instead.
150205 16:17:03 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
150205 16:17:03 [Warning] --myisam_max_extra_sort_file_size is deprecated and does nothing in this version.  It will be removed in a future release.
150205 16:17:03 [Note] Flashcache bypass: disabled
150205 16:17:03 [Note] Flashcache setup error is : ioctl failed

150205 16:17:03 [Note] Flashcache setup error is : ioctl failed

/usr/local/webserver/mysql/libexec/mysqld: File '/home/mysql_config/log/mysql-bin.index' not found (Errcode: 13)
File '/home/mysql_config/log/mysql-bin.index' not found (Errcode: 13)
150205 16:17:03 [ERROR] Aborting

150205 16:17:03 [Note] /usr/local/webserver/mysql/libexec/mysqld: Shutdown complete

150205 16:17:03 mysqld_safe mysqld from pid file /home/mysql_config/run/mysql.pid ended


原因:

mkdir -p /home/mysql_config/log

手工创建的这个目录,那么默认是root权限,mysql无法写入,所以不会生成mysql-bin.index这个文件。

解决方法:

chown -R mysql.mysql /home/mysql_config/



本文转自 Tenderrain 51CTO博客,原文链接:http://blog.51cto.com/tenderrain/1612033

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
关系型数据库 MySQL 数据库
安装MySQL及问题解决1
安装MySQL及问题解决1
155 0
|
11月前
|
关系型数据库 MySQL
MySQL 服务正在启动 MySQL 服务无法启动解决办法
MySQL 服务正在启动 MySQL 服务无法启动解决办法
308 0
|
11月前
|
关系型数据库 MySQL 数据库
如何安装mysql
如何安装mysql
105 0
|
关系型数据库 MySQL 数据安全/隐私保护
安装MySQL
首先我这里是已经下载好的MySQL-8.0,我这里是直接解压的,有点不一样。接下来我们就来操作。
|
关系型数据库 MySQL 数据安全/隐私保护
安装mysql
安装mysql
99 0
|
关系型数据库 MySQL 数据库
MySql的安装
MySql的安装
81 0
|
关系型数据库 MySQL 数据库
完美地安装MySQL,99.9999%成功!
完美地安装MySQL,99.9999%成功!
|
关系型数据库 MySQL 数据库
安装MySQL及问题解决2
安装MySQL及问题解决2
86 0
|
存储 SQL 关系型数据库
|
关系型数据库 MySQL 测试技术
MySQL的安装真的很简单?
MySQL的安装真的很简单?
147 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等