0

Note I am not a programmer by trade. I have the most annoying problem ever while using MySQL 8.0, and all online resources I've seen provide zero solutions.

I have one of those MySQL data directories that contains folder names such as "#innodb_redo", "#innodb_temp", "mysql", "performance_schema", and "sys". It also has a database in it, call it "database1". This data directory is already in existence, and I had been using it for years.

Something had happened to to my ability to access database1---the root password would not be accepted anymore, even when I tried to reset it, and I had to re-install all MySQL programs.

Now, I am attempting to reconnect MySQL to my extant database. I have tried to re-install MySQL/initialize a new server, but that requires an empty data directory and does not help me. I have tried to manually copy/paste my database1 data into the new data directory; I have tried removing replacing all the folders in the new data directory (e.g., all the new "#innodb_temp", "mysql", "performance_schema", and "sys" folders) with my old data directory. I have tried changing the directory altogether. Nothing works. If I replace all the files in the new data directory with my old data directory, the root password no longer works and I have to re-install MySQL again, because the instructions to reset the password do not work. If I just try to copy/paste only the database1 folder directly into the new directory, it is not recognized as a database when I log into the server (it doesn't appear when I load Workbench, nor when I call 'show databases'). I can't use mysqldump on my old data because I had lost access to the server already. I can't restore the InnoDB files because I don't know the table structure to all of my tables, and 8.0 doesn't use .frm file types.

Please help me. I can literally see the files for each table for my database1 (only in .ibd, .myi, and .myd because I'm in MySQL 8.0) as well as all other "old" server information (i.e., "#innodb_temp", "mysql", "performance_schema", and "sys") but I CANNOT ACCESS IT. IT IS SO FRUSTRATING. I have no idea why it is so difficult to access data files that I know exist and I know I have the programs that theoretically can load it. They just refuse to.

2
  • Try the next: create database, create empty table(s) with the same structure, stop server, replace table(s) data file(s) with old ones, start server, repair table(s). You may test this firstly using one table which have no FK references. Commented Feb 3, 2024 at 21:49
  • I'm guessing if you don't know the table structures, you are out of luck, yes? Commented Feb 4, 2024 at 14:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.