konstruktoid / hardening

Hardening Ubuntu. Systemd edition.
Apache License 2.0
1.36k stars 267 forks source link

Install mysql server got error #479

Closed IronT3cH closed 4 weeks ago

IronT3cH commented 4 weeks ago

After hardening, I want to install mysql and got error like this.

/var/log/mysql/error.log

2024-08-13T03:12:54.342091Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.39-0ubuntu0.22.04.1) initializing of server in progress as process 595909 2024-08-13T03:12:54.474163Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2024-08-13T03:12:54.482777Z 1 [ERROR] [MY-012576] [InnoDB] Unable to create temporary file inside "/tmp/user/0"; errno: 13 2024-08-13T03:12:54.482821Z 1 [ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. 2024-08-13T03:12:54.482995Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-08-13T03:12:54.483021Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it. 2024-08-13T03:12:54.483038Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-08-13T03:12:54.483548Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.39-0ubuntu0.22.04.1) (Ubuntu). 2024-08-13T03:12:54.737550Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.39-0ubuntu0.22.04.1) starting as process 595917 2024-08-13T03:12:54.771210Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory. 2024-08-13T03:12:54.771315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-08-13T03:12:54.771347Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-08-13T03:12:54.775154Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.39-0ubuntu0.22.04.1) (Ubuntu). 2024-08-13T03:29:20.109671Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.39-0ubuntu0.22.04.1) starting as process 2995 2024-08-13T03:29:20.130016Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory. 2024-08-13T03:29:20.130120Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-08-13T03:29:20.130139Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-08-13T03:29:20.131949Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.39-0ubuntu0.22.04.1)  (Ubuntu).

It's from journalctl WhatsApp Image 2024-08-13 at 14 33 09_db6ae3eb

It's from installation WhatsApp Image 2024-08-13 at 14 33 43_721a0f73

It goes smoothly on not hardening endpoint.

I have couple hardening endpoint with same error like case above.

Please advice,

Thank you.

konstruktoid commented 4 weeks ago

Most likely caused by libpam-tmpdir, but does /tmp/user/0 exist and have the correct permissions?

IronT3cH commented 4 weeks ago

Most likely caused by libpam-tmpdir, but does /tmp/user/0 exist and have the correct permissions?

Thank you dude, I change the permission to 760, it was installed smoothly.

I think we can close this one.