问题描述
重装也报错。。。。。。。。。。。。。。
解决方案
解决方案二:
#Otherdefaulttuningvalues#MySQLServerInstanceConfigurationFile#----------------------------------------------------------------------#GeneratedbytheMySQLServerInstanceConfigurationWizard
解决方案三:
InstallationInstructions#----------------------------------------------------------------------##OnLinuxyoucancopythisfileto/etc/my.cnftosetglobaloptions,#mysql-data-dir/my.cnftosetserver-specificoptions#(@localstatedir@forthisinstallation)orto#~/.my.cnftosetuser-specificoptions.##OnWindowsyoushouldkeepthisfileintheinstallationdirectory#ofyourserver(e.g.C:ProgramFilesMySQLMySQLServerX.Y).To#makesuretheserverreadstheconfigfileusethestartupoption#"--defaults-file".##Torunruntheserverfromthecommandline,executethisina#commandlineshell,e.g.#mysqld--defaults-file="C:ProgramFilesMySQLMySQLServerX.Ymy.ini"##ToinstalltheserverasaWindowsservicemanually,executethisina#commandlineshell,e.g.#mysqld--installMySQLXY--defaults-file="C:ProgramFilesMySQLMySQLServerX.Ymy.ini"##Andthenexecutethisinacommandlineshelltostarttheserver,e.g.#netstartMySQLXY
解决方案四:
Guildlinesforeditingthisfile#----------------------------------------------------------------------##Inthisfile,youcanusealllongoptionsthattheprogramsupports.#Ifyouwanttoknowtheoptionsaprogramsupports,starttheprogram#withthe"--help"option.##Moredetailedinformationabouttheindividualoptionscanalsobe#foundinthemanual.##Foradviceonhowtochangesettingspleasesee#http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
解决方案五:
CLIENTSECTION#----------------------------------------------------------------------##ThefollowingoptionswillbereadbyMySQLclientapplications.#NotethatonlyclientapplicationsshippedbyMySQLareguaranteed#toreadthissection.IfyouwantyourownMySQLclientprogramto#honorthesevalues,youneedtospecifyitasanoptionduringthe#MySQLclientlibraryinitialization.#[client]no-beep#pipe#socket=mysqlport=3306[mysql]default-character-set=utf8
解决方案六:
#SERVERSECTION#----------------------------------------------------------------------##ThefollowingoptionswillbereadbytheMySQLServer.Makesurethat#youhaveinstalledtheservercorrectly(seeabove)soitreadsthis#file.##server_type=3[mysqld]#ThenextthreeoptionsaremutuallyexclusivetoSERVER_PORTbelow.#skip-networking#enable-named-pipe#ThePipetheMySQLServerwilluse#socket=mysql#TheTCP/IPPorttheMySQLServerwilllistenonport=3306#Pathtoinstallationdirectory.Allpathsareusuallyresolvedrelativetothis.#basedir="D:/MySQL/MySQLServer5.7/"#Pathtothedatabaserootdatadir="D:/MySQL/MySQLServer5.7/data"#Thedefaultcharactersetthatwillbeusedwhenanewschemaortableis#createdandnocharactersetisdefinedcharacter-set-server=utf8#Thedefaultstorageenginethatwillbeusedwhencreatenewtableswhendefault-storage-engine=INNODB#SettheSQLmodetostrictsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"#EnableWindowsAuthentication#plugin-load=authentication_windows.dll#GeneralandSlowlogging.log-output=FILEgeneral-log=0general_log_file="ADMINISTATOR-PC.log"slow-query-log=1slow_query_log_file="ADMINISTATOR-PC-slow.log"long_query_time=10#BinaryLogging.#log-bin#ErrorLogging.log-error="ADMINISTATOR-PC.err"#ThemaximumamountofconcurrentsessionstheMySQLserverwill#allow.Oneoftheseconnectionswillbereservedforauserwith#SUPERprivilegestoallowtheadministratortologinevenifthe#connectionlimithasbeenreached.max_connections=151#QuerycacheisusedtocacheSELECTresultsandlaterreturnthem#withoutactualexecutingthesamequeryonceagain.Havingthequery#cacheenabledmayresultinsignificantspeedimprovements,ifyour#havealotofidenticalqueriesandrarelychangingtables.Seethe#"Qcache_lowmem_prunes"statusvariabletocheckifthecurrentvalue#ishighenoughforyourload.#Note:Incaseyourtableschangeveryoftenorifyourqueriesare#textuallydifferenteverytime,thequerycachemayresultina#slowdowninsteadofaperformanceimprovement.query_cache_size=0#Thenumberofopentablesforallthreads.Increasingthisvalue#increasesthenumberoffiledescriptorsthatmysqldrequires.#Thereforeyouhavetomakesuretosettheamountofopenfiles#allowedtoatleast4096inthevariable"open-files-limit"in#section[mysqld_safe]table_open_cache=2000#Maximumsizeforinternal(in-memory)temporarytables.Ifatable#growslargerthanthisvalue,itisautomaticallyconvertedtodisk#basedtableThislimitationisforasingletable.Therecanbemany#ofthem.tmp_table_size=14M#Howmanythreadsweshouldkeepinacacheforreuse.Whenaclient#disconnects,theclient'sthreadsareputinthecacheiftherearen't#morethanthread_cache_sizethreadsfrombefore.Thisgreatlyreduces#theamountofthreadcreationsneededifyouhavealotofnew#connections.(Normallythisdoesn'tgiveanotableperformance#improvementifyouhaveagoodthreadimplementation.)thread_cache_size=10#***MyISAMSpecificoptions#ThemaximumsizeofthetemporaryfileMySQLisallowedtousewhile#recreatingtheindex(duringREPAIR,ALTERTABLEorLOADDATAINFILE.#Ifthefile-sizewouldbebiggerthanthis,theindexwillbecreated#throughthekeycache(whichisslower).myisam_max_sort_file_size=100G#Ifthetemporaryfileusedforfastindexcreationwouldbebigger#thanusingthekeycachebytheamountspecifiedhere,thenpreferthe#keycachemethod.Thisismainlyusedtoforcelongcharacterkeysin#largetablestousetheslowerkeycachemethodtocreatetheindex.myisam_sort_buffer_size=19M#SizeoftheKeyBuffer,usedtocacheindexblocksforMyISAMtables.#Donotsetitlargerthan30%ofyouravailablememory,assomememory#isalsorequiredbytheOStocacherows.Evenifyou'renotusing#MyISAMtables,youshouldstillsetitto8-64Masitwillalsobe#usedforinternaltemporarydisktables.key_buffer_size=8M#SizeofthebufferusedfordoingfulltablescansofMyISAMtables.#Allocatedperthread,ifafullscanisneeded.read_buffer_size=39Kread_rnd_buffer_size=256K#ThisbufferisallocatedwhenMySQLneedstorebuildtheindexin#REPAIR,OPTIMZE,ALTERtablestatementsaswellasinLOADDATAINFILE#intoanemptytable.Itisallocatedperthreadsobecarefulwith#largesettings.sort_buffer_size=256K#***INNODBSpecificoptions***#innodb_data_home_dir=0.0#UsethisoptionifyouhaveaMySQLserverwithInnoDBsupportenabled#butyoudonotplantouseit.Thiswillsavememoryanddiskspace#andspeedupsomethings.#skip-innodb#Ifsetto1,InnoDBwillflush(fsync)thetransactionlogstothe#diskateachcommit,whichoffersfullACIDbehavior.Ifyouare#willingtocompromisethissafety,andyouarerunningsmall#transactions,youmaysetthisto0or2toreducediskI/Otothe#logs.Value0meansthatthelogisonlywrittentothelogfileand#thelogfileflushedtodiskapproximatelyoncepersecond.Value2#meansthelogiswrittentothelogfileateachcommit,butthelog#fileisonlyflushedtodiskapproximatelyoncepersecond.innodb_flush_log_at_trx_commit=1#ThesizeofthebufferInnoDBusesforbufferinglogdata.Assoonas#itisfull,InnoDBwillhavetoflushittodisk.Asitisflushed#oncepersecondanyway,itdoesnotmakesensetohaveitverylarge#(evenwithlongtransactions).innodb_log_buffer_size=1M#InnoDB,unlikeMyISAM,usesabufferpooltocachebothindexesand#rowdata.ThebiggeryousetthisthelessdiskI/Oisneededto#accessdataintables.Onadedicateddatabaseserveryoumaysetthis#parameterupto80%ofthemachinephysicalmemorysize.Donotsetit#toolarge,though,becausecompetitionofthephysicalmemorymay#causepagingintheoperatingsystem.Notethaton32bitsystemsyou#mightbelimitedto2-3.5Gofuserlevelmemoryperprocess,sodonot#setittoohigh.innodb_buffer_pool_size=8M#Sizeofeachlogfileinaloggroup.Youshouldsetthecombinedsize#oflogfilestoabout25%-100%ofyourbufferpoolsizetoavoid#unneededbufferpoolflushactivityonlogfileoverwrite.However,#notethatalargerlogfilesizewillincreasethetimeneededforthe#recoveryprocess.innodb_log_file_size=48M#NumberofthreadsallowedinsidetheInnoDBkernel.Theoptimalvalue#dependshighlyontheapplication,hardwareaswellastheOS#schedulerproperties.Atoohighvaluemayleadtothreadthrashing.innodb_thread_concurrency=9#Theincrementsize(inMB)forextendingthesizeofanauto-extendInnoDBsystemtablespacefilewhenitbecomesfull.innodb_autoextend_increment=64#ThenumberofregionsthattheInnoDBbufferpoolisdividedinto.#Forsystemswithbufferpoolsinthemulti-gigabyterange,dividingthebufferpoolintoseparateinstancescanimproveconcurrency,#byreducingcontentionasdifferentthreadsreadandwritetocachedpages.innodb_buffer_pool_instances=8#DeterminesthenumberofthreadsthatcanenterInnoDBconcurrently.innodb_concurrency_tickets=5000#Specifieshowlonginmilliseconds(ms)ablockinsertedintotheoldsublistmuststaythereafteritsfirstaccessbefore#itcanbemovedtothenewsublist.innodb_old_blocks_time=1000#Itspecifiesthemaximumnumberof.ibdfilesthatMySQLcankeepopenatonetime.Theminimumvalueis10.innodb_open_files=300#Whenthisvariableisenabled,InnoDBupdatesstatisticsduringmetadatastatements.innodb_stats_on_metadata=0#Wheninnodb_file_per_tableisenabled(thedefaultin5.6.6andhigher),InnoDBstoresthedataandindexesforeachnewlycreatedtable#inaseparate.ibdfile,ratherthaninthesystemtablespace.innodb_file_per_table=1#Usethefollowinglistofvalues:0forcrc32,1forstrict_crc32,2forinnodb,3forstrict_innodb,4fornone,5forstrict_none.innodb_checksum_algorithm=0#ThenumberofoutstandingconnectionrequestsMySQLcanhave.#ThisoptionisusefulwhenthemainMySQLthreadgetsmanyconnectionrequestsinaveryshorttime.#Itthentakessometime(althoughverylittle)forthemainthreadtochecktheconnectionandstartanewthread.#Theback_logvalueindicateshowmanyrequestscanbestackedduringthisshorttimebeforeMySQLmomentarily#stopsansweringnewrequests.#Youneedtoincreasethisonlyifyouexpectalargenumberofconnectionsinashortperiodoftime.back_log=80#Ifthisissettoanonzerovalue,alltablesareclosedeveryflush_timesecondstofreeupresourcesand#synchronizeunflusheddatatodisk.#Thisoptionisbestusedonlyonsystemswithminimalresources.flush_time=0#Theminimumsizeofthebufferthatisusedforplainindexscans,rangeindexscans,andjoinsthatdonotuse#indexesandthusperformfulltablescans.join_buffer_size=256K#Themaximumsizeofonepacketoranygeneratedorintermediatestring,oranyparametersentbythe#mysql_stmt_send_long_data()CAPIfunction.max_allowed_packet=4M#Ifmorethanthismanysuccessiveconnectionrequestsfromahostareinterruptedwithoutasuccessfulconnection,#theserverblocksthathostfromperformingfurtherconnections.max_connect_errors=100#Changesthenumberoffiledescriptorsavailabletomysqld.#Youshouldtryincreasingthevalueofthisoptionifmysqldgivesyoutheerror"Toomanyopenfiles".open_files_limit=4161
解决方案七:
#Setthequerycachetype.0forOFF,1forONand2forDEMAND.query_cache_type=0#Ifyouseemanysort_merge_passespersecondinSHOWGLOBALSTATUSoutput,youcanconsiderincreasingthe#sort_buffer_sizevaluetospeedupORDERBYorGROUPBYoperationsthatcannotbeimprovedwithqueryoptimization#orimprovedindexing.sort_buffer_size=256K#Thenumberoftabledefinitions(from.frmfiles)thatcanbestoredinthedefinitioncache.#Ifyouusealargenumberoftables,youcancreatealargetabledefinitioncachetospeedupopeningoftables.#Thetabledefinitioncachetakeslessspaceanddoesnotusefiledescriptors,unlikethenormaltablecache.#Theminimumanddefaultvaluesareboth400.table_definition_cache=1400#Specifythemaximumsizeofarow-basedbinarylogevent,inbytes.#Rowsaregroupedintoeventssmallerthanthissizeifpossible.Thevalueshouldbeamultipleof256.binlog_row_event_max_size=8K#Ifthevalueofthisvariableisgreaterthan0,areplicationslavesynchronizesitsmaster.infofiletodisk.#(usingfdatasync())aftereverysync_master_infoevents.sync_master_info=10000#Ifthevalueofthisvariableisgreaterthan0,theMySQLserversynchronizesitsrelaylogtodisk.#(usingfdatasync())aftereverysync_relay_logwritestotherelaylog.sync_relay_log=10000#Ifthevalueofthisvariableisgreaterthan0,areplicationslavesynchronizesitsrelay-log.infofiletodisk.#(usingfdatasync())aftereverysync_relay_log_infotransactions.sync_relay_log_info=10000