Change MySQL datadir location
Posted by: Ahmad Sakhi
Date: June 02, 2016 08:51AM

Hello everyone,

I am planning to change the location of my datadir. Here is some background information.


- MySQL is currently configured in its default datadir location as
/var/lib/mysql

- MySQL is configured to start/stop, using "sudo service" command, using "user1".

- /home/user1 doesn't have enough space so I can move datadir under user1 home directory.

- I have user2 [/home/user2] that has plenty of space, which I am planning to move my datadir.

- When doing that -I changed the ownership of datadir, under /home/user2/mysql to "mysql" user -, but still I am getting "Permission denied" error, when starting MySQL service, using user1.

- My question is -- and probably this is more a unix thing, how can I can ensure the following:

- /home/user2/mysql/datadir
- using user1 to start/stop MySQL service.
- Do I need to give user1 full access to /home/user2?

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Change MySQL datadir location
June 02, 2016 08:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.