restoring sql folder ?

Atari talk, or the life and the universe and things. Just keep it clean!
Post Reply
User avatar
exxos
Site Admin
Posts: 3410
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

restoring sql folder ?

Post by exxos » Mon Jun 11, 2018 7:41 pm

I have a server dump form 6 months ago, I just want to restore a single sql folder... which I can do, but the permissions get put to "root" not "mysql".. Then mysqld uses 100% CPU, assume as it can't access the folder.. so I had to delete it to get my server running again...

but I assume there's some way to restore permissions to the folder so the owner is "mysql" ?? (im using ubuntu)
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

User avatar
exxos
Site Admin
Posts: 3410
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: restoring sql folder ?

Post by exxos » Mon Jun 11, 2018 8:06 pm

Oh found it nevermind...

Code: Select all

sudo chown -R mysql:mysql /var/lib/mysql
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

User avatar
IngoQ
Posts: 621
Joined: Tue Aug 22, 2017 8:38 am
Location: Germany

Re: restoring sql folder ?

Post by IngoQ » Mon Jun 11, 2018 8:07 pm

If it's just the owner, you can assign the correct one by using this command:

Code: Select all

chown mysql:mysql /var/lib/mysql/db/ -R
This example would set the owner and group of the folder "/var/lib/mysql/db/" (and all files and subfolders in it) to "mysql".

You have to be root for this, so in Ubuntu I guess you should prefix it with a "sudo"
Ingo :geek:

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupéry

User avatar
IngoQ
Posts: 621
Joined: Tue Aug 22, 2017 8:38 am
Location: Germany

Re: restoring sql folder ?

Post by IngoQ » Mon Jun 11, 2018 8:07 pm

A little too slow ;)
Ingo :geek:

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupéry

Post Reply