# collation_server

> Collation applied to new objects that do not name one.

Source: https://sqlly.app/sql-configuration/mysql/collation-server
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`utf8mb4_0900_ai_ci`

**Range**

Any collation whose character set matches character_set_server

**Restart needed**

No

**Default checked on**

MySQL 8.4 LTS

## What it does

It pairs with character_set_server and only reaches objects created after the change, so existing columns compare and sort exactly as before. The default utf8mb4_0900_ai_ci is accent insensitive and case insensitive; picking _as_cs or _bin makes new columns compare strictly.

## Default value

`utf8mb4_0900_ai_ci`. utf8mb4_0900_ai_ci (MySQL 8.4); assigning a user-defined collation raises a warning instead of an error.

## Check the current value

```
SHOW GLOBAL VARIABLES LIKE 'collation_server';

SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME
FROM performance_schema.variables_info
WHERE VARIABLE_NAME = 'collation_server';
```

## Change it

```
SET SESSION collation_server = 'utf8mb4_0900_as_cs';   -- this connection
SET GLOBAL collation_server = 'utf8mb4_0900_as_cs';    -- new connections, until restart
SET PERSIST collation_server = 'utf8mb4_0900_as_cs';   -- new connections, and after restarts
```

No restart. SET GLOBAL (or SET PERSIST, which also survives restarts) applies to connections opened afterwards; existing connections keep their session value unless they SET it themselves.

## When to change it

When new schemas should default to case or accent sensitive comparisons without spelling the collation in every CREATE statement.

## What can go wrong

Changing the variable leaves stored columns untouched, and one schema can easily hold columns with three different collations, so check SHOW CREATE TABLE or information_schema.COLUMNS for what a query actually compares with rather than the server variable.

## Questions about collation_server

### What is the default value of collation_server in MySQL?

utf8mb4_0900_ai_ci. utf8mb4_0900_ai_ci (MySQL 8.4); assigning a user-defined collation raises a warning instead of an error.

### Does changing collation_server require a restart?

No. No restart. SET GLOBAL (or SET PERSIST, which also survives restarts) applies to connections opened afterwards; existing connections keep their session value unless they SET it themselves.

### When should I change collation_server?

When new schemas should default to case or accent sensitive comparisons without spelling the collation in every CREATE statement.

Back to all [MySQL settings](https://sqlly.app/sql-configuration/mysql), or check the [MySQL manual](https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html) for every option.

## Related MySQL settings

- [`character_set_server` Character set applied to new objects that do not name one.](https://sqlly.app/sql-configuration/mysql/character-set-server)
- [`sql_mode` SQL syntax and validation rules, as a comma-separated list of modes.](https://sqlly.app/sql-configuration/mysql/sql-mode)
