|
@@ -7,7 +7,7 @@ description: Today I learned how to fix some seriously corrupted database tables
|
|
|
title: Something Else
|
|
|
url: https://davidawindham.com
|
|
|
image_url: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg -->
|
|
|
-tags: [database, mysql, ovid]
|
|
|
+tags: [database, mysql, mariadb, ovid]
|
|
|
image: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg
|
|
|
hide_table_of_contents: true
|
|
|
---
|
|
@@ -95,7 +95,7 @@ ALTER TABLE mysql.column_stats MODIFY histogram longblob;
|
|
|
ALTER TABLE mysql.column_stats MODIFY hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB');
|
|
|
```
|
|
|
|
|
|
-At this point I kinda knew the best option would be the ole' restart or reinstall. I decided to wipe it clean and reinstall the databases. Luckily I was able to knock it out within a couple hours 🙌🏼 and it's back up and running.
|
|
|
+At this point I kinda knew the best option would be the ole' restart or reinstall. I decided to wipe it clean and reinstall MariaDB.
|
|
|
|
|
|
```sh
|
|
|
240710 11:14:32 mysqld_safe Starting mariadbd daemon with databases from /opt/homebrew/var/mysql
|
|
@@ -122,7 +122,29 @@ At this point I kinda knew the best option would be the ole' restart or reinstal
|
|
|
2024-07-10 11:14:32 0 [Note] /opt/homebrew/opt/mariadb/bin/mariadbd: ready for connections.
|
|
|
Version: '11.4.2-MariaDB' socket: '/tmp/mysql.sock' port: 3306 Homebrew
|
|
|
```
|
|
|
----
|
|
|
+
|
|
|
+Once it was back up running, I checked all of the database tables for corruption but could find `NONE`. Perplexed, I restarted MariaDB a couple of times successfully and then I rebooted my computer and 💣 it blew out again with the same errors. I went on a deeper dive and found a similar error from another user which had a response from a MariaDB developer. I listened to a presentation by this person and then made the switch back over to MySQL 8.3. As much as I bemoan the Oracle acquisition of MySQL, it matches up with most remote servers and it certainly saved me some time migrating the database servers.
|
|
|
+
|
|
|
+```sh
|
|
|
+brew remove mariadb
|
|
|
+brew install mysql
|
|
|
+brew services start mysql
|
|
|
+sudo /opt/homebrew/bin/mysql_secure_installation
|
|
|
+mysql -u root -p < /Users/david/Downloads/24.7_localhost.sql
|
|
|
+
|
|
|
+//opt/homebrew/etc/my.cnf
|
|
|
+[mysqld]
|
|
|
+collation_server = utf8mb4_unicode_520_ci
|
|
|
+character_set_server = utf8mb4
|
|
|
+
|
|
|
+utf8mb4_general_ci ( fastest )
|
|
|
+utf8mb4_unicode_520_ci ( most accurate for multi language )
|
|
|
+utf8mb4_0900_ai_ci ( specific to MySQL 8x)
|
|
|
+```
|
|
|
+
|
|
|
+Rebooted [Ovid 💻](/docs/computers/ovid) and all is well.
|
|
|
+
|
|
|
+---
|
|
|
|
|
|
🔥 NOTE: I should remember to do a little housecleaning more often though because I found some other loose ends in my homebrew packages. And this reminded me about every previous time I've had to debug an error with MySQL and about my favorite video on the topic 👇🏼
|
|
|
|