# what is mysql database and sys database is about

**URL:** <https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899>\
**Category:** Percona XtraDB Cluster 8.x\
**Tags:** community, mysql, percona\
**Created:** [August 13, 2020, 3:18am UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899 "2020-08-13T03:18:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBA100](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@DBA100](https://forums.percona.com/u/DBA100)\
**Post date:** [August 13, 2020, 3:18am UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/1 "2020-08-13T03:18:20Z")

</div>

I read this:  
[https://dev.mysql.com/doc/refman/8.0/en/sys-schema.html](https://dev.mysql.com/doc/refman/8.0/en/sys-schema.html "Link: https://dev.mysql.com/doc/refman/8.0/en/sys-schema.html")  
it seems we can’t restore mysql sys DB from percona xtradB cluster 5.7 to 8.0.19, right ?  
how about “mysql” Db, it seems installed by a fresh installation?

---

<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:** [August 25, 2020, 1:59pm UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/2 "2020-08-25T13:59:04Z")

</div>

Yes you can. You can absolutely restore a 5.7 backup, then install 8.0.19 and start MySQL. The databases will automatically get upgraded to 8.0.19. Downgrade back to 5.7 would be impossible.

---

<div class="post-metadata">

**Author:** ![DBA100](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@DBA100](https://forums.percona.com/u/DBA100)\
**Post date:** [August 27, 2020, 10:44pm UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/3 "2020-08-27T22:44:22Z")

</div>

“You can absolutely restore a 5.7 backup, then install 8.0.19 and start MySQL.”  
  
idea is, if I do not backup the mysql and sys dB from PXC 5.7 to 8.0.19, will it be ok ? what is inside by the way ? mysql should store username and password and grants, right? how about sys?&nbsp;

---

<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:** [August 27, 2020, 10:49pm UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/4 "2020-08-27T22:49:40Z")

</div>

You should backup `mysql` database from 5.7 so that all of your users are recreated as well. You can ignore ‘sys’; it has NOTHING to do with running MySQL. You can 100% delete `sys` and everything will work normally. The ‘sys’ schema is just a collection of VIEWs for use with performance\_schema.

---

<div class="post-metadata">

**Author:** ![DBA100](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@DBA100](https://forums.percona.com/u/DBA100)\
**Post date:** [August 27, 2020, 10:53pm UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/5 "2020-08-27T22:53:47Z")

</div>

please help on this too:  
  
[https://forums.percona.com/discussion/56041/transfer-a-db-size-6gb#latest](https://forums.percona.com/discussion/56041/transfer-a-db-size-6gb#latest "Link: https://forums.percona.com/discussion/56041/transfer-a-db-size-6gb#latest")

---

<div class="post-metadata">

**Author:** ![DBA100](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@DBA100](https://forums.percona.com/u/DBA100)\
**Post date:** [August 27, 2020, 11:07pm UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/6 "2020-08-27T23:07:02Z")

</div>

“You should backup `mysql` database from 5.7 so that all of your users are recreated as well”  
so if I just backup mysql, should I say I don’t even need this:  
pt-show-grants&nbsp;-uroot&nbsp;-pmypassword&nbsp;\>mysqlusegrants.sql&nbsp;  
to backup username and passwrod and grants?

---

<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:** [August 28, 2020, 8:54am UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/7 "2020-08-28T08:54:37Z")

</div>

Please do not link to other posts asking for more free assistance.

---

<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:** [August 28, 2020, 8:55am UTC](https://forums.percona.com/t/what-is-mysql-database-and-sys-database-is-about/7899/8 "2020-08-28T08:55:44Z")

</div>

If you include the `mysql` database as part of your regular backup, then no, you do not need to use pt-show-grants. All username/passwords/grant information is stored in `mysql` database. You should back this database up as part of your regular backup policy.
