MySQL cannot start unkown command

Source: Internet
Author: User

1. Https://serverfault.com/questions/490656/mysql-not-starting-error-usr-sbin-mysqld-unknown-option-query-cache-si

4down Votefavorite

I have a big problem.

I try to start MySQL in Ubuntu, Buti has this error:

130323  0:13:55 [Note] Plugin ‘FEDERATED‘ is disabled.130323  0:13:55 InnoDB: The InnoDB memory heap is disabled130323  0:13:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins130323  0:13:55 InnoDB: Compressed tables use zlib 1.2.3.4130323  0:13:55 InnoDB: Initializing buffer pool, size = 8.0G130323  0:13:55 InnoDB: Completed initialization of buffer pool130323  0:13:55 InnoDB: highest supported file format is Barracuda.130323  0:13:55  InnoDB: Waiting for the background threads to start130323  0:13:56 InnoDB: 1.1.8 started; log sequence number 1195255849922130323  0:13:56 [ERROR] /usr/sbin/mysqld: unknown option ‘--query_cache_size-128M‘130323  0:13:56 [ERROR] Aborting130323  0:13:56  InnoDB: Starting shutdown...130323  0:13:57  InnoDB: Shutdown completed; log sequence number 1195255849922130323  0:13:57 [Note] /usr/sbin/mysqld: Shutdown complete

This have no sense, because I dont use the my.cnf:

    # # The MySQL database server configuration file.## can copy this to one of:#-'/etc/mysql/my.cnf ' to set global O ptions,#-"~/.my.cnf" to set user-specific options.## one can use all long options, the program supports.# Run progra M with--help-get a list of available options and with#--print-defaults to see which it would actually and use.## for explanations see# http://dev.mysql.com/doc/mysql/en/server-system-variables.html# This'll be passed to all M Ysql clients# It has been reported, passwords should be enclosed with ticks/quotes# escpecially if they contain "#" Ch ars...# Remember to edit/etc/mysql/debian.cnf where changing the socket location. [Client]port = 3306socket =/var/run/mysqld/mysqld.sock# Here's entries for some specific programs# T He following values assume you had at least 32M ram# This is formally known as [Safe_mysqld]. Both versions is currently parsed. [Mysqld_safe]socket =/var/run/mysqld/mysqld.socKnice = 0[mysqld]## * Basic settings#user = Mysqlpid-file =/var/run/mysqld/mysqld.pidsocket =/var/run/mysqld/mysqld.sockport = 3306basedir =/usr#datadir =/var/lib/mysql DataDir =/home/mysqltmpdir =/tmplc-messages-dir =/usr/share/mysqlskip-external-locking#innodb_force_reco very = 3## Instead of skip-networking The default is now-listen only on# localhost which are more compatible and are not Less secure.bind-address = 127.0.0.1## * Fine tuning#key_buffer = 500mmax_allowed_packet = 12 8mthread_stack = 192kthread_cache_size = 8default-storage-engine = innodb# This replaces the startup Scri        PT and checks MyISAM tables if needed# the first time they is Touchedmyisam-recover = Backupmax_connections = 75sort_buffer_size = 4mjoin_buffer_size = 4mtable_cache = 128k#thread_concurrency = 10## * Query Cache Configuration#query_cachE_limit = 1mquery_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.loglog-error=/var/log/mysql.err#general_log = 1## error logging goes to syslog due to/  etc/mysql/conf.d/mysqld_safe_syslog.cnf.## Here's 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 is used as easy to re Play backup logs or for replication.# note:if is setting up a replication slave, see README. Debian about# Other settings-need to change. #server-id = 1#log_bin =/va R/log/mysql/mysql-bin.logexpire_logs_days = 10max_binlog_size = 100m#binlog_do_db = Include_datab ase_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 Innod B related options. There is many!## * Security features## Read The manual, too, if you want chroot!# chroot =/var/lib/mysql/## for Generati ng 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.peminnodb_additional_mem_pool_size = 50Minnodb_thread_concurrency = 8innodb_flush_method = O_dsyncinnodb_flush_log_at_trx_commit = 2innodb_buffer_pool_size = 8Ginnodb_log_files_in_ Group = 2innodb_log_file_size = 32minnodb_log_buffer_size = 16minnodb_file_per_table = 1innodb_table_locks = 0[mysqldump ]quickquote-namesmax_allowed_packet = 16m[mysql] #no-auto-rehash # faster start of MySQL but no tab COMPLETITION[ISAMC Hk]key_buffer = 16m## * important:additional settings that can override those from this file!# the files m UST end With '. Cnf ', otherwise they 'll be ignored.#!includedir/etc/mysql/conf.d/ 

Any ideas? :(

Mysqlshareimprove this questionAskedMar ' at 23:17Poormysql112
  • 1 Fix the typo. Then it should work. –michael Hampton? Mar ' at 23:22
  • The typo is the minus sign where equals should be:query_cache_size-128m Query_cache_size=128m–user16081-joet Mar ' at 0:13

########## #2.

Problem description "

Use

Service mysqld Start

Failed to start MySQL service, prompt

Starting MySQL. error! The server quit without updating PID file

"Solutions"

In the MY.CNF configuration file, under [Mysqld_safe], add

Log-error =/apps/logs/mysql/error.log # Indicates the location of the MySQL service startup log file, and the path can be changed according to its own system

Then start the MySQL service again, view the Error.log file, note the error tag's prompt, and modify the appropriate errors

MySQL cannot start unkown command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.