> For the complete documentation index, see [llms.txt](https://abi.gitbook.io/net-core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abi.gitbook.io/net-core/11.-instalacion-en-linux/11.4-instalando-mysql.md).

# 17.4 Instalando mysql

Vamos a instalar mysql.

1. Tecleamos los siguiente comandos

```
sudo apt update
sudo apt install mysql-server
sudo mysql_secure_installation
```

En el wizard seleccionamos que deseamos acceder desde fuera.

Podemos descargar e instalar MySql Workbench en Linux. Si no deseamos instalar el MySql WorkBench podemos habilitar el acceso remoto de MySql.

### Habilitando el acceso a MySql desde fuera.

En nuestro portal de azure agregamos como regla de entrada  el puerto 3306.

En nuestra **máquina virtual** en mi caso se llama **Abi.Linux**, seleccionamos la opción **Redes**, luego agregar regla de seguridad de entrada, en **Intervalos de puerto destino** tecleamos **3306**, en **Protocolo TCP**, y en nombre podemos teclear **Mysql.**

![](/files/-Lc9Sm2FUZBf-W0P9XlV)

Para entrar a mysql desde linux tecleamos&#x20;

```
sudo mysql
```

Creamos los usuarios cambiando localhost por la ip de la computadora desde donde quieras acceder a MySQL, puedes consultar la página <https://www.whatismyip.com> para obtener tu ip actual

Puedes ver la documentación oficial de Microsoft para las reglas aquí. <https://docs.microsoft.com/es-mx/azure/mysql/concepts-firewall-rules>

Puedes ver las instrucciones (en inglés) aquí [https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04](ttps://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04)

1.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://abi.gitbook.io/net-core/11.-instalacion-en-linux/11.4-instalando-mysql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
