安装mysql最后⼀步未响应,卡死。MySQL5.5解决⽅法
安装MySQL点击执⾏完,最后⼀步会有四个步骤,⼀个✓都不打,然后卡死 (win10)
⾸先声明,此⽅法不是通⽤⽅法,⼀般解决因为安装后MySQL服务⽆法启动的问题
1.先打开⾃⼰的安装⽬录下看看有没有my.ini⽂件,如果没有就到桌⾯新建⼀个txt⽂本,名字改为my.ini,⾥⾯的内容可复制本⽂最下⽅的,然后把这个⽂件复制到安装⽬录下
2.再打开⾃⼰的服务,win+s输⼊服务直接搜索就⾏.看看有没有MySQL的服务,
如果有就启动, 如果没有就以管理员⾝份打开命令提⽰符
3.然后进⼊MySQL的安装⽬录下的bin⽬录
cd C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin (我的在C盘)
4.然后在命令⾏输⼊ –install 回车显⽰
Service successfully installed
再输⼊ net start mysql 回车显⽰正在启动启动成功 (如果没效果就可以尝试卸载MySQL重装,也是可能成功的)
再打开⾃⼰的开始菜单,点击MySQL 5.5 Command Line Client
5.输⼊密码,回车如果闪退, 就去安装⽬录下打开my.ini在mysqld下⾯添skip-grant-tables
6.再打开⼀次MySQL 5.5 Command Line Client
输⼊密码,回车如果闪退,
打开MySQL 5.5 Command Line Client 不输密码回车再试⼀次如果都没有⽤,那么本解决⽅案不适合你的问题
配置内容注意事项
安装路径和⽂件保存路径要改为⾃⼰的
my.ini 配置内容
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/myf to set global options,mysql下载starting the server
# mysql-data-dir/myf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.myf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" #
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
port=3306
[mysql]
default-character-set=utf8
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
#skip-grant-tables
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files (x86)/MySQL/MySQL Server 5.5/"
#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"
# The default character set that will be used when a new schema or table is
# created and no character set is defined
character-set-server=utf8
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
# Set the SQL mode to strict
sql-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=15M
# 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=18M
# 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
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论