# 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;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avbravo-2.gitbook.io/docker/ejbca/configurar-mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
