1、查看任务管理器中是否有mysqld相关的进程,如果有需要结束进程;
2、配置文件是否错误,下面是寻找到的一片配置文档
[client]
port=3306
[mysql]
default-character-set=utf8
# SERVERSECTION
#----------------------------------------------------------------------
#
# The following options will bereadbythe MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listenon
port=3306
#Pathtoinstallation directory.Allpaths are usually resolvedrelativetothis.
basedir="E:/wamp/mysql/"
#Pathtothedatabaseroot
datadir="E:/wamp/mysql/data/Data/"
# Thedefaultcharactersetthat will be usedwhena newschemaortableis
# createdandnocharactersetisdefined
character-set-server=utf8
# Thedefaultstorage engine that will be usedwhencreatenew tableswhen
default-storage-engine=INNODB
#Setthe SQL modetostrict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# The maximum amountofconcurrent sessions the MySQL server will
# allow. Oneofthese connections will be reservedforauserwith
# SUPERprivilegestoallow the administratortologin even if the
#connectionlimit has been reached.
max_connections=100
# Query cacheisusedtocacheSELECTresultsandlaterreturnthem
# without actual executing the same query once again.Havingthe query
# cache enabled may resultinsignificant speed improvements, if your
# have a lotofidentical queriesandrarely changing tables. See the
#"Qcache_lowmem_prunes"status variabletocheckif thecurrentvalue
#ishigh enoughforyourload.
# Note:Incaseyour tables change very oftenorif your queries are
# textually different everytime, the query cache may resultina
# slowdowninsteadofa performance improvement.
query_cache_size=0
# The numberofopentablesforallthreads. Increasing this value
# increases the numberoffile descriptors that mysqld requires.
# Therefore you havetomake suretosetthe amountofopenfiles
# allowedtoatleast 4096inthe variable"open-files-limit"in
#section[mysqld_safe]
table_cache=256
# Maximumsizeforinternal (in-memory)temporarytables. If atable
# grows larger than this value, itisautomatically convertedtodisk
# basedtableThis limitationisfora singletable. There can be many
#ofthem.
tmp_table_size=34M
# How many threads we should keepina cacheforreuse.Whena client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threadsfrombefore. This greatly reduces
# the amountofthread creations needed if you have a lotofnew
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8
#*** MyISAM Specific options
# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=68M
# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you'renotusing
# MyISAM tables, you should stillsetitto8-64Masit will also be
# usedforinternaltemporarydisk tables.
key_buffer_size=55M
#Sizeofthe buffer usedfordoingfulltablescansofMyISAM tables.
# Allocated per thread, if afullscanisneeded.
read_buffer_size=64K
read_rnd_buffer_size=256K
# This bufferisallocatedwhenMySQL needstorebuild theindexin
# REPAIR, OPTIMZE,ALTERtablestatementsaswellasinLOADDATA INFILE
#intoan emptytable. Itisallocated per thread so be carefulwith
# large settings.
sort_buffer_size=256K
#*** INNODB Specific options ***
# Use thisoptionif you have a MySQL serverwithInnoDB support enabled
# but you donotplantouse it. This will save memoryanddiskspace
#andspeed upsomethings.
#skip-innodb
# Additional memory pool thatisusedbyInnoDBtostore metadata
# information. If InnoDB requires more memoryforthis purpose it will
# starttoallocate itfromthe OS.Asthisisfast enoughonmost
# recent operating systems, you normally donotneedtochange this
# value. SHOW INNODB STATUS will display thecurrentamount used.
innodb_additional_mem_pool_size=3M
# Ifsetto1, InnoDB will flush (fsync) thetransactionlogstothe
# diskateachcommit, which offersfullACID behavior. If you are
# willingtocompromise this safety,andyou are running small
# transactions, you maysetthisto0or2toreduce disk I/Otothe
# logs. Value 0 means that the logisonlywrittentothe log fileand
# the log file flushedtodisk approximately once persecond. Value 2
# means the logiswrittentothe log fileateachcommit, but the log
# fileisonlyflushedtodisk approximately once persecond.
innodb_flush_log_at_trx_commit=1
# Thesizeofthe buffer InnoDB usesforbuffering log data.Assoonas
# itisfull, InnoDB will havetoflush ittodisk.Asitisflushed
# once persecondanyway, it doesnotmake sensetohave it very large
# (evenwithlong transactions).
innodb_log_buffer_size=2M
# InnoDB, unlike MyISAM, uses a buffer pooltocache both indexesand
# row data. The bigger yousetthis the less disk I/Oisneededto
# access dataintables.Ona dedicateddatabaseserver you maysetthis
# parameter upto80%ofthe machine physical memorysize. Donotsetit
# too large, though, because competitionofthe physical memory may
# cause paginginthe operating system. Note thaton32bit systems you
# might be limitedto2-3.5Gofuserlevelmemory per process, so donot
#setit too high.
innodb_buffer_pool_size=106M
#Sizeofeach log fileina loggroup. You shouldsetthe combinedsize
#oflog filestoabout 25%-100%ofyour buffer poolsizetoavoid
# unneeded buffer pool flush activityonlog file overwrite. However,
# note that a larger logfilesizewill increase thetimeneededforthe
# recovery process.
innodb_log_file_size=53M
# Numberofthreads allowed inside the InnoDB kernel. The optimal value
# depends highlyonthe application, hardwareaswellasthe OS
# scheduler properties. A too high value may leadtothread thrashing.
innodb_thread_concurrency=10
网友评论