Question

Error after moving ibdata1 file temporarily from /var/lib/mysql

  • Posted February 2, 2020
  • MySQL

Hello Guys, i have a Prestashop store and Plesk panel on a Centos on my Droplet.

I was finishing the space on SSD so I moved the ibdata1 file from /var/lib/mysql folder on another partition. (I know it has been a stupid thing)

I freed up some GBs and then i re-moved the ibdata1 file to the standard directory, now I have many problems with the store and the Plesk panel, sometimes it works correctly (example: add to cart, make orders, i enter into webmail, etc etc) and sometimes not and I get this error:

Connection failed: SQLSTATE[HY000] [2002] No such file or directory

If i refresh everything goes well, then sometimes same error come again.

Looking the mysql log I get this:

200202 13:35:28 mysqld_safe Number of processes running now: 0 200202 13:35:28 mysqld_safe mysqld restarted 200202 13:35:28 InnoDB: Initializing buffer pool, size = 8.0M 200202 13:35:28 InnoDB: Completed initialization of buffer pool InnoDB: Log scan progressed past the checkpoint lsn 45 1568465318 200202 13:35:28 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files… InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer… InnoDB: Doing recovery: scanned up to log sequence number 45 1568493321 200202 13:35:28 InnoDB: Starting an apply batch of log records to the database… InnoDB: Progress in percents: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 200202 13:35:29 InnoDB: Started; log sequence number 45 1568493321 200202 13:35:29 [Note] Event Scheduler: Loaded 0 events 200202 13:35:29 [Note] /usr/libexec/mysqld: ready for connections. Version: ‘5.1.73’ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Source distribution

How to solve now?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

This sounds like your MySQL is up and running but it is crashing randomly, so the change that you made might have not be the root cause of your problem. What I could suggest is either trying to optimize your MySQL instance, you could follow the steps on how to do that here:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Another thing you could do instead is to revert to a working Snapshot.

Regards, Bobby