mysql配置后无法在dos里运行

异常:mysql卸载后重新安装后无法在Dos里运行,配置mysql无任何问题,异常原因可能没有mysql.ini的配置文件

一:解决步骤
1:找到mysql下的配置文件

在C:\Program Files\MySQL\MySQL Server 5.6找到默认配置文件my-default.ini(我这里使用的是5.6版本的)
mysql配置后无法在dos里运行_第1张图片

没有的话自己新建一个名为my.ini的文件 内容如下,放在该目录下

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

2:修改my-default.ini文件名为my.ini
mysql配置后无法在dos里运行_第2张图片

3:如果还是不行通过进入到该软件的资源文件下进行运行

mysql配置后无法在dos里运行_第3张图片
进入该软件的资源文件下

cd C:\Program Files\MySQL\MySQL Server 5.6\bin

mysql配置后无法在dos里运行_第4张图片
此时就可以直接通过dos进行运行了
mysql配置后无法在dos里运行_第5张图片

你可能感兴趣的:(java基础,mysql)