mysql守护进程如何干掉,MySQL守护进程问题

I seem to be having an issue with my MySQL Daemon and a World-writable config file being ignored :S

Here's the output when I run mysqld as user mysql:

bash-4.2$ mysqld

Warning: World-writable config file '/etc/mysql/my.cnf' is ignored

120730 17:57:34 [Note] Plugin 'FEDERATED' is disabled.

120730 17:57:34 InnoDB: The InnoDB memory heap is disabled

120730 17:57:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins

120730 17:57:34 InnoDB: Compressed tables use zlib 1.2.5

120730 17:57:34 InnoDB: Using Linux native AIO

120730 17:57:34 InnoDB: Initializing buffer pool, size = 128.0M

120730 17:57:34 InnoDB: Completed initialization of buffer pool

InnoDB: Unable to lock ./ibdata1, error: 11

Here's my 'my.cnf' file contents:

[client]

port = 3306

socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]

socket = /var/run/mysqld/mysqld.sock

[mysqld]

user = mysql

pid-file = /var/run/mysqld/mysqld.pid

socket = /var/run/mysqld/mysqld.sock

port = 3306

basedir = /usr

datadir = /var/mysql

tmpdir = /tmp

key_buffer = 16M

thread_stack = 128K

thread_cache_size = 8

#max_connections = 100

#table_cache = 64

#thread_concurrency = 10

query_cache_limit = 1M

query_cache_size = 1024M

sort_buffer=512M

thread_concurrency=32

query_cache_type=2

tmp_table_size=1G

#log = /var/log/mysql/mysql.log

#log_slow_queries = /var/log/mysql/mysql-slow.log

#long_query_time = 2

#log-queries-not-using-indexes

#server-id = 1

#log_bin = /var/log/mysql/mysql-bin.log

expire_logs_days = 10

max_binlog_size = 100M

#binlog_do_db = include_database_name

#binlog_ignore_db = include_database_name

#skip-innodb

# chroot = /var/lib/mysql/

[mysqldump]

quick

quote-names

max_allowed_packet = 16M

[mysql]

#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]

key_buffer = 16M

Really have no clue where to go, does anyone know how to ouput verbose errors with mysqld? Or even better how to fix this issue? Any ideas? Thanks guys :)

Okay, the world-writable config file is solved, I need help with these errors now:

bash-4.2$ mysqld

120730 18:18:23 [Warning] Can't create test file /var/mysql/ks23085.lower-test

120730 18:18:23 [Warning] Can't create test file /var/mysql/ks23085.lower-test

120730 18:18:23 [Note] Plugin 'FEDERATED' is disabled.

mysqld: Table 'mysql.plugin' doesn't exist

120730 18:18:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

120730 18:18:23 InnoDB: The InnoDB memory heap is disabled

120730 18:18:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins

120730 18:18:23 InnoDB: Compressed tables use zlib 1.2.5

120730 18:18:23 InnoDB: Using Linux native AIO

120730 18:18:23 InnoDB: Initializing buffer pool, size = 128.0M

120730 18:18:24 InnoDB: Completed initialization of buffer pool

120730 18:18:24 InnoDB: Operating system error number 13 in a file operation.

InnoDB: The error means mysqld does not have the access rights to

InnoDB: the directory.

InnoDB: File name ./ibdata1

InnoDB: File operation call: 'create'.

InnoDB: Cannot continue operation.

I can't tell if it's to do with the directory not being permitted properly or something else, or is it the same problem as last time? :S

解决方案

The my.cnf should not be world-writable (i.e. **6 or **7) permissions.

It is a security vulnerability. MySQL will ignore files with this this permission setting.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值