-1

I checked the datadir variable inside de conf. file my.cnf and it is /var/lib/mysql.

jimmy_code
  • 51
  • 1
  • 9

1 Answers1

1

MySQL by default stores its data files in /var/lib/mysql directory.

But if the default location has been changed then you can use grep to find the folder.

Simply run the following command in the terminal:

grep datadir /etc/mysql/my.cnf
Prabhjot Singh Kainth
  • 1,831
  • 2
  • 18
  • 26
  • datadir is not your data directory that`s why grep is used to find the actual datadir folder. Kindly read answer carefully. – Prabhjot Singh Kainth Nov 19 '19 at 13:58
  • the command you specified just returned the datadir ( e.g. /var/lib/mysql ) and i already said that this cannot be the one containing data – jimmy_code Nov 19 '19 at 14:00