以root身份启动Mysql [英] Starting Mysql as root

查看:738
本文介绍了以root身份启动Mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经以根用户身份在测试服务器上启动了mysql.我已添加

I have started mysql on my test server as a root. I have added

user=root 

my.cnf中的

行 由于我希望测试服务器升级到生产服务器,因此我想在此行中添加注释并重新启动.

line in my.cnf Since I want the test server to upgrade to production server, I will like to comment this line and restart.

有副作用吗?预期会丢失数据?

Are there any side effects? data loss expected?

推荐答案

第一步是备份数据目录.

first step would be to back up your data directory.

完成此操作后,继续进行更改.只需确保您有一个名为mysql的用户(或明确指定其他用户),并且对数据目录具有适当的权限即可.

after you've done that, go ahead and make the change. just make sure that you have a user named mysql (or specify a different one explicitly) and that they have appropriate permissions to the data directory.

这是一个非常安全的操作,不会导致功能或数据丢失.但以防万一,您确实有备份!

this is a pretty safe operation to do and should result in no loss of functionality or data. but just in case, you do have the backup!

这篇关于以root身份启动Mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆