# Mysql\_config\_editor

**URL:** <https://forums.percona.com/t/mysql-config-editor/25466>\
**Category:** Other MySQL® Questions\
**Created:** [September 26, 2023, 3:39pm UTC](https://forums.percona.com/t/mysql-config-editor/25466 "2023-09-26T15:39:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew2](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew2/32/4044_2.png) [@Andrew2](https://forums.percona.com/u/Andrew2)\
**Post date:** [September 26, 2023, 3:39pm UTC](https://forums.percona.com/t/mysql-config-editor/25466/1 "2023-09-26T15:39:02Z")

</div>

Upgraded to 8 last week and it seems mysql\_config\_editor is throwing errors since then. Xtrabackup isn’t running as it’s trying to read the user credentials from there but failing. I tried creating a new file which seems to work but then can’t be read or updated.

Any ideas?

> [root@db ~]# mysql\_config\_editor --verbose set --login-path=andrew --host=localhost --port=3307 --user=andrew --password --skip-warn  
> File exists.  
> File has the required permission.  
> Opening the file.  
> Reading the login key.  
> file read operation failed  
> operation failed.  
> [root@db ~]# rm .mylogin.cnf  
> rm: remove regular file ‘.mylogin.cnf’? y  
> [root@db ~]# mysql\_config\_editor --verbose set --login-path=andrew --host=localhost --port=3307 --user=andrew --password --skip-warn  
> File exists.  
> File has the required permission.  
> Opening the file.  
> Reading the login key.  
> Login key read successfully.  
> Executing set command.  
> Enter password:  
> Successfully decrypted the login file.  
> Key successfully written to the file.  
> Successfully written encrypted data to the login file.  
> [root@db ~]# mysql --login-path=andrew  
> ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)  
> [root@db ~]# mysql\_config\_editor --verbose set --login-path=andrew --host=localhost --port=3307 --user=andrew --password --skip-warn  
> File exists.  
> File has the required permission.  
> Opening the file.  
> Reading the login key.  
> file read operation failed  
> operation failed.  
> [root@db ~] mysql\_config\_editor --version  
> mysql\_config\_editor Ver 8.0.33-25 for Linux on x86\_64 (Percona Server (GPL), Release 25, Revision 9468fd1d)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 27, 2023, 3:47pm UTC](https://forums.percona.com/t/mysql-config-editor/25466/2 "2023-09-27T15:47:07Z")

</div>

Hi @Andrew2,  
I just tested this and I’m not able to reproduce. I can create the config and login just fine.

```auto
mysql [localhost:8034] {msandbox} ((none)) > CREATE USER foo@localhost IDENTIFIED BY 'foo1234';
Query OK, 0 rows affected (0.02 sec)

$ ~/dbdeployer/opt/mysql/ps8.0.34/bin/mysql_config_editor --verbose set --login-path=foo --host=localhost --user=foo --password --socket=/tmp/mysql_sandbox8035.sock
File does not exist.
Creating login file.
Login file created.
Opening the file.
Generating a new key.
Key successfully written to the file.
Executing set command.
Enter password:
Key successfully written to the file.
Successfully written encrypted data to the login file.

$ ~/dbdeployer/opt/mysql/ps8.0.34/bin/mysql --login-path=foo
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.34-26 Percona Server (GPL), Release 26, Revision 0fe62c85

$ ~/dbdeployer/opt/mysql/8.0.34/bin/mysql_config_editor print --all
[foo]
user = "foo"
password = *****
host = "localhost"
socket = "/tmp/mysql_sandbox8034.sock"
```

---

<div class="post-metadata">

**Author:** ![Andrew2](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew2/32/4044_2.png) [@Andrew2](https://forums.percona.com/u/Andrew2)\
**Post date:** [October 24, 2023, 10:40am UTC](https://forums.percona.com/t/mysql-config-editor/25466/3 "2023-10-24T10:40:51Z")

</div>

The issue went away but I’m now seeing it on a different server.  
Both are mysql on EC2 so I wonder if it’s an AWS file system issue rather than a MySQL or config editor issue

---

<div class="post-metadata">

**Author:** ![Andrew2](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew2/32/4044_2.png) [@Andrew2](https://forums.percona.com/u/Andrew2)\
**Post date:** [November 15, 2023, 11:57am UTC](https://forums.percona.com/t/mysql-config-editor/25466/4 "2023-11-15T11:57:30Z")

</div>

I’ve found the issue.

A shell script that was using the .mylogin.cnf was still running but, for some reason, wasn’t showing up when I did ‘lsof’ for the .mylogin.cnf file

Killing the script allowed the config editor to work as normal and write/update the file.
