Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:50:29+00:00 2026-05-27T05:50:29+00:00

I am on a Linux ubuntu machine with MySQL installed. If there is a

  • 0

I am on a Linux ubuntu machine with MySQL installed.

If there is a MySQL installation on a Ubuntu machine, I saw some people doing the following thing:

sudo chown mysql:mysql /data/tmp

I get confused, I know the meaning of the above command, which is to change the owner of /data/tmp to user ‘mysql‘ and change the group of it to ‘mysql‘ group.

But (my questions):

1. Why would one run the above command? If I create a table in my_db database, by default, there will be .frm, .MYD, and .MYI files (data files) be created automatically by MySQL under /var/lib/mysql/my_db/ . So, does the above command changes the default MySQL data directory to /data/tmp/ instead of /var/lib/mysql/my_db/?

Basically, I would like to know the purpose and effect of the above command. (better with examples)

2. Where does the ‘mysql’ owner and group come from? Does the installation of MySQL on a Linux machine automatically create the ‘mysql’ user and group? or People need to manually create a mysql account for the linux machine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:50:30+00:00Added an answer on May 27, 2026 at 5:50 am

    MySQL needs to own its own directories, as it will be creating/deleting files within that directory. If the dir is owned by some other user ID, then mysql may fail because it can’t do whatever file manipulations it needs. Once it has ownership of the directory, it’s got carte-blanche.

    The mysql user is an arbitrary choice. It could easily be ‘fred’ instead. But most people use mysql since that’s the obvious choice. It’s generally created by the package installers if you’re installing a distro’s pre-compiled version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just installed Zend Studio 7.0.2 on my Linux-Ubuntu 9.10 system. There were no
I developed a process with some threads on a Linux machine (Ubuntu). I'd like
I have a Windows XP machine and a Linux machine running Ubuntu. I share
I just installed Oracle on my Amazon's Virtual EC2 Linux (Ubuntu) Server. Because i'm
I have a following problem: I compiled my application on Linux Ubuntu 9.10 using
I am running QT Creator on a Linux Ubuntu 9.10 machine. I just got
I am trying to compile the Linux kernel on my Ubuntu machine But I
I have Riak (1.0.2) installed in my VMWare Workstation running Ubuntu Linux Natty. It's
I installed mysql server on linux box IP = 192.168.1.100 but when i try
I have a Perl script on a Linux (Ubuntu 8.10) machine and I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.