---
title: "Create MySQL User And Grant Privileges"
canonical: "https://techwiki.co.uk/databases/create-mysql-user-and-grant-privileges"
author: "Adam Birds"
article_type: "documentation"
published: "2026-08-10T23:29:23.522Z"
updated: "2026-08-10T23:29:23.522Z"
categories: ["Databases"]
tags: []
---To create a MySQL user and grant privileges run the below commands:

```

CREATE USER 'username'@'localhost' IDENTIFIED BY 'SuperSecurePassword';

```

```

GRANT ALL PRIVILEGES ON databasename . * TO 'username'@'localhost';

```

```

FLUSH PRIVILEGES;

```
