问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

mysql5.7怎么修改secure-file-priv

发布网友 发布时间:2022-04-20 20:33

我来回答

3个回答

热心网友 时间:2022-04-10 02:02

安装完mysql-server
会提示可以运行mysql_secure_installation。运行mysql_secure_installation会执行几个设置:

a)为root用户设置密码
b)删除匿名账号
c)取消root用户远程登录
d)删除test库和对test库的访问权限

e)刷新授权表使修改生效

通过这几项的设置能够提高mysql库的安全。建议生产环境中mysql安装这完成后一定要运行一次mysql_secure_installation,详细步骤请参看下面的命令:

复制代码
代码如下:

[root@server1 ~]#
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS
RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP
CAREFULLY!
In order to log into MySQL to secure it, we'll need the
current
password for the root user. If you've just installed MySQL,
and
you haven't set the root password yet, the password will be blank,
so
you should just press enter here.
Enter current password for root (enter for
none):<–初次运行直接回车
OK, successfully used
password, moving on…
Setting the root password ensures that nobody can log
into the MySQL
root user without the proper authorisation.
Set root
password? [Y/n] <–
是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码
Re-enter new password: <– 再输入一次你设置的密码
Password updated
successfully!
Reloading privilege tables..
… Success!
By default, a
MySQL installation has an anonymous user, allowing anyone
to log into MySQL
without having to have a user account created for
them. This is intended only
for testing, and to make the installation
go a bit smoother. You should
remove them before moving into a
proction environment.
Remove anonymous
users? [Y/n] <–
是否删除匿名用户,生产环境建议删除,所以直接回车
… Success!
Normally, root should only be
allowed to connect from 'localhost'. This
ensures that someone cannot guess
at the root password from the network.
Disallow root login remotely?
[Y/n]
<–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止
… Success!
By default, MySQL
comes with a database named 'test' that anyone can
access. This is also
intended only for testing, and should be removed
before moving into a
proction environment.
Remove test database and access to it? [Y/n] <– 是否删除test数据库,直接回车
- Dropping test
database…
… Success!

热心网友 时间:2022-04-10 03:20

安装完mysql-server ,

会提示可以运行mysql_secure_installation,运行mysql_secure_installation会执行几个设

置:

为root用户设置密码;

删除匿名账号;

取消root用户远程登录;

删除test库和对test库的访问权限;

刷新授权表使修改生效;

通过这几项的设置能够提高mysql库的安全,建议生产环境中mysql安装这完成后一定要运行一

次mysql_secure_installation,详细步骤请参看下面的命令;

复制代码,代码如下:

[root@server1 ~]# ;

mysql_secure_installation;

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS ;

RECOMMENDED FOR ALL MySQL;

SERVERS IN PRODUCTION USE PLEASE READ EACH STEP ;

CAREFULLY;

In order to log into MySQL to secure it we'll need the ;

current;

password for the root user If you've just installed MySQL;

and;

you haven't set the root password yet the password will be blank;

so ;

you should just press enter here;

Enter current password for root (enter for none)<–初次运行直接回车;

OK successfully used ;

password moving on;

Setting the root password ensures that nobody can log ;

into the MySQL;

root user without the proper authorisation;

Set root ;

password?[Y/n] <– ;

是否设置root用户密码,输入y并回车或直接回车;

New password: <– 设置root用户的密码;

Re-enter new password: <– 再输入一次你设置的密码;

Password updated ;

successfully;

Reloading privilege tables;

Success;

By default a ;

MySQL installation has an anonymous user allowing anyone;

to log into MySQL ;

without having to have a user account created for;

them. This is intended only ;

for testing and to make the installation;

go a bit smoother. You should ;

remove them before moving into a;

proction environment;

Remove anonymous ;

users [Y/n] <– ;

是否删除匿名用户,生产环境建议删除,所以直接回车;

Success;

Normally root should only be ;

allowed to connect from  localhost;

This ensures that someone cannot guess ;

at the root password from the network;

Disallow root login remotely;

[Y/n] ;

<–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止;

By default MySQL ;

comes with a database named 'test' that anyone can;

access This is also ;

intended only for testing, and should be removed;

before moving into a ;

proction environment;

Remove test database and access to it [Y/n] <– 是否删除test数据库 直接回车;

Dropping test ;

database;

Success。

热心网友 时间:2022-04-10 04:54

我解决了,我的解决办法是我原先的ini文件名叫做 my-default.ini 我把他改成了my.ini 然后重启了mysql服务 就可以了 你可以修改一下文件名试试 我估计是他某个地方有缓存配置
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
iphone手机其他系统数据如何删除 iphone的其他系统数据怎么清理_百度... 怎样避免开关插座的安全隐患? 【有问有答】图书报价的专业称谓是什么 信息沟通的内容包括哪些 ...对应多个项目的时候,如何用函数公式把他们汇总(如图)? 昆明市官渡区交通运输局(关于昆明市官渡区交通运输局的简介) 非全幅镜头用在全幅相机上会有什么效果? 尼康z8什么时候上市 尼康z8参数发布时间规格曝光 excel中rank函数怎么用?! excel表格排位函数表格中排位函数 mac上的mysql的secure_file_priv怎么设置。 android用jdbc无法直连mysql数据库 mysqlroot用户指定连接IP 李连杰拍了哪些电影? 洪金宝的电影有哪些 武术冠军出身,出演黄飞鸿等角色为人所熟知的明星... 香港演员洪金宝个人资料及拍过哪些电影? 揭秘李连杰的真实身份 赵文卓主演的一部黄飞鸿的名称 李连杰和黄道明一部古装剧叫什么 “二周一成”是说香港哪三个人? 问一黄飞鸿电影? 黄飞鸿系列电影都有哪些 李连杰的黄飞鸿系列一共出了几个啊? 李连杰的黄飞鸿系列一共有几部 徐克导演的&lt;黄飞鸿&gt;分别有哪几部? 哪可以查到历年香港电影的票房 李连杰的黄飞鸿系列电影共有几部?导演是谁?动作... 各位,请问李连杰经典的电影都有哪些?谢了 谁知道1990到2008年的香港票房 Android用jdbc链接mysql并对数据库进行增,删,改,查... linux 怎么部署mysql数据库 怎样知道购买的股票是否有分红,何时分红 购买普通股票每年都会得到分红吗 所买的股票分红派股一般什么时候到自己的账户 买股票获得的分红怎么领取? 购买的股票什么时候分红,要买多久后才有分红 买股票如何能得到分红、派息? 买了股票怎样得到分红 请问如何计算自己购买的股票的分红? 购买了股票后,等多长时间就能等到分红了? 我今天刚买的股票,他就公布说今天分红,那我如何... 买的股票要分红了,我不明白是什么意思,我上个月... 个人在网上买的股票有分红吗?分到的钱怎么到帐?还... 我想问股票分红是怎么回事,怎么分,是不是买了股... 手中买的股票可以分红的? 买了股票能分红吗 股票分红是怎么分的 买股票可以分红吗?怎么买到能分红的股票? wps文字为什么整个界面很暗