> For the complete documentation index, see [llms.txt](https://lyethar.gitbook.io/methodology/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lyethar.gitbook.io/methodology/readme/privilege-escalation/linux/internal-services/mysql.md).

# mySQL

You need credentials to access this, linpeas wil ltell you if there is no password.&#x20;

Once you have credentials this is how you access it.&#x20;

```
mysql -uroot -p
Password: <passowrd>
```

After this we enumerate databases to see what things we can get out of it.&#x20;

![](https://3418038199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyTPWZkKJbJfX8uHiRzmn%2Fuploads%2FqxuTXbPmz8KohSBR9WIX%2F2022-08-08_14-49.png?alt=media\&token=664dad92-9fcf-4112-9846-302fe6fff995)

Take this instance as an example, we were able to get credentials out of a database and then switch users.&#x20;

```
show databases;
use <database-name>;
show tables;
select * from <table-name>;
```

Then if we can't find anything here we go onto enumerate for UDF exploitation.
