Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I change mysql owner from root to something else?

Posted on 2005-04-18
3
Medium Priority
?
953 Views
Last Modified: 2011-09-20
I have a db with 88 tables.  Currently, the owner is root.  I need to change this to be another user.  Is there a way I can change all ownership on these tables to be another user?
0
Comment
Question by:foreverdita
3 Comments
 
LVL 6

Expert Comment

by:ThomasFranke
ID: 13808559
use the chown command.

type 'man chown' to get the manual pages for chown.
0
 
LVL 10

Accepted Solution

by:
kupra1 earned 2000 total points
ID: 13808563
use this:
chown -R "username" /usr/local/mysql/var
0
 
LVL 14

Expert Comment

by:cracky
ID: 13813371
Why would you want to do this?

Wouldn't it be better to create another user with global permissions to your database. Messing with the root user is not generally a good idea. Just create another user with the same privileges as root.

If you want to make file system changes, it's better to temporarily give yourself super user permissions by prefixing your commands with su or sudo and entering your password at the prompt. This way, you can behave as root, but don't lose any security.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question