# Changing service account and ports of mysql installed using percona

**URL:** https://forums.percona.com/t/changing-service-account-and-ports-of-mysql-installed-using-percona/17728
**Category:** Percona XtraBackup
**Tags:** percona
**Created:** [September 28, 2022, 7:52am UTC](https://forums.percona.com/t/changing-service-account-and-ports-of-mysql-installed-using-percona/17728 "2022-09-28T07:52:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adi](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adi](https://forums.percona.com/u/adi)
#### Post date: [September 28, 2022, 7:52am UTC](https://forums.percona.com/t/changing-service-account-and-ports-of-mysql-installed-using-percona/17728/1 "2022-09-28T07:52:17Z")

</div>

Hi Team,  
Firstly Wanted to say it is one of the best communities I have seen for any product, thanks a lot for answering queries quickly.  
We installed xtradb cluster 8.0.28 using rpms and wanted to change mysql service account which is mysql and having permission /usr/lib/mysql dir/subdir and files. We tried to change using mysql doc and tried following steps.

1. Stop mysqld service
2. chown -R new\_user:new\_user /var/lib/mysql
3. added in my.cnf “user=new\_user”
4. started the services

But we got error while starting the service and have to roll-back.

Can you please guide how to change service account to new account.

Also wanted to know if we build from Source using “…/build-ps/./build-binary.sh ./pxc-build” will this command also creates RPMs?

Also along with changing user(mysql) how to change all 4 ports used by percona xtradb cluster from default as mentioned below to some other ports.  
3306  
4444  
4567  
4568

Thanks in advance

---

<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 30, 2022, 4:43pm UTC](https://forums.percona.com/t/changing-service-account-and-ports-of-mysql-installed-using-percona/17728/3 "2022-09-30T16:43:51Z")

</div>

Check the user in `systemctl cat mysqld.service` as well. Also, look at mysql’s error log and see what other issues might be visible.

---

<div class="post-metadata">

### Author: ![adi](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adi](https://forums.percona.com/u/adi)
#### Post date: [October 2, 2022, 7:00pm UTC](https://forums.percona.com/t/changing-service-account-and-ports-of-mysql-installed-using-percona/17728/4 "2022-10-02T19:00:35Z")

</div>

@matthewb, Thanks a lot, changing user and group in /etc/systemd/system/mysqld.service fixed the issue and was able to start mysqld service but now unable to bootstrap first node, I have added more details regarding this in new post link below, can you please suggest.

> [@Unable to bootstrap 1st node, changed datadir and user](https://forums.percona.com/t/unable-to-bootstrap-1st-node-changed-datadir-and-user/17805):
>
> Hi Team, I am trying to bootstrap new pxc 8.0.28 cluster for which I have also changed datadir, logdir and also changed os level service account (mysql) after all these changes mysqld service was up and running. But after stopping mysqld service and trying to bootstrap first node got lot of permission related errors for files under datadir which were temporarily fixed by applying chmod 777 on those files I have also changed the security context of original files/dir to the copied location as …

Thanks  
Adi
