> For the complete documentation index, see [llms.txt](https://avbravo-2.gitbook.io/docker/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://avbravo-2.gitbook.io/docker/ejbca/configurar-mysql.md).

# Configurar MySQL

## Configurar MySQL

## **Crear el archivo utf-8.conf**

**Entrar al directorio**

```
cd /etc/mysql/conf.d
```

**Crear el archivo**

```
nano utf-8.conf
```

**Copiar el texto**

```
[client]
default-character-set=utf8

[mysqld]
#default-character-set=utf8
#default-collation=utf8_unicode_ci
character-set-server=utf8
collation-server=utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-client = utf8
```

**Reiniciar MySQL**

```
service mysql restart
```

## Crear la base de datos ejbca

\#Entrar a MySQL

```
mysql -u root -p
```

\#Crear la base de datos ejbca

```
CREATE DATABASE ejbca CHARACTER SET utf8 COLLATE utf8_general_ci;
```

\#Dar privilegios

```
grant all privileges on ejbca.* to 'ejbca'@'localhost' identified by 'lemotdepasse';
```

\#Flush

```
flush privileges;
```
