![]() ![]()
For django, though, it isn't quite close enough. In many cases, the API for that module is close enough to MySQLdb. However it will be much less performant solution- but you can almost certainly get it to work. That said, you could install a pure-python library (with no c-code) and avoid this issue entirely. Since the python installed c-code must be intel (to work with your intel python 3.7) it must talk to c-code that is all intel. ![]() In this case, the python module is calling some mysql client libraries. If you were "talking" to the executable, it would matter what arch it was compiled for, so long as worked on your machine. #HOW TO INSTALL MYSQL ON MAC USING BREW CODE#That other c code is a dylib and not an executable. The issue here is that you have some c-code (installed when pip installs the mysql client module) that directly calls other c code. The arch of the mysql executable isn't the issue. First some general comments that I hope are helpful. I am able to workaround by using pymysql instead, but this is not an acceptable solution. Version_info, _mysql.version_info, _mysql._file_ In /Users/davidv/Projects/venv/order-book/lib/python3.9/site-packages/MySQLdb/_ĭuring handling of the above exception, another exception occurred:įile “/Users/davidv/Projects/venv/order-book/lib/python3.9/site-packages/MySQLdb/_init_.py”, line 24, in Referenced from: /Users/davidv/Projects/venv/order-book/lib/python3.9/site-packages/MySQLdb/_ ImportError: dlopen(/Users/davidv/Projects/venv/order-book/lib/python3.9/site-packages/MySQLdb/_, 2): Symbol not found: _mysql_affected_rows ![]() Go the the official MySQL installation guide for more information on this installation process.Mysql Ver 8.0.22 for osx10.16 on x86_64 (Homebrew) If you prefer an alternative method to Homebrew, you can install MySQL using the Native Package Installer, which uses the native macOS installer (DMG). This command will give you something similar to this output: +-+Ĥ rows in set (0.01 sec) Alternatives to Homebrew Now you are ready to start using MySQL! You can check what databases exist using the following command: show databases Once you have done so you will see the MySQL command line: mysql≻ This command will prompt you to enter your password. #HOW TO INSTALL MYSQL ON MAC USING BREW PASSWORD#If you have a password set, you can connect to MySQL using: mysql -u root -p If you have specified another username during the installation you would need to replace root with that name. If you do not have a password set you can connect to MySQL using: mysql -u root If successful, you will get the following message: =≻ Successfully started `mysql` (label: ) Connect to MySQL Once you have installed MySQL you can start it using the command brew services start mysql It is advisable to go through the secure installation to get a password and remove anonymous users. usr/local/opt/mysql/bin/mysqld_safe -datadir=/usr/local/var/mysql Or, if you don't want/need a background service you can just run: MySQL is configured to only allow connections from localhost by default Once the installation finishes you will get the following message: We've installed your MySQL database without a root password. To install MySQL using Homebrew, use the following command: brew install mysql If you are already up to date, Homebrew will inform you. #HOW TO INSTALL MYSQL ON MAC USING BREW UPDATE#Once you have Hmoebrew, you can update it using the command: brew update Install Homebrew: /bin/bash -c "$(curl -fsSL )" First open a terminal window and run the following commands: You can skip this step if you already have Homebrew installed on your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |