国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Mac下使用Homebrew安裝MySQL5.7

這篇具有很好參考價值的文章主要介紹了Mac下使用Homebrew安裝MySQL5.7。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

Mac下使用Homebrew安裝MySQL5.7,macos,mysql

1. 安裝Homebrew & Oh-My-Zsh

mac下如何安裝homebrew
MacOS安裝Homebrew與Oh-My-Zsh

2. 查詢軟件信息

% brew search mysql

==> Formulae
automysqlbackup       mysql                 mysql++               mysql-client          mysql-client@5.7      mysql-connector-c++   mysql-sandbox         mysql-search-replace  mysql@5.6             mysql@5.7             mysqltuner            qt-mysql

==> Casks
mysql-connector-python                                mysql-shell                                           mysqlworkbench                                        navicat-for-mysql                                     sqlpro-for-mysql

3. 執(zhí)行安裝命令

% brew install mysql@5.7
==> Fetching dependencies for mysql@5.7: ca-certificates, openssl@3, libevent, lz4, openssl@1.1, abseil, jsoncpp and protobuf

==> Installing dependencies for mysql@5.7: ca-certificates, openssl@3, libevent, lz4, openssl@1.1, abseil, jsoncpp and protobuf

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 /opt/homebrew,
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="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc

For compilers to find mysql@5.7 you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/mysql@5.7/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/mysql@5.7/include"

To 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:
  /opt/homebrew/opt/mysql@5.7/bin/mysqld_safe --datadir\=/opt/homebrew/var/mysql

4. 開機(jī)啟動

% brew services start mysql@5.7
==> Successfully started `mysql@5.7` (label: homebrew.mxcl.mysql@5.7)

5. 服務(wù)狀態(tài)查詢

% brew services list           

Name      Status  User          File
mysql@5.7 started tanghonggang1 ~/Library/LaunchAgents/homebrew.mxcl.mysql@5.7.plist

6. 初始化配置

~ mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: N
Please set the password for root here.

New password: 

Re-enter new password: 
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N

 ... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N

 ... skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done! 

如果執(zhí)行報(bào)錯 zsh: command not found: mysql_secure_installation。執(zhí)行

echo 'export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc

7. 登錄測試

7.1 終端登錄

~ mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.43 Homebrew

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

7.2 客戶端登錄

Mac下使用Homebrew安裝MySQL5.7,macos,mysql

參考

MySQL 5.7的Homebrew安裝 - MacOS
macOS brew安裝mysql和安裝問題解決 關(guān)于zsh: command not found: mysql問題解決文章來源地址http://www.zghlxwxcb.cn/news/detail-681393.html

到了這里,關(guān)于Mac下使用Homebrew安裝MySQL5.7的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Mac M1通過homebrew安裝Redis報(bào)錯(perl: unknown or unsupported macOS version: :dunno)

    升級homebrew,命令如下: 通過命令 brew install redis 安裝Redis,異常如下: 參考博文MAC 升級后brew報(bào)錯后,運(yùn)行命令 brew update-reset ,結(jié)果如下: 查看homebrew版本( brew --version ),結(jié)果為: 最終解決 上述 brew update-reset 升級命令即為該問題的解決辦法。homebrew升級完成后,重新運(yùn)行

    2024年02月07日
    瀏覽(26)
  • MySql啟動錯誤(Mac系統(tǒng) 安裝 mysql-8.0.32-macos13-arm64 后每次點(diǎn)擊啟動 無法啟動) --- 已解決

    MySql啟動錯誤(Mac系統(tǒng) 安裝 mysql-8.0.32-macos13-arm64 后每次點(diǎn)擊啟動 無法啟動) --- 已解決

    MySql啟動的時候: 立即變紅! 查看日志如下: 2023-03-04T14:18:01.089671Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.0.32) MySQL Community Server - GPL. 2023-03-04T14:18:10.304169Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.32) starting as process 90802 2023-03-04T14:18:10.3

    2023年04月19日
    瀏覽(33)
  • 如何在MacOS使用homebrew安裝Nginx

    如何在MacOS使用homebrew安裝Nginx

    參考文章地址 在確保MacOS 安裝Homebrew成功以后,執(zhí)行如下命令 注意 :Nginx安裝成功后會提示目錄位置;每個人的系統(tǒng)可能因?yàn)镠omebrew的安裝位置不同而不同,所以這幾個目錄位置要記下來,方便后期配置和維護(hù)Nginx 根據(jù)上圖可知我本機(jī)的幾個重要的文件位置: nginx.conf 配置文

    2024年02月06日
    瀏覽(17)
  • 安裝指定版本的mysql(安裝mysql5

    安裝軟件的三種方式: rpm 安裝 源代碼編譯安裝 yum倉庫安裝 本地光盤 阿里云yum源 自建yum倉庫文件夾 去mysql官網(wǎng) 尋找該軟件下的地址,設(shè)置為yum倉庫即可(可指定版本) 先檢查是否自帶了mysql 有的話 mariadb同理 有的話 https://repo.mysql.com/yum/ 找到對應(yīng)版本 例如5.7 https://repo.m

    2024年02月08日
    瀏覽(24)
  • mysql基礎(chǔ) - mysql5.7版本安裝

    mysql基礎(chǔ) - mysql5.7版本安裝

    本文章是學(xué)習(xí)mysql5.7版本的安裝教程

    2024年02月09日
    瀏覽(28)
  • 安裝指定版本的mysql(mysql5.7)

    安裝軟件的三種方式: rpm 安裝 源代碼編譯安裝 yum倉庫安裝 本地光盤 阿里云yum源 自建yum倉庫文件夾 去mysql官網(wǎng) 尋找該軟件下的地址,設(shè)置為yum倉庫即可(可指定版本) 先檢查是否自帶了mysql 有的話 mariadb同理 有的話 https://repo.mysql.com/yum/ 找到對應(yīng)版本 例如5.7 https://repo.m

    2024年02月08日
    瀏覽(16)
  • MySQL5.7安裝

    MySQL5.7安裝

    1.1 下載安裝 下載安裝包https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-winx64.zip安裝到想要安裝的目錄(路徑不要有中文) 1.2 添加環(huán)境變量 我的電腦-屬性-高級-環(huán)境變量,加入%D:softwareMySQLmysql-5.7bin;(注意修改為自己的路徑) 1.3 修改配置文件 在mysql-5.7目錄下創(chuàng)建my.ini文件 添加

    2024年02月03日
    瀏覽(46)
  • 使用Homebrew在Mac上安裝Git

    使用Homebrew在Mac上安裝Git

    僅針對第一次安裝使用Git 1.配置用戶名,用戶名,不推薦使用中文,最好使用拼音或者英文作為用戶名 2.配置郵箱? 如果公司并沒有加密,可以使用http拉取代碼,這一步可省略 出現(xiàn)上面這類數(shù)據(jù),說明公鑰生成成功 查看公鑰 ?然后錄登錄gitlab,進(jìn)入設(shè)置里,在ssh keys里添加秘鑰即可

    2024年02月11日
    瀏覽(27)
  • 【MySQL】CentOS編譯安裝MySQL5.7實(shí)戰(zhàn)

    【MySQL】CentOS編譯安裝MySQL5.7實(shí)戰(zhàn)

    這篇文章是關(guān)于MySQL編譯安裝的,重點(diǎn)掌握的是編譯的過程,以及體會排錯的痛苦。出錯在所難免,最重要的是要有一顆不放棄的心。 本文收錄于《數(shù)據(jù)庫入門與精通》專欄, 本專欄寫作的過程中,聯(lián)合了csdn幾位DBA大佬,目前正在整理更新目錄,力爭讓大家學(xué)到一些真東西,

    2024年02月16日
    瀏覽(25)
  • MySQL5.7安裝教程

    MySQL5.7安裝教程

    說明:本教程是msi版,安裝MySQL8.0的msi版時也可以參考此教程。Zip Archive版是綠色解壓版,直接解壓配置即可使用。 官網(wǎng):MySQL :: Download MySQL Community Server 1、打開上面的網(wǎng)址,然后根據(jù)自己的需求進(jìn)行選擇,如下圖所示: 2、選擇版本和系統(tǒng),然后選擇那個三百多MB的進(jìn)行下載

    2024年01月16日
    瀏覽(23)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包