0

After needing to reset the root password of a mysql instance I went to restart my service and retrieved the following error from mysqld.log

[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 3253 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation. [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified. [ERROR] [MY-012594] [InnoDB] If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them. [ERROR] [MY-012646] [InnoDB] File ./ibdata1: 'open' returned OS error 71. Cannot continue operation [ERROR] [MY-012981] [InnoDB] Cannot continue operation.

From what I've read online, something with my.cnf or directory permissions of my /var/lib/mysql (750) may be off. I'm a bit out of my element, but I did not find journalctl -xe or systemctl status to be very helpful. Can anyone help troubleshoot so I can get this up and running again?

3
  • 1
    Can you post add a copy of my.cnf? Sounds like it can't find one of the innodb files. Check the ownership of /var/lib/mysql too if you suspect a permission problem.
    – Greig
    Oct 1 '19 at 19:55
  • @Greig permssions are 750 and the my.cnf is #bind-address=127.0.0.1 port=3306 #--skip_networking=0 #user=mysql datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid tmpdir = /var/lib/mysql/tmp I ended up being able to do a fresh install because I hadn't actually made anything yet. Permission needed to be 751 and most my.cnf wasn't needed. Thank you for taking the time! Oct 1 '19 at 20:34
  • Just read the rest of your comment. 751 is a bit odd, but I guess there will be a reason somewhere. Glad you got it.
    – Greig
    Oct 1 '19 at 20:54
0

Your my.cnf file looks fairly normal, so I'm guessing its more or less a default package install.

Check that /var/lib/mysql exists. The permissions on it should be 700 and it should be owned by the mysql user (probably mysql) with group mysql.

Inside that folder you should find an ibdata1 file with permissions 660 again owned and grouped to the mysql user.

It's the ibdata1 file that mysql can't find.

Take a note of all of the existing permissions and owners in case you need to switch them back and try

chmod 700 /var/lib/mysql

chown -R mysql:mysql /var/lib/mysql/

You might need to put sudo before those two commands.

If you can't find the folder or the ibdata1 file then you have a different problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.