Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 902

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 902

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 876

Warning: Invalid argument supplied for foreach() in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 877

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 881

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 876

Warning: Invalid argument supplied for foreach() in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 877

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 881

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 902

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 902

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/sites/s/sitracker.org/public_html/w/includes/MagicWord.php on line 902
Difference between revisions of "VM" - Sit

Difference between revisions of "VM"

From Sit
Jump to: navigation, search
m (Move the Database to the new disk)
(Move the Database to the new disk)
Line 239: Line 239:
 
<code><pre>sudo mkdir /var/lib/mydatabase/mysql</pre></code>
 
<code><pre>sudo mkdir /var/lib/mydatabase/mysql</pre></code>
 
* move /var/lib/mysql to your new path
 
* move /var/lib/mysql to your new path
<code><pre>sudo mv /var/lib/mysql/mysql /var/lib/mydatabase/mysql
+
<code><pre>sudo mv /var/lib/mysql /var/lib/mydatabase/mysql</pre></code>
sudo mv /var/lib/mysql/test /var/lib/mydatabase/mysql
+
sudo mv /var/lib/mysql/sit /var/lib/mydatabase/mysql</pre></code>
+
 
* check if the mysql folder is owned by mysql:mysql, else do a  
 
* check if the mysql folder is owned by mysql:mysql, else do a  
 
<code><pre># sudo chown -R mysql:mysql /newpath/mysql</pre></code>
 
<code><pre># sudo chown -R mysql:mysql /newpath/mysql</pre></code>
 +
* If you haven't uninstalled apparmor you'll need to edit the protection there too
 +
** Start by shutting down apparmor
 +
<code><pre># sudo /etc/init.d/apparmor stop</pre></code>
 +
** Edit the apparmor config file for mysql
 +
** edit the lines that say '''/var/lib/mysql''' change to '''/var/lib/mydatabase/mysql''' (there should be 2)
 +
<code><pre># sudo nano /etc/apparmor.d/usr.sbin.mysql</pre></code>
 +
* Start apparmor
 +
<code><pre># sudo /etc/init.d/apparmor start</pre></code>
 
* start the mysql server again  
 
* start the mysql server again  
 
<code><pre># sudo start mysql</pre></code>
 
<code><pre># sudo start mysql</pre></code>

Revision as of 12:51, 20 February 2011

Personal tools
project