MySQL守护进程问题 [英] MySQL Daemon issue
问题描述
我似乎有一个问题,我的MySQL守护进程和一个世界可写的配置文件被忽略:S
这是我运行mysqld作为用户mysql时的输出:
bash-4.2 $ mysqld
警告:世界可写的配置文件'/etc/mysql/my.cnf '被忽略
120730 17:57:34 [Note]插件'FEDERATED'被禁用。
120730 17:57:34 InnoDB:InnoDB内存堆被禁用
120730 17:57:34 InnoDB:Mutexes和rw_locks使用GCC原子内建
120730 17:57:34 InnoDB:压缩表使用zlib 1.2.5
120730 17:57:34 InnoDB:使用Linux本机AIO
120730 17:57:34 InnoDB:初始化缓冲池,大小= 128.0M
120730 17:57 :34 InnoDB:完成缓冲池的初始化
InnoDB:无法锁定./ibdata1,错误:11
$ b b这是我的my.cnf文件内容:
[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#更快启动mysql但没有选项卡完成
[isamchk]
key_buffer = 16M
真的没有线索去哪里,有人知道如何输出与mysqld的详细错误吗?或者甚至更好的如何解决这个问题?有任何想法吗?谢谢你们:)
好吧,世界可写的配置文件解决了,现在我需要帮助这些错误:
bash-4.2 $ mysqld
120730 18:18:23 [警告]无法创建测试文件/var/mysql/ks23085.lower-test
120730 18:18:23 [Warning]无法创建测试文件/var/mysql/ks23085.lower-test
120730 18:18:23 [Note]插件'FEDERATED'被禁用。
mysqld:表'mysql.plugin'不存在
120730 18:18:23 [错误]无法打开mysql.plugin表。请运行mysql_upgrade来创建它。
120730 18:18:23 InnoDB:InnoDB内存堆被禁用
120730 18:18:23 InnoDB:Mutexes和rw_locks使用GCC原子内建
120730 18:18:23 InnoDB:压缩表使用zlib 1.2.5
120730 18:18:23 InnoDB:使用Linux本地AIO
120730 18:18:23 InnoDB:初始化缓冲池,大小= 128.0M
120730 18:18 :24 InnoDB:缓冲池的完成初始化
120730 18:18:24 InnoDB:文件操作中的操作系统错误号13。
InnoDB:错误的意思是mysqld没有访问
InnoDB的目录。
InnoDB:文件名./ibdata1
InnoDB:文件操作调用:'create'。
InnoDB:无法继续操作。
我不知道这是否与目录不允许正确或其他,是和上次一样的问题吗? :S
解决方案my.cnf不应该是世界可写的(即** 6或** 7)权限。 / p>
这是一个安全漏洞。 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.
这篇关于MySQL守护进程问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!