mysql2 icon indicating copy to clipboard operation
mysql2 copied to clipboard

Trying to figure out what mysql client is

Open gsugunan opened this issue 3 years ago • 1 comments

Hi there, I'm trying to install the gem on windows, and I can't figure out what the mysql client is, I've followed a lot of links I found to it, and I know it's part of the C connector library, but I can only get to the C++ connector library at this point. Does anyone know the filename for the mysqlclient library? I get the following in gem_make.out:

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mysql2-0.5.3/ext/mysql2 C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20210804-10652-1gqour.rb extconf.rb --with-mysql-lib="C:\Program\ Files\MySQL\MySQL\ Server\ 8.0\lib"\ --with-mysql-include="C:\Program\ Files\MySQL\MySQL\ Server\ 8.0\include"\ --with-mysql-dir="C:\Program\ Files\MySQL\MySQL\ Server\ 8.0" checking for rb_absint_size()... yes checking for rb_absint_singlebit_p()... yes checking for rb_wait_for_single_fd()... yes checking for -lmysqlclient... no

mysql client is missing. Check your installation of MySQL or Connector/C, and try again.

*** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby30-x64/bin/$(RUBY_BASE_NAME) --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config --with-mysqlclient-dir --without-mysqlclient-dir --with-mysqlclient-include --without-mysqlclient-include=${mysqlclient-dir}/include --with-mysqlclient-lib --without-mysqlclient-lib=${mysqlclient-dir}/lib --with-mysqlclientlib --without-mysqlclientlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Ruby30-x64/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

gsugunan avatar Aug 05 '21 01:08 gsugunan

I'm facing the same error but on macOS Catalina. I see mysql client is missing. You may need to 'brew install mysql' or 'port install mysql', and try again. But I've already done brew install [email protected]

mandarvaze avatar Feb 16 '22 13:02 mandarvaze