Raspberry Pi 2 - Move MySQL database to USB stick - Raspberry Pi Forums


hello!
having mess around installing different things on raspberry pi 2. latest project installing mysql server on it. have working fine, once implement mysql server purpose use for, database rather large. therefore, move mysql data files onto sandisk cruzer blade 64gb usb stick formatted ext4. have followed following guide it:
http://gagsap37.blogspot.co.uk/2014/11/ ... -data.html
however, after copying data folder usb drive , changing datadir in /etc/mysql/my.cnf file, following message when trying restart mysql server:

code: select all

[fail] starting mysql database server: mysqld . . . . . . . . . . . . . . failed!
have changed permissions pretty relaxed ones (and unsafe), don't think has permissions:

code: select all

pi@raspberrypi /mnt/disk1/mysql $ ls -lrt total 28692 -rw-rw-rw- 1 root root        0 jun 16 23:27 debian-5.5.flag -rw-rw-rw- 1 root root 18874368 jun 16 23:27 ibdata1 -rw-rw-rw- 1 root root  5242880 jun 16 23:27 ib_logfile1 -rw-rw-rw- 1 root root        6 jun 16 23:27 mysql_upgrade_info drwxrwxrwx 2 root root     4096 jun 16 23:27 mysql drwxrwxrwx 2 root root     4096 jun 16 23:27 performance_schema drwxrwxrwx 2 root root     4096 jun 16 23:27 testdb drwxrwxrwx 2 root root     4096 jun 16 23:27 phpmyadmin -rw-rw-rw- 1 root root  5242880 jun 17 12:48 ib_logfile0
when change datadir default, mysql server starts fine.
appreciated!

i think have resolved myself. stopped server , ran following command:

code: select all

chown -r mysql:mysql /newlocation/mysql
started fine :-)


raspberrypi



Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support