> For the complete documentation index, see [llms.txt](https://kb.asyraf.my/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.asyraf.my/linux-guide/mysql-basic-management.md).

# MySQL Basic Management

1. First login to your mysql database via root :

```
mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 18
Server version: 10.3.13-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
```

2\. Use below commands to create database and create user that have access to the databases

```
create database [database name];
grant all on [database name].* to '[database user]'@'%' identified by '[database user password]';
flush privileges;
quit;
```

{% hint style="info" %}
please change \[database name] , \[database user] and \[database user password] accordingly to your needs
{% endhint %}

3\. Finally to test, login as the new user and use command :

```
show databases;
```

4\. It is working if the output shows the new database.


---

# 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:

```
GET https://kb.asyraf.my/linux-guide/mysql-basic-management.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.
