# Problem connecting External MYSQL

**URL:** <https://discuss.openedx.org/t/problem-connecting-external-mysql/15384>\
**Category:** Tutor Help\
**Tags:** tutor\
**Created:** [March 27, 2025, 6:49pm UTC](https://discuss.openedx.org/t/problem-connecting-external-mysql/15384 "2025-03-27T18:49:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkhanal01](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/hkhanal01/32/3584_2.png) [@hkhanal01](https://discuss.openedx.org/u/hkhanal01)\
**Post date:** [March 27, 2025, 6:49pm UTC](https://discuss.openedx.org/t/problem-connecting-external-mysql/15384/1 "2025-03-27T18:49:41Z")

</div>

I am trying to connect external MySQL database using [tutor configuration](https://docs.tutor.edly.io/configuration.html#mysql). I set up database server with:

```auto
DROP USER IF EXISTS 'openedx'@'%';
CREATE USER 'openedx'@'%' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON openedx.* TO 'openedx'@'%';
FLUSH PRIVILEGES;
mysql> SELECT user, host FROM mysql.user WHERE user = 'openedx';
+---------+------+
| user | host |
+---------+------+
| openedx | % |
+---------+------+
1 row in set (0.00 sec)

```

Now i am getting the following error message:

```auto
mysql -u openedx --password=" ****" --host "mysql.internal.****.com" --port 3306 -e "GRANT ALL ON openedx.* TO '"'"'openedx'"'"'@'"'"'%'"'"';"'

Initialising MySQL...

mysql: [Warning] Using a password on the command line interface can be insecure.

ERROR 1045 (28000): Access denied for user 'openedx'@'ip- *****.internal' (using password: YES)

```

I really appreciate for any suggestions.

---

<div class="post-metadata">

**Author:** ![sarina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sarina/32/2308_2.png) [@sarina](https://discuss.openedx.org/u/sarina)\
**Post date:** [March 31, 2025, 11:04pm UTC](https://discuss.openedx.org/t/problem-connecting-external-mysql/15384/2 "2025-03-31T23:04:23Z")

</div>

Hi @hkhanal01 could you provide more detail? What version of Tutor are you using? Is there any other details of your system or what docs you’ve looked at that aren’t helpful?

---

<div class="post-metadata">

**Author:** ![hkhanal01](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/hkhanal01/32/3584_2.png) [@hkhanal01](https://discuss.openedx.org/u/hkhanal01)\
**Post date:** [April 9, 2025, 3:28pm UTC](https://discuss.openedx.org/t/problem-connecting-external-mysql/15384/3 "2025-04-09T15:28:01Z")

</div>

@sarina I resolved this issue. I made a mistake in creating the user in Mysql server. I messed up between “openedx” and root user. I had to crate the separate root user .
