easier way
export EMAIL=newsender@domain.com ; mutt -s "subject" destination@domain.com < /dev/null
My personal KnowledgeBase
I was getting this message when trying to install Fedora 16 as a Virtual Machine in VMWare, In the default installation I had an "autoinst.iso" as the primary optical drive and the actual ISO as a secondary Removing the primary (replacing it with the actual ISO) solved this issue
trying to install and use ruby on rails on OSX with a mysql installation made by hand in /usr/local/mysql
$ rails server/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql-5.5.17-osx10.6-x86/lib/libmysqlclient.18.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: no suitable image found.
I'm probably missing something about a correct installation on osx and with a correct distribution of mysql libraries but I've seen that the fastest way of getting rid of this problem was a:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
use the
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql-5.5.15-osx10.6-x86_64/lib/libmysqlclient.18.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
should be the proper solution
dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup
dyld: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: dynamic lookup
# ssh user@remotebox "sudo su - user2 -c remotecommand"
sudo: sorry, you must have a tty to run sudo
# ssh -t user@remotebox "sudo su - user2 -c remotecommand"
sudo apt-get install php5
sudo apt-get install mysql-server-5.0
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
defaults write com.apple.finder AppleShowAllFiles [ TRUE | FALSE ]
and restarting Finder (note the upcase)
killall Finder
Finder will show/unshow all the hidden files
the error on the script was:
PHP Fatal error: Class 'DOMDocument' not found
on phpinfo()
--disable-dom was one of the preprocessing compiling directives...
solution is easy and straightforward:
yum install php-xml
This is straightforward:
SELECT * FROM tab LIMIT 0, 10
will display the first 10 rows from the table tab.
SELECT * FROM tab LIMIT 5, 2
display rows 6 and 7 (5 is the offset, 2 the count)
And:
select * from (select * from TAB order by id desc limit 5 ) TA order by id;
display the LAST 5 rows.