Posted by Buzz in Mac
Having little time to update my blog, I’ve been updating a wiki I keep with various tidbits, so I thought I might as well share a few, they will be appearing on here over the next few days.
First off you will want to open the “Terminal” application, not so much a play on words it is really called Terminal.
Applications -> Utilities -> Terminal
1
| showmount -e aaa.bbb.ccc.ddd |
Where aaa.bbb.ccc.ddd is the IP or FQDN of your NFS server, this command will show a list of mountable exports on the device.
1
| sudo mount -t ntfs aaa.bbb.ccc.ddd:/exported/path ~/Desktop/nfs_folder |
If you look on your desktop you will now see that the folder icon has changed to an aliased drive icon 
NOTE: These changes will not persist through a reboot, I have not yet found a way of doing this short of some apple / automator script to remount the drives on startup.
Tags:
exports,
Mac,
mount,
nfs,
osx
2 Comments »
Posted by Buzz in hacking, mySQL
The downside of a development server is … it’s for development.
It is not always cost effective to have the exact same setup as you you have in your production environment …
Especially if you have a multi server setup.
So I find myself today moving /var/lib/mysql … being as the OS drive is very small, and pulling down a near 20GB database backup and then trying to rebuild the database on the same drive … well as you can imagine caused a few problems *doh*
1 2
| /etc/init.d/mysql stop
mv /var/lib/mysql /raid_5/ |
So surely you just symlink … right?
1 2
| ln -s /raid_5/mysql /var/lib/mysql
/etc/init.d/mysql start |
Well then answer would be no … upon importing the backup
1 2
| mysql < backup.sql
Can't create table './database/table.frm' (errno: 121) |
A nice errorno: 121
1 2 3 4 5 6
| /etc/init.d/mysql stop
rm -rf /var/lib/mysql
mkdir /var/lib/mysql
chown mysql:mysql /var/lib/mysql
mount --bind /raid_5/mysql /var/lib/mysql
/etc/init.d/mysql start |
et voila …
Data directory is relocated and the import working smoothly. Feel free to suggest any “cleaner” methods.
UPDATE: Please rememeber to add the ‘mount’ line into your rc.local otherwise when you reboot this mount will be gone!
Tags:
bind,
mount,
mySQL
1 Comment »