Mysql 8.0 to solve the problem in secure_file_priv

Nothing more than to import a file
on the command line to import data txt file experience problems secure_file_priv of
searching through stackoverflow are hard to find solutions to problems

In Mysql 8.0 + Windows environment

summarize the
first file name is my.ini was
then followed by a secure-file-priv = rather than an underscore
then = back without the quotation marks
so it should be such a

[mysqld]
secure-file-priv=
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=D:\\mysql-8.0.19-winx64\\mysql-8.0.19-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\\mysql-8.0.19-winx64\\mysql-8.0.19-winx64\\data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10
# 服务端使用的字符集默认为UTF8
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8

Then changing for the better after the opening win powershell with administrator privileges
to restart the mysql service
NET STOP mysql
NET Start mysql

Guess you like

Origin www.cnblogs.com/yahoo17/p/12666927.html