This serves as my own notes – I always forget the syntax.
How to deal with UNIX command line programs
Use MySQL command to login to running MySQL instance. If this is on local host you can try
mysql -uroot # no password
mysql -uroot -p # asks for password
Use -H option to connect to external MySQL host (on shared hosting).
Then create a new database using CREATE DATABASE command. Here we create a database called joomla.
mysql> create database joomla;
Query OK, 1 row affected (0.00 sec)
And then we create a MySQL user whose access is limited to this database only. In this case we create admin user with admin password. Note that MySQL accepts local connections only by default, so MySQL or this user is not exposed to Internet (and potential attacks).
Username is joomla and password is joomladbpassword.
GRANT ALL ON joomla.* TO 'joomla'@'localhost' identified by 'joomladbpassword';
OSX provides home folder encryption system called FileVault. FileVault is effectively a sparsebundle file in your home folder, storing all your data, and is mounted as a loopback volume during the login.
If your Mac loses power on a wrong moment FileVault might become corrupted. This will lead to a situation that you cannot login to the system anymore. The login dialog will just tell “Volume is corrupted. Would you like to repair?” And then it says something along lines “login failed”.
Don’t lose your hope here. You can usually still fix the corrupted FileVault sparsebundle file as root user.
1. To create a root user
Use OSX installation DVD to add new admin user to the system with non-protected folder
…or in the case you have non-admin user accounts on the system already, use them to login, navigate to System preferences -> Accounts and create a new admin account. Note that you can use your credentials from the corrupted user to make admin level system changes even if the logged in user is not admin – just click the lock icon in the System preferences.
An admin user can enable root user. To enable root user, you need to navigate to /Macintosh HD/System/Library/CoreServices open Directory Utility and choose Enable root user from the menu (Snow Leopard)
Logout. Then login dialog should have new option “Other” where it allows you to type in username and password. Now login as root with the password you set for it earlier.
Background: you are writing blog post or rich text email in a web browser and you want to include text from other web page. The normal copy-paste functionality copies the styles of the source material, usually messing up your blog post or message.
It doesn’t have to be so.
In Google Chrome web browser, you have Paste as plain text functionality. Just hit CTRL+SHIFT+V for paste as plain text. You don’t need no longer recycle all text through Notepad or other plain text editor.
This functionality is not available through menus, only through this keyboard shortcut.