我无法在Linux上启动MySQL – 错误mysqld_safe

前端之家收集整理的这篇文章主要介绍了我无法在Linux上启动MySQL – 错误mysqld_safe前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在网络上的许多论坛中找到了,但我找不到我的解决方案.
当我在 linux ubuntu server 12.04中启动服务 mysql时,我收到此错误
root@stroke:/# MysqLd_safe &
[1] 5789
root@stroke:/# 131001 10:12:29 MysqLd_safe Logging to syslog.
131001 10:12:29 MysqLd_safe Starting MysqLd daemon with databases from /var/lib/MysqL
131001 10:12:29 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended

我已经给了MysqL文件夹的权限,我也尝试为root MysqL创建一个新密码.但到目前为止还没有任何效果.

感谢帮助.

一些信息:

root@stroke:/# /etc/init.d/MysqL start
Rather than invoking init scripts through /etc/init.d,use the service(8)
utility,e.g. service MysqL start

Since the script you are attempting to invoke has been converted to an
Upstart job,you may also use the start(8) utility,e.g. start MysqL
start: Job Failed to start

/etc/MysqL/my.cnf文件

#
# The MysqL database server configuration file.
#
# You can copy this to one of:
# - "/etc/MysqL/my.cnf" to set global options,# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.MysqL.com/doc/MysqL/en/server-system-variables.html

# This will be passed to all MysqL clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/MysqL/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /var/run/MysqLd/MysqLd.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_MysqLd]. Both versions are currently parsed.
[MysqLd_safe]
socket          = /var/run/MysqLd/MysqLd.sock
nice            = 0

[MysqLd]
#
# * Basic Settings
#
innodb_force_recovery = 4
user            = MysqL
pid-file        = /var/run/MysqLd/MysqLd.pid
socket          = /var/run/MysqLd/MysqLd.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/MysqL
tmpdir          = /tmp
lc-messages-dir = /usr/share/MysqL
#skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            =  0.0.0.0
#
# * Fine Tuning
#
key_buffer              = 256M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 16M
query_cache_size        = 48M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/MysqL/MysqL.log
#general_log             = 1
#
# Error logging goes to syslog due to /etc/MysqL/conf.d/MysqLd_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries       = /var/log/MysqL/MysqL-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave,see README.Debian about
#       other settings you may need to change.
#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
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/MysqL/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual,too,if you want chroot!
# chroot = /var/lib/MysqL/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/MysqL/cacert.pem
# ssl-cert=/etc/MysqL/server-cert.pem
# ssl-key=/etc/MysqL/server-key.pem


[MysqLdump]
quick
quote-names
max_allowed_packet      = 16M

[MysqL]
#no-auto-rehash # faster start of MysqL but no tab completition

[isamchk]
key_buffer              = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf',otherwise they'll be ignored.
#
!includedir /etc/MysqL/conf.d/

解决方法

MysqL正在它自己的用户下工作,所以在root下启动它并不是一个明智的决定.现在,当您已经尝试过某些文件可以由root拥有时,服务将无法启动.

>检查MysqL数据库的所有目录是否由MysqL用户拥有.>尝试通过upstart启动服务:启动MysqL>在具有MysqL数据库的目录中检查日志文件.

原文链接:https://www.f2er.com/linux/395201.html

猜你在找的Linux相关文章