# MYSQL root user is being denied permission while installing an app

**URL:** https://forum.yunohost.org/t/mysql-root-user-is-being-denied-permission-while-installing-an-app/1508
**Category:** Support
**Tags:** english
**Created:** [May 9, 2016, 3:56am UTC](https://forum.yunohost.org/t/mysql-root-user-is-being-denied-permission-while-installing-an-app/1508 "2016-05-09T03:56:03Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![kanhu](https://forum.yunohost.org/user_avatar/forum.yunohost.org/kanhu/32/3518_2.png) [@kanhu](https://forum.yunohost.org/u/kanhu)
#### Post date: [April 3, 2017, 10:08pm UTC](https://forum.yunohost.org/t/mysql-root-user-is-being-denied-permission-while-installing-an-app/1508/4 "2017-04-03T22:08:35Z")

</div>

I had the same issue. Here are the steps to solve it.

1 . Stop mysql service

`service mysql stop`

2 . Start to MySQL server w/o password:  
use mysqld\_safe:

`mysqld_safe --skip-grant-tables &`

Output:

```
170403 17:38:46 mysqld_safe Logging to '/var/lib/mysql/domain.com.err'.
170403 17:38:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

```

3 . Connect to mysql server using mysql client:

`# mysql -u root`

Output:

```
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.0.30-MariaDB-0+deb8u1 (Debian)

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

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

MariaDB [(none)]>

```

4 . Setup new MySQL root user password

```
mysql> use mysql;
mysql> update user set password=PASSWORD(" **NEW-ROOT-PASSWORD**") where User='root';
mysql> flush privileges;
mysql> quit

```

5 . Start MySQL server and test it:

```
service mysql start
mysql -u root -p
```

---

_[View the full topic](https://forum.yunohost.org/t/mysql-root-user-is-being-denied-permission-while-installing-an-app/1508)._
