"No available formula" error when installing mysql - mysql

I'm trying to install mysql using brew, so I'm running the command brew install mysql, but I get this error:
How can I fix this?

Related

MySQL brew cannot run on macOS Monterey?

MySQL suddenly stopped working after updating from macOS Big Sur to Monterey (naive). Local Laravel dev environment suddenly lost connection to MySQL. Couldn't debug it properly (still learning), so decided to do a fresh MySQL installation via brew. Was installed through brew previously as well.
On the final step, mysql_secure_installation shows this:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
brew services start mysql
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/stranger/Library/LaunchAgents/homebrew.mxcl.mysql.plist` exited with 5.
Am I doing something wrong? Why would it suddenly drop?
Thanks!
Not a solution, but, according to the MySQL documentation, Monterey is not yet a supported platform.
MySQL Supported Platforms
I tried brew uninstall mysql, brew install mysql and then brew services restart mysql and it did the trick for me

Formula `mysql` is not installed

I'm trying to install mysql using brew services start mysql as per the website instructions but it gives me an error:
Formula `mysql` is not installed.
I already did a full uninstall on my XAMPP server.
Terminal:
Dylans-Macbook:~ dylandude$ brew install mysql#5.7
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
ansible jpeg-turbo phplint
ccrypt mapcrafter skinny
dxpy mikutter
jenkins-job-builder pgcli
Warning: mysql#5.7 5.7.23 is already installed and up-to-date
To reinstall 5.7.23, run `brew reinstall mysql#5.7`
Dylans-Macbook:~ dylandude$ brew services start mysql
Error: Formula `mysql` is not installed.
You have installed the version 5.7 of MySQL with:
brew install mysql#5.7
So you have to start the service with:
brew services start mysql#5.7

Apache superset on Mac osx

Hi all I am tried to install the superset on OSX using the Python3. After the installation finished when I tried to add the Database using the mysql:// it said error No Module name MySQLDb. I tried to explore how to solved this, one of tutorial said try to install mysqlclient using pip3 install mysqlclient failed to install with error code mysql.h not found.
Than I following another tutorial used the mysql-connector. After I installed it, finally I can connect to mysql DB and insert table to the system. But when I tried to run the analysis from superset it said no data. Also I tried using SQL Lab and got the error args.
Updated: on my superset currently I am used the mysql+mysql-connector as URI Database connected properly, but when I tested to run a query it said execute() got an unexpected keyword argument 'args'. How to solve this?
Anyone have experience with this problem?
Thanks
Here is what works for me:
brew install python || true
brew install mysql || true
# Required for mysqlclient, see brew info openssl
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
# And now it works
pip3 install mysqlclient
Cheers!
Finally I got it working now.
What I am doing is reinstall the superset, run the brew install mysql-connector-c than run pip install mysqlclient

Django: cannot connect to mysql

I am new to Django and I try to follow the official tutorial. since I want to connect to mysql (installed on my computer, and i checked mysql module does exit in python command line), I set the ENGINE in setting.py to be django.db.backends.mysql . and then I tried to run
python manage.py syncdb
then I got error message like this:
Error loading MySQLdb module
and I cannot run
pip install mysql-python
the error msg is:
Unable to find vcvarsall.bat
so what is this error? and honestly I am not sure about the difference between mysql-python and mysql-connector-python. Since i tried with "pip install mysql-connector-python" and it tells me that requirement already satisfied...
You need to download the windows binary installer for the MySQL drivers for Python. Installing from source will not work since you do not have the development headers in Windows.
You need to install the mysql python connector
sudo apt-get install python-mysqldb

Problems with install mysql 5.5.20 with homebrew

I installed homebrew and Xcode 4.3.2 with command line tools on Mac Osx Lion and when I now try to install mysql with :
brew install mysql -v
I get the error :
Error: #<BuildError: Failed executing: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes>
Here you find the full log :
https://gist.github.com/2421381
I checked the logs but there is nothing that can help me for the moment. Brew doctor is also clean and give no errors.
Found the solution with thanks to a reply of visoft on my gist post. This solution worked for me. The problem is coming from Cmake, I need version 2.8.7 instead of 2.8.8, run this code to get it work :
cd /usr/local
brew uninstall cmake
git checkout 948c2769 Library/Formula/cmake.rb
brew install mysql
After this, mysql was installed successfully.