当前位置:   article > 正文

brew 安装MySQL数据库_"a \"/etc/my.cnf\" from another install may interf

"a \"/etc/my.cnf\" from another install may interfere with a homebrew-built ser"

利用brew安装MySQL好处就是方便管理,安装简单,快速升级,万不得已卸载也就一行命令搞定 不用输入好多命令删除相应目录那么麻烦

输入安装命令 

$ brew install mysql 

安装过程中输出的重要日期信息 

==> Caveats

==> openssl

A CA file has been bootstrapped using certificates from the SystemRoots

keychain. To add additional certificates (e.g. the certificates added in

the System keychain), place .pem files in

  /usr/local/etc/openssl/certs

 

and run

  /usr/local/opt/openssl/bin/c_rehash

 

openssl is keg-only, which means it was not symlinked into /usr/local,

because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

 

If you need to have openssl first in your PATH run:

  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

 

For compilers to find openssl you may need to set:

  export LDFLAGS="-L/usr/local/opt/openssl/lib"

  export CPPFLAGS="-I/usr/local/opt/openssl/include"

 

For pkg-config to find openssl you may need to set:

  export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

 

==> mysql

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

 

A "/etc/my.cnf" from another install may interfere with a Homebrew-built

server starting up correctly.

 

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

安装完成后默认服务时启动的,在任何目录下可以输入这个命令来操作MySQL服务

$ mysql.server 

Usage: mysql.server  {start|stop|restart|reload|force-reload|status}  [ MySQL server options ]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/529626
推荐阅读
相关标签
  

闽ICP备14008679号