By default all databases are saved in /var/lib/mysql
Because this is in the root partition you might quickly use up root
partition if you create large databases. If you want to change this
directory to, for example, /home/mysql do the following.
creating the new datadir
sudo mkdir /home/mysql
stop mysql.
sudo /etc/init.d/mysql stop
edit my.cnf (mysql config file)
sudo emacs -nw /etc/mysql/my.cnf
change datadir under [mysqld] from /var/lib/mysql to /home/mysql
edit apparmour (Ubuntu speciality)
sudo emacs -nw /etc/apparmour.d/usr.sbin.mysqld
change lines that contain /var/lib/mysql/ to /home/mysql/
copy the databases to new directory.
sudo mv /var/lib/mysql/* /home/mysql/.
change file ownership (should be owned by user mysql and group mysql)
sudo chown -R /home/mysql
restart apparmour
sudo /etc/init.d/apparmour restart
start mysql
sudo /etc/init.d/mysql start
This blog covers various topics from technical tweaks to latest in computational linguistics, Artificial Intelligence, Machine Learning and Wed Data Mining.
Subscribe to:
Post Comments (Atom)
Continuously monitor GPU usage
For nvidia GPUs do the follwing: nvidia-smi -l 1
-
If you used Adobe acrobat to annotate a PDF file and you had Acrobat crashed or had to restart the computer abruptly during the annotation p...
-
By default when you install MacTex and use TexShop for writing and compiling latex you will get PDFs with page size A4. This is all fine for...
-
These three terms are explained below. Anaphora is a back ward reference. Ex: I gave a banana to the monkey which it ate. Here "it"...
No comments:
Post a Comment