I have started mysql on my test server as a root. I have added
user=root
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?
The 'root' user for MySQL is NOT the same as the root user for logging in to the computer, so there should be no side effects provided you GRANT the appropriate rights to the mysql user on the production server.
That is the user mentioned in
$ mysql -u user -p password db_name
which could share a name with a user logged in to the computer, but doesn't have to.
EDIT: note - an ordinary user can start mysql as root if the correct password is used in the command above. This won't be the same as root's password, if you know what I mean.
If it's not clear you should definitely familiarise yourself with the meaning of 'root' in a MySQL context.
first step would be to back up your data directory.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With