Changes between Version 4 and Version 5 of MoveDatabaseToOtherPartition


Ignore:
Timestamp:
2011-04-13T09:26:57+02:00 (13 years ago)
Author:
Marc Jan Bonder
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MoveDatabaseToOtherPartition

    v4 v5  
    44
    552) Stop the MySQL database
    6    "/etc/init.d/mysql stop"
     6   
     7{{{
     8/etc/init.d/mysql stop
     9}}}
     10
    711
    8123) Move the folder to the new directory to the new partition (/your/new/location/)
    913
    10144) Give MySQL ownership of the directory
    11    "chown -R mysql:mysql /your/new/location/*"
     15   
     16{{{
     17chown -R mysql:mysql /your/new/location/*
     18}}}
     19
    1220
    13215) Create a Symlink between the old directory and the new created dir.
    14    "ln -s /your/new/location/MySQLdatabase /var/lib/mysql/MySQLdatabase"
     22   
     23{{{
     24ln -s /your/new/location/MySQLdatabase /var/lib/mysql/MySQLdatabase
     25}}}
     26
    1527
    16286) Edit the AppArmor file (Most often located at: /etc/apparmor.d/usr.sbin.mysqld)
    1729   Add the location of your database to the file.
    18    "  /your/new/location/ r,"
    19    "  /your/new/location/** rwk,"
     30   
     31{{{
     32   /your/new/location/ r,[[BR]]
     33   /your/new/location/** rwk,
     34}}}
     35
    2036
    21377) Restart AppArmor 
    22    "service apparmor restart"
     38   
     39{{{
     40service apparmor restart
     41}}}
     42
    2343
    24448) Restart the MySQL database
    25    "/etc/init.d/mysql start"
     45   
     46{{{
     47/etc/init.d/mysql start
     48}}}
     49
    2650
    2751