Software⏱️ 3 min read📅 2026-06-11

How to Fix: Error installing mysql 5.5 FATAL ERROR: Could not find my_print_defaults

Error installing MySQL 5.5 with FATAL ERROR: Could not find my_print_defaults.

Quick Answer: The issue is likely due to the fact that Homebrew is still using the old mysql 5.6 installation directory in its search path, even after uninstalling it. Try specifying the new installation directory explicitly when running mysql_install_db.

Error installing MySQL 5.5: FATAL ERROR: Could not find my_print_defaults. This error affects users who have installed MySQL 5.5 using Homebrew and are experiencing issues with the mysql_install_db command.

This error can be frustrating, especially when trying to set up a new MySQL installation. However, by following the steps outlined in this guide, you should be able to resolve the issue and successfully install MySQL 5.5.

💡 Why You Are Getting This Error

  • The first main reason for this error is that the mysql_install_db command is still looking for files from the old MySQL 5.6 installation directory, even after uninstalling it using Homebrew. This can be resolved by specifying the correct path to the new MySQL 5.5 installation directory.
  • An alternative reason for this error could be that the my_print_defaults binary is not present in the new MySQL 5.5 installation directory. However, since you have confirmed that the my_print_defaults file exists in the specified directory, this is unlikely to be the cause of the issue.

🔧 Proven Troubleshooting Steps

Specify the correct path to the new MySQL 5.5 installation directory

  1. Step 1: Open a terminal and run the following command to specify the correct path to the new MySQL 5.5 installation directory: `mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql55)" --datadir=/usr/local/var/mysql --tmpdir=/tmp`
  2. Step 2: This command tells the mysql_install_db command to look for files in the correct path, rather than the old MySQL 5.6 installation directory.
  3. Step 3: If you encounter any issues during this process, make sure that the my_print_defaults file is present in the specified directory and that the `brew --prefix mysql55` command returns the correct path.

    💡 Conclusion

    By following these steps, you should be able to resolve the FATAL ERROR: Could not find my_print_defaults error when installing MySQL 5.5 using Homebrew. If you are still experiencing issues, consider checking the MySQL documentation for further troubleshooting guidance.

    Did this fix your problem?

    If not, try searching for specific error codes.

    🔍 Search Error Database

    ❓ Frequently Asked Questions