Laragon 3 Mysql strange bug
I am having a strange problem, I created a database in Laragon and did a migration last night into Laravel.
Everything worked well all night until today when I restarted Laragon, the table "users" shows in the folder but not in heisql
All the other tables work but not this one...I also cannot recreate the table either, I get the error
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mytable.users' doesn't exist
I really do not want to delete the table but more understand what is going on first if it happens more often.
@Ben-Riv I also started having issues with MariaDB 10.2 today. It just wouldn't start. I uninstalled Laragon and installed the latest version and installed MariaDB again and the process still wouldn't start
@laminbarrow , oh no....
I also have the latest version, my mysql folder is synched on the cloud.
From the research I have done so far this is what I have found......
In the mysql folder, there is a file called "ibdata1" which seems to create the order of the tables and all the important stuff that creates individual tables. If this becomes corrupted(somehow...) then your tables won't show up....
What I am going to try to do now is this....
Stop mysql and laragon, delete the tables manually in that folder and recreate them based on my last migration..lets see if this works.
@Ben-Riv Mine seems to be complaining of master slave replication even though I didn't any replication settings. Here's a snippet from my error log
2017-10-18 17:50:04 16248 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine 2017-10-18 17:50:04 7904 [Note] Server socket created on IP: '::' 2017-10-18 17:50:04 6940 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
I fixed the issue by renaming my
/laragon/data/mariadb.old. Then I started all process from the laragon app and it reinitialised my data in
/laragon/data/mariadb. Finally I copied all of my custom databases from the old mariadb.old into the mariadb folder, stopped all process and renamed the mysql root password and everything is working 100% again.
Try that @Ben-Riv as it might help.
@laminbarrow Thanks for the tip, I tried that but unfortunately, after that Heisql shoed even less tables.
I have now reset the old path back on and mysql won't boot up and nothings shows up in the logs...oups
Ok Finally Fixed it.....If anyone runs into the same problem please follow this, it was tricky I have to say...
Last night I noticed many of these files:
While the ibdata1 and ib_logfile0 were still there, something happened in between.
When you use Laragon and log to mysql at the same time via 2 pcs, there is a problem because mysql will lock the files for either 1 pc or the other.....and this is when these files start to conflict.
I did not really take notice to those and deleted the ones that had an earlier date than today...well this was my mistake. I thought because the files had the exact same size, the same data would have been in ...wrong!
I then used my sync.com retrieval area of each deleted files and took the ones that matched the exact time of my last work (last night). I deleted both the ibdata1 and ib_logfile0 and renamed ibdata1-CONFLICT-3 and ib_logfile0-CONFLICT-3 (and not conflict 4!!! because this was done today after the bug) to their original respective names(ibdata1 and ib_logfile0).
All of this needs to be done with mysql turned off of course.
@Ben-Riv : I'm glad to hear you solved the issue