解決したい事
- Mysql5.7を利用したい
- インストールしてもcommand not foundになってしまう。
$ mysql --version -bash: mysql: command not found
環境
Mac OX 10.11.4(El Captain)
試した事
$ brew reinstall mysql@5.7 ==> Reinstalling mysql@5.7 ==> Downloading https://homebrew.bintray.com/bottles/mysql@5.7-5.7.23.el_capitan Already downloaded: /Users/oogw/Library/Caches/Homebrew/mysql@5.7--5.7.23.el_capitan.bottle.tar.gz ==> Pouring mysql@5.7--5.7.23.el_capitan.bottle.tar.gz ==> Caveats We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot mysql@5.7 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula. If you need to have mysql@5.7 first in your PATH run: echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.bash_profile For compilers to find mysql@5.7 you may need to set: export LDFLAGS="-L/usr/local/opt/mysql@5.7/lib" export CPPFLAGS="-I/usr/local/opt/mysql@5.7/include" For pkg-config to find mysql@5.7 you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/mysql@5.7/lib/pkgconfig" To have launchd start mysql@5.7 now and restart at login: brew services start mysql@5.7 Or, if you don't want/need a background service you can just run: /usr/local/opt/mysql@5.7/bin/mysql.server start ==> Summary ???? /usr/local/Cellar/mysql@5.7/5.7.23: 317 files, 235.2MB
$ ls /usr/local/bin/ VBoxAutostart gvpack VBoxBalloonCtrl gvpr VBoxBugReport gxl2dot VBoxDTrace gxl2gv VBoxHeadless heroku VBoxManage ifnames VBoxVRDP img2webp VirtualBox initdb acyclic jpegtran annotate libpng-config apm libpng16-config atom meteor autoconf mm2gv autoheader neato autom4te node autoreconf nop autoscan npm autoupdate npx bcomps oid2name bdftogd osage brew pal2rgb c++-8 patchwork ccmake pg_archivecleanup ccomps pg_basebackup chromedriver pg_config circo pg_controldata cjpeg pg_ctl cluster pg_dump clusterdb pg_dumpall cmake pg_isready cmakexbuild pg_receivewal cpack pg_recvlogical cpp-8 pg_resetwal createdb pg_restore createuser pg_rewind ctest pg_standby cwebp pg_test_fsync diffimg pg_test_timing dijkstra pg_upgrade djpeg pg_waldump dot pgbench dot2gxl pkg-config dot_builtins png-fix-itxt dropdb pngfix dropuser pngtogd dwebp pngtogd2 ecpg postgres edgepaint postmaster fax2ps ppm2tiff fax2tiff prune fc-cache psql fc-cat raw2tiff fc-conflist rbenv fc-list rbenv-communal-gem-home fc-match rbenv-communize fc-pattern rbenv-install fc-query rbenv-sequester fc-scan rbenv-uninstall fc-validate rdjpgcom fdp reindexdb freetype-config ruby-build g++-8 sccmap gc selenium-server gcc-8 sfdp gcc-ar-8 tiff2bw gcc-nm-8 tiff2pdf gcc-ranlib-8 tiff2ps gcov-8 tiff2rgba gcov-dump-8 tiffcmp gcov-tool-8 tiffcp gd2copypal tiffcrop gd2togif tiffdither gd2topng tiffdump gdcmpgif tiffinfo gdlib-config tiffmedian gdparttopng tiffset gdtopng tiffsplit gfortran tred gfortran-8 twopi gibo unflatten giftogd2 vacuumdb git vacuumlo git-cvsserver vagrant git-receive-pack vbox-img git-shell vboxwebsrv git-upload-archive webpinfo git-upload-pack webpmux gitk webpng glibtool wrjpgcom glibtoolize x86_64-apple-darwin15.6.0-c++-8 gml2gv x86_64-apple-darwin15.6.0-g++-8 graphml2gv x86_64-apple-darwin15.6.0-gcc-8 gv2gml x86_64-apple-darwin15.6.0-gcc-8.2.0 gv2gxl x86_64-apple-darwin15.6.0-gcc-ar-8 gvcolor x86_64-apple-darwin15.6.0-gcc-nm-8 gvgen x86_64-apple-darwin15.6.0-gcc-ranlib-8 gvmap x86_64-apple-darwin15.6.0-gfortran-8
$ brew info mysql mysql: stable 8.0.12 Open source relational database management system https://dev.mysql.com/doc/refman/8.0/en/ Conflicts with: mariadb (because mysql, mariadb, and percona install the same binaries.) mariadb-connector-c (because both install plugins) mysql-cluster (because mysql, mariadb, and percona install the same binaries.) mysql-connector-c (because both install MySQL client libraries) percona-server (because mysql, mariadb, and percona install the same binaries.) Not installed From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mysql.rb ==> Dependencies Build: cmake ✔ Required: openssl ✔ ==> Requirements Required: macOS >= 10.10 ✔ ==> Options --with-debug Build with debug support --with-embedded Build the embedded server --with-local-infile Build with local infile loading support --with-memcached Build with InnoDB Memcached plugin --with-test Build with unit tests ==> Caveats We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To have launchd start mysql now and restart at login: brew services start mysql Or, if you don't want/need a background service you can just run: mysql.server start MBP:$ brew link mysql Error: No such keg: /usr/local/Cellar/mysql
$ brew list autoconf heroku mysql@5.7 chromedriver heroku-node node cmake icu4c openssl fontconfig isl pkg-config freetype jpeg postgresql gcc libmpc rbenv gd libpng rbenv-communal-gems gibo libtiff readline git libtool ruby-build gmp mpfr selenium-server-standalone graphviz mysql webp
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/30 00:55 編集
2018/08/30 00:59
2018/08/30 02:51 編集
2018/08/30 03:05 編集
2018/08/30 03:07
2018/08/30 04:58 編集
2018/08/30 05:53
2018/08/30 05:56
2018/08/30 06:35