Jul 30 2007

MySQL database migration: latin1 to utf8 conversion

Tag:tepezcuintle @ 15:46

MySQL database migration: latin1 to utf8 conversion
Until version 4.1, MySQL tables were encoded with the latin1 character set. By default, the character set is now utf8. This is a good thing in terms of non-latin character support, but if you’re upgrading from an older database you may run into a lot of character encoding problems.

I’ve recently migrated several older databases from 4.0 to MySQL 5 and converted a few tables from latin1 to utf8, and I’ve put together a few tricks that might help you through the same. So far, I’ve basically run into three main issues: converting a table from the latin1 charset to utf8, upgrading a whole database set that was properly exported with mysqldump, and (the worst) migrating an entire set of database’s MYI and MYD files that weren’t properly exported.
Continua”MySQL database migration: latin1 to utf8 conversion”


Jul 16 2007

how to use old password with MySQL 5

Tag:tepezcuintle @ 20:37

Sometimes when you are connecting from php4 to a mysql 5 server you might get an error like.

Client does not support authentication protocol requested by server; consider upgrading MySQL client

so basically before you go crazy and rip your hair out, what is happening is that you are trying to connect
with an outdated protocol to a mysql server that doesn’t understand your password even though it is the correct one.

What you need to do is the following
login to the mysql server as root

mysql -u root -p

enter your password and you will be at the mysql prompt

mysql>

paste this ( make sure you change the username and host fields to the user you want to change and the hostname )

UPDATE mysql.user
SET password=OLD_PASSWORD(’password’)
WHERE user=’usename’
AND host=’hostname’;

then after that

type

flush privileges;

then after doing that try to reconnect from your PHP application that you were having problems with.

You should be able to connect now.

Bsically you told mysql to use the old password format for whatever user you selected.


Jul 03 2007

Rings of Saturn Sendmail Tips

Tag:tepezcuintle @ 19:23

This is a quick document on how to get yourself out of some binds I’ve run into with sendmail. These aren’t going to be the most organized, but I figure someone else may find these useful.


Continua”Rings of Saturn Sendmail Tips”


Jul 03 2007

Becoming an expert with the Find Command

Tag:tepezcuintle @ 19:13

Command your box from command-line-interface. This is the power of unix/linux & this is the power of find.

——————————————————————————–
Find command is just like driving a car to the destination. If you can read & follow the instructions provided, you are destined to reach at proper address.
Location director boardings at signals & landmarks are the inputs/options provided by the users/yourself & finally the roads are the hierarchy/paths to follow to reach the desired destination.

Continua”Becoming an expert with the Find Command”


Jul 03 2007

Shell Scripting Reference

Tag:tepezcuintle @ 18:53

Introduction To Bash Shell Scripting
References
Learning the Bash Shell, Cameron Newham & Bill Rosenblatt (O’Reilly & Associates, Inc)
Linux in a Nutshell, Jessica Perry Hekman (O’Reilly & Associates, Inc)
The UNIX Programming Environment, Brian W Kernigham & Rob Pike (Prenice Hall)
Unix Power Tools, Jerry Peek, Tim O’Relly, & Mike Lookides (O’Reilly & Associates,Inc)
Advance Bash Scripting Guide : http://www.tldp.org/LDP/abs/html
Appendix B has some good Reference Cards
Review
Getting Help
man Get off information about commands
man -k Get off information via keyword
info Read info documents
help Show help on shell built-in commands
command –help Help on command .i.e. cp –help Will give help on cp
bash -c “help” Short help on bash
bash -c “help set” Short help on bash options
Continua”Shell Scripting Reference”


Jul 03 2007

Fixing sendmail Queue

Tag:tepezcuintle @ 18:41

Sending Email to invalid addresses Adventure.

So last night our company sent an invite to people to download some PDF file
the email went out to over 4,000 people. Our php application tried to send
the messages but the messages were not going out 3 hours later the mail server
was clogged with 3,000 messages that were still sitting on the queue.

Continua”Fixing sendmail Queue”