If you ever find yourself in need to adjust some MySQL settings and you're running a MAMP server on Mac OS X, you can always create a my.cnf file using the following command:
sudo cp /Applications/MAMP/Library/share/mysql/my-medium.cnf /Applications/MAMP/Library/my.cnf
You now have created your own my.cnf file where you can adjust some settings. Please make sure restart your MySQL instance after altering the configuration.
You have a few other starting point for creating a my.cnf file. MAMP ships with 5 configuration files for some typical settings. The filenames should be self explanatory:
./Library/share/mysql/my-huge.cnf
./Library/share/mysql/my-innodb-heavy-4G.cnf
./Library/share/mysql/my-large.cnf
./Library/share/mysql/my-medium.cnf
./Library/share/mysql/my-small.cnf
Update: Beware: The my.cnf file might enable binary logging. This may create huge log files (gigabytes). Check out webchick's post how to disable mysql binary logging.
I have had this one 2 times now. And it's always the same thing: too many fields in CCK.
Too many fields means too large queries to update the cache. And then MySQL goes down with this nice error message.
How to solve this? Increase the max_allowed_packet to a bigger number in your my.cnf (linux) or my.ini (windows).
If it's not there just add it.
max_allowed_packet=32M
Problem solved!
This is a follow up to the post "Creating a UTF-8 database to work with special characters".
When you want to move your database from one server/database to another one, you generally create a sql dump file from the source database using the
This is just a heads up. When you make the connection on the destination server/database, specify the
You end up with something like:
mysql -u user -ppassword --default-character-set=utf8 database < "dump.sql"
I'm a Dutch speaking person. So sometimes I have to make Dutch websites. The Dutch language uses some special characters that are not used in English. I'm talking about tremas, umlauts, ... (ë, â, ...). These characters can turn up weird on your website.
As soon as you start seeing those appearing on your website, you might be sure it has to do with character sets and encoding.
And since your website is build upon a database, your database should be the first thing too look at finding the cause of your problem.
So the first thing I do when creating my database is to make sure it uses the correct character set. In MySQL this is done by issuing the following statement:
create database my_database character set utf8 COLLATE utf8_general_ci;