blumenkohl wrote:Code: Select all
default-character-set=latin1
default-collation=latin1_german2_ci
Dein Server hat eine Konfigurationsdatei, my.cnf. Wo der Server diese Datei sucht, und in welchen Sektionen in dieser Datei er sucht, sagt er Dir, wenn Du den Server mit der Option "--help --verbose" aufrufst.
Code: Select all
kris@linux:~> /usr/local/mysql-max-5.0.22-linux-i686-glibc23/bin/mysqld --help --verbose | less
...
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf /usr/local/mysql/etc/my.cnf
The following groups are read: mysql_cluster mysqld server mysqld-5.0
...
Dies ist mein Server und er sucht in /etc/my.cnf nach einer my.cnf-Datei (außerdem noch an zwei anderen Stellen).
Konfigurationsoptionen für den Server darf ich in [mysql_clister], [mysqld], [server] und [mysqld-5.0] unterbringen.
Ich hinterlege meine Konfiguration also in /etc/my.cnf in der Sektion [mysqld].
In
http://dev.mysql.com/doc/refman/5.0/en/ ... ables.html findest Du alle Server-Konfigurationsvariablen aufgelistet, die verwendet werden dürfen. Sie können mit Minuszeichen ("character-set-client") oder Unterstrichen ("character_set_client") geschrieben werden. Dem Server ist das egal.
Falsch geschriebene oder nicht erkannte Variablennamen sind ein Fehler und verhindern den Serverstart (Probiere mal "isotopp-sagt-es-geht-nicht = 10" als Konfigurationsparameter). Du findest die Meldung über das Problem dann in Deinem Errorlog.
Die folgenden Variablen setzen Zeichensätze für den Server:
Code: Select all
character_set_client
The character set for statements that arrive from the client.
character_set_connection
The character set used for literals that do not have a character set introducer and for number-to-string conversion.
character_set_database
The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server.
character_set_filesystem
The filesystem character set. This variable is used to interpret string literals that refer to filenames, such as in the LOAD DATA INFILE and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. Such filenames are converted from character_set_client to character_set_filesystem before the file opening attempt occurs. The default value is binary, which means that no conversion occurs. For systems on which multi-byte filenames are allowed, a different value may be more appropriate. For example, if the system represents filenames using UTF-8, set character_set_filesytem to 'utf8'. This variable was added in MySQL 5.0.19.
character_set_results
The character set used for returning query results to the client.
character_set_server
The server's default character set.
character_set_system
The character set used by the server for storing identifiers. The value is always utf8.
...
collation_connection
The collation of the connection character set.
collation_database
The collation used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as collation_server.
collation_server
The server's default collation.
[/i]