mysql启动报错解决-3

场景还原:

初始化

#/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/

时间: 2024-11-05 02:01:29

mysql启动报错解决-3的相关文章

mysql启动报错解决-2

场景还原: 初始化 #/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: disabled150205 11:48:00 [Note] Flashcac

mysql启动报错:Table 'mysql.host' doesn't exist

今天在安装mysql后,启动时候没有启动成功,查看了下日志报错如下: --------------------------------------------- [[email protected] local]# less /var/log/mysqld.log 1.查看报错信息如下: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 2.经过查阅资料得知.要敲

MySql启动报错,无法更新PID文件

MySql启动报错 Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql..) 1,查看错误日志 2017-08-10 19:38:14 31865 [Note] InnoDB: Initializing buffer pool, size = 50.0M InnoDB: mmap(53657600 bytes) failed; errno 12 2017-08-10 19:38:14

PHP多次调用Mysql存储过程报错解决办法

PHP多次调用Mysql数据库的存储过程会出现问题,主要问题为存储过程中执行多次SQL语句不能一一释放导致的,网上找了一些解决办法,比如使用 multi_query 然后一个一个释放,但是发现根本不适合我们的项目,我们使用CI框架写的,更多的是使用CI的数据库处理方法.所以只能另辟蹊径. 一次偶然,把Mysql链接方式改成了mysqli,两种不同的PHP连接mysql的扩展,官方在高版本中推荐使用mysqli,结果却奇迹般好了,使用Mysql长连接也行,天意么? PHP多次调用Mysql存储过程

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

vi /etc/my.cnf  查看日志文件路径: log-error=/var/log/mysqld.log 查看报错日志: 之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了. 查看了错误日志 引用 090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: Ta

Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatcher.Dispatcher :27] - Dispatcher initialization failedUnable to load configuration. - Class: java.net.AbstractPlainSocketImplFile: AbstractPlainSocket

mysql 启动报错 “mysql-bin.index not found (Errcode: 13)“

安装好mysql数据库后,直接在安装的目录下 /usr/local/mysql  下新建了一个目录data 用于存放数据,建好后,直接去启动数据库,发现启动不了,出现如下报错: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13) [E

mysql启动报错

mysql启动报错的原因常见的有一下几种: 1.数据所在分区满了 2.pid所在目录mysql用户没有写权限 3.存储引擎为innodb引擎,这个时候启动的时候需要恢复所有的操作(select,create,drop,insert.update,delete),当不能有效的执行恢复操作的时候,mysql启动报错 早上来上班的时候,被通知整栋大楼要停电,想了一下,公司机房还放了几台测试机,如果突然断电的话,会导致测试机中的虚拟机不可用,赶紧一台一台关机吧,其中有一台虚拟机上装着mysql,先进去把

新安装的MySQL启动报错The server quit without updating PID file

安装的MySQL启动报错The server quit without updating PID file [[email protected] mysql]# service mysqld restart MySQL server PID file could not be found!                  [失败] Starting MySQL.The server quit without updating PID file (/[失败]ysql/l ocalhost.loc