您好,欢迎访问一九零五行业门户网

读官方指南经历Mysql5.6服务安装

上一次安装完成mysql5.6服务,一段时间后发生异常,mysql服务无法启动进程终止:1067;网上找了好多方法还是没能解决这个问题,今天重新安装mysql5.6,同样出现
   上一次安装完成mysql5.6服务,一段时间后发生异常,mysql服务无法启动进程终止: 1067;网上找了好多方法还是没能解决这个问题,今天重新安装mysql5.6,同样出现这个问题,后来通过阅读
mysql 5.6 reference manual including mysql cluster ndb 7.3 reference guide
这个问题最终得以解决了。
下面是安装mysql on windows 解压安装方式。
#path to installation directory. all paths are usually resolved relative to this.#basedir=c:/program files/mysql/mysql server 5.0/basedir = d:/__dev/mysql-5.6.12-win32#path to the database root#datadir=c:/program files/mysql/mysql server 5.0/data/datadir = d:/__dev/mysql-5.6.12-win32/data   如上图配置basedir和datadir.
  在开发指南上有精简配置如下图:
5. 使用管理员权限运行命令窗口,香港虚拟主机,切换工作目录为path目录下,安装mysql服务
mysqld -install出现service successfully installed.表示安装服务成功
6. 启动mysql服务
net start mysql7.登录到mysql,并修改root用户密码,默认为空
mysql>mysq -urootmysql>update mysql.user set password=password('root') where user='root'问题解决了,mysql5.6的配置文件在安装目录下,香港服务器,名字已经变为my-default.ini.
详细配置信息如下:
[client]port=3306[mysql]#default-character-set=latin1default-character-set=utf8[mysqld]# the tcp/ip port the mysql server will listen onport=3306#log-error=c:\error.log#path to installation directory. all paths are usually resolved relative to this.#basedir=c:/program files/mysql/mysql server 5.0/basedir = d:/__dev/mysql-5.6.12-win32#path to the database root#datadir=c:/program files/mysql/mysql server 5.0/data/datadir = d:/__dev/mysql-5.6.12-win32/data# the default character set that will be used when a new schema or table is# created and no character set is defineddefault-character-set=utf8# the default storage engine that will be used when create new tables whendefault-storage-engine=innodb# set the sql mode to strictsql-mode=strict_trans_tables,no_auto_create_user,no_engine_substitution# the maximum amount of concurrent sessions the mysql server will# allow. one of these connections will be reserved for a user with# super privileges to allow the administrator to login even if the# connection limit has been reached.max_connections=100# query cache is used to cache select results and later return them# without actual executing the same query once again. having the query# cache enabled may result in significant speed improvements, if your# have a lot of identical queries and rarely changing tables. see the# qcache_lowmem_prunes status variable to check if the current value# is high enough for your load.# note: in case your tables change very often or if your queries are# textually different every time, the query cache may result in a# slowdown instead of a performance improvement.query_cache_size=0# the number of open tables for all threads. increasing this value# increases the number of file descriptors that mysqld requires.# therefore you have to make sure to set the amount of open files# allowed to at least 4096 in the variable open-files-limit in# section [mysqld_safe]table_cache=256# maximum size for internal (in-memory) temporary tables. if a table# grows larger than this value, it is automatically converted to disk# based table this limitation is for a single table. there can be many# of them.tmp_table_size=15m# how many threads we should keep in a cache for reuse. when a client# disconnects, the client's threads are put in the cache if there aren't# more than thread_cache_size threads from before. this greatly reduces# the amount of thread creations needed if you have a lot of new# 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_max_extra_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=30m# 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're not using# myisam tables, you should still set it to 8-64m as it will also be# used for internal temporary disk tables.key_buffer_size=22m# size of the buffer used for doing full table scans of myisam tables.# allocated per thread, if a full scan is needed.read_buffer_size=64kread_rnd_buffer_size=256k# this buffer is allocated when mysql needs to rebuild the index in# repair, optimze, alter table statements as well as in load data infile# into an empty table. it is allocated per thread so be careful with# large settings.sort_buffer_size=256k#*** innodb specific options ***# use this option if you have a mysql server with innodb support enabled# but you do not plan to use it. this will save memory and disk space# and speed up some things.#skip-innodb# additional memory pool that is used by innodb to store metadata# information. if innodb requires more memory for this purpose it will# start to allocate it from the os. as this is fast enough on most# recent operating systems, you normally do not need to change this# value. show innodb status will display the current amount used.innodb_additional_mem_pool_size=2m# if set to 1, innodb will flush (fsync) the transaction logs to the# disk at each commit, which offers full acid behavior. if you are# willing to compromise this safety, and you are running small# transactions, you may set this to 0 or 2 to reduce disk i/o to the# logs. value 0 means that the log is only written to the log file and# the log file flushed to disk approximately once per second. value 2# means the log is written to the log file at each commit, but the log# file is only flushed to disk approximately once per second.innodb_flush_log_at_trx_commit=1# the size of the buffer innodb uses for buffering log data. as soon as# it is full, innodb will have to flush it to disk. as it is flushed# once per second anyway, it does not make sense to have it very large# (even with long transactions).innodb_log_buffer_size=1m# innodb, unlike myisam, uses a buffer pool to cache both indexes and# row data. the bigger you set this the less disk i/o is needed to# access data in tables. on a dedicated database server you may set this# parameter up to 80% of the machine physical memory size. do not set it# too large, though, because competition of the physical memory may# cause paging in the operating system. note that on 32bit systems you# might be limited to 2-3.5g of user level memory per process, so do not# set it too high.innodb_buffer_pool_size=40m# size of each log file in a log group. you should set the combined size# of log files to about 25%-100% of your buffer pool size to avoid# unneeded buffer pool flush activity on log file overwrite. however,# note that a larger logfile size will increase the time needed for the# recovery process.innodb_log_file_size=20m# number of threads allowed inside the innodb kernel. the optimal value# depends highly on the application, hardware as well as the os# scheduler properties. a too high value may lead to thread thrashing.innodb_thread_concurrency=8log-error=d:/__dev/mysql-5.6.12-win32/err.loglog=d:/__dev/mysql-5.6.12-win32/log.log配置文件my-default.ini见附件下载,香港服务器租用,下载之后去掉后缀名(.txt).
本文出自 “野马红尘” 博客,谢绝转载!
其它类似信息

推荐信息