以root身份启动Mysql [英] Starting Mysql as root
问题描述
我已经以根用户身份在测试服务器上启动了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屋!