Archive for December, 2009
MySQL importing .sql with accents causing issues
by z3n on Dec.30, 2009, under Uncategorized
Problem:
When importing a .sql with entries with accents, like not regular english, it may lead to issues, like:
‘São Paulo‘ instead of ‘São Paulo‘
Solution:
Even mysqld default charset being latin1, sometimes it don’t work with accents, depending on the imports you’re doing.
So you may need to force it to fallback to utf8, on my case i just added this to the beggining of the .sql file i was importing:
charset utf8 \c
and it worked just fine.
Note: If you are using asian chars (japanese/chinese specific), then utf8 might not be enough to cover all chars.
Zend Optimizer download links
by z3n on Dec.25, 2009, under Linux Happyness, Notes
Problem:
Zend requires registration in order to dowload the free optimizer, it’s annoying and you keep receiving spam.
Solution:
http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz (linux 64-bit)
http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz (linux 32-bit)
neat.
ssh timeout fix
by z3n on Dec.25, 2009, under Linux Happyness
Problem:
When using regular linux ssh it keeps timeouting or simply freezes when no inputs/outputs happen.
Solution:
Usually ssh has a TCP keep alive switch which you can enable to avoid this, although depending on your router and other network odds this might not help, also you may need to send keep alives in a shorter time than what’s the default of ssh. So, in order to have this working you need to edit /etc/ssh/ssh_config adding this to Host *, assuming you want to have this settings globally for every host.
ServerAliveInterval 60
ServerAliveCountMax 99999999999999
Why so many 9’s? There’s no way to do a endless keep alive, if you put 0 it will just drop the connection after the first keep alive, -1 is invalid, so we go high…….
MySQLd timeout error when starting
by z3n on Dec.25, 2009, under Linux Happyness
Problem:
When starting mysqld i got the following error:
Timeout error occurred trying to start MySQL Daemon.
Solution:
After checking mysqld.log i found out that the tunning i did on my.cnf had some options that aren’t compatible with the mysqld version.
(just) Find in files (bash)
by z3n on Dec.09, 2009, under Linux Happyness, Tips & Hints
Problem:
Need to search for a string in many files and return the filenames.
Solution:
find -depth -name *.file_extension | xargs grep -sl “string“
Sendmail: Relaying Denied: Proper Authentication Required
by z3n on Dec.08, 2009, under Linux Happyness, Tips & Hints
Problem:
You can receive emails with your own mail server, but can’t send to “non-local” domains.
Solution:
You need to setup auth method before sending emails outside the local realm. You can enable ecrypted passwords and such.
Change at sendmail config:
define(`confAUTH_OPTIONS’, `A’)dnl
TRUST_AUTH_MECH(`LOGIN PLAIN’)dnl
define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl
at ssh:
set auth_options to `A’
service saslauthd restart (don’t forget it’s importaint)
service sendmail restart
Super fun fun
by z3n on Dec.04, 2009, under lol
Problem:
Generic hardware issues.
Solution:

Although this isen't me, it could be, on a remote dark basement back '95. Thanks the internets and anonymous fat guy, look hes even got a cat!