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
(Prepare the new disk in ubuntu)
m (Move the Database to the new disk)
Line 229: Line 229:
  
 
* Stop the mysql server  
 
* Stop the mysql server  
<code><pre># sudo /etc/init.d/mysql stop</pre></code>
+
<code><pre># sudo stop mysql</pre></code>
 
* edit the mysql config file
 
* edit the mysql config file
 
<code><pre># sudo nano /etc/mysql/my.cn</pre></code>
 
<code><pre># sudo nano /etc/mysql/my.cn</pre></code>
* Change the following line to your new path
+
* Find the datadir (CTRL-W and search for datadir)
 
<code><pre>datadir        = /var/lib/mysql</pre></code>
 
<code><pre>datadir        = /var/lib/mysql</pre></code>
 +
Set it to
 +
<code><pre>datadir        = /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 /var/lib/mydatabase </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>
 
* start the mysql server again  
 
* start the mysql server again  
<code><pre># sudo /etc/init.d/mysql start</pre></code>
+
<code><pre># sudo start mysql</pre></code>
  
 
===Expanding disk===
 
===Expanding disk===

Revision as of 11:57, 20 February 2011

Personal tools
project