LINUX.ORG.RU
решено ФорумAdmin

[MySQL] Не запускается


0

1

Не запускается МуSQL
запускаю

oot@enep-desktop:~# service mysql start
start: Job is already running: mysql

но после запуска mysql пишет:
root@enep-desktop:~# mysql
error: Found option without preceding group in config file: /etc/mysql/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


вот конфигурация:
[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
#

#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
wait_timeout=86400
user            = mysql
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
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            = 127.0.0.1
#
# * Fine Tuning
#
key_buffer              = 16M
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        = 5
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * 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

log_error                = /var/log/mysql/error.log

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


в чем проблема?

★★★★

Ответ на: комментарий от Tanger

вот лог /etc/mysql/error.log

120206 22:31:23 [Note] Plugin 'FEDERATED' is disabled.
120206 22:31:23  InnoDB: Initializing buffer pool, size = 8.0M
120206 22:31:23  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
120206 22:31:23  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120206 22:31:23  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
120206 22:31:23  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
120206 22:31:25  InnoDB: Started; log sequence number 0 0
120206 22:31:25  InnoDB: Starting shutdown...
120206 22:31:30  InnoDB: Shutdown completed; log sequence number 0 44233
120206 22:31:30 [Note] Plugin 'FEDERATED' is disabled.
120206 22:31:30  InnoDB: Initializing buffer pool, size = 8.0M
120206 22:31:30  InnoDB: Completed initialization of buffer pool
120206 22:31:30  InnoDB: Started; log sequence number 0 44233
ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT ' at line 1
120206 22:31:30 [ERROR] Aborting

120206 22:31:30  InnoDB: Starting shutdown...
120206 22:31:35  InnoDB: Shutdown completed; log sequence number 0 44233
120206 22:31:35 [Note] /usr/sbin/mysqld: Shutdown complete

120206 22:31:35 [Note] Plugin 'FEDERATED' is disabled.
120206 22:31:36  InnoDB: Initializing buffer pool, size = 8.0M
120206 22:31:36  InnoDB: Completed initialization of buffer pool
120206 22:31:36  InnoDB: Started; log sequence number 0 44233
120206 22:31:36  InnoDB: Starting shutdown...
120206 22:31:41  InnoDB: Shutdown completed; log sequence number 0 44233
120206 22:31:41 [Note] Plugin 'FEDERATED' is disabled.
120206 22:31:41  InnoDB: Initializing buffer pool, size = 8.0M
120206 22:31:41  InnoDB: Completed initialization of buffer pool
120206 22:31:41  InnoDB: Started; log sequence number 0 44233
ERROR: 1050  Table 'plugin' already exists
120206 22:31:41 [ERROR] Aborting

120206 22:31:41  InnoDB: Starting shutdown...
120206 22:31:46  InnoDB: Shutdown completed; log sequence number 0 44233
120206 22:31:46 [Note] /usr/sbin/mysqld: Shutdown complete

120206 22:31:47 [Note] Plugin 'FEDERATED' is disabled.
120206 22:31:47  InnoDB: Initializing buffer pool, size = 8.0M
120206 22:31:47  InnoDB: Completed initialization of buffer pool
120206 22:31:47  InnoDB: Started; log sequence number 0 44233
120206 22:31:47 [Note] Event Scheduler: Loaded 0 events
120206 22:31:47 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.58-1ubuntu1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
120206 22:35:23 [Note] /usr/sbin/mysqld: Normal shutdown

120206 22:35:23 [Note] Event Scheduler: Purging the queue. 0 events
120206 22:35:23  InnoDB: Starting shutdown...
120206 22:35:28  InnoDB: Shutdown completed; log sequence number 0 44233
120206 22:35:28 [Note] /usr/sbin/mysqld: Shutdown complete


enep ★★★★ ()
Ответ на: комментарий от Tanger

Решил проблему перекодировки в UTF-8 Без BOM

enep ★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.