免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
[Mac] 記錄使用Homebrew安裝Mysql全過程


步驟

  1. 安裝Homebrew,詳細(xì)步驟參見Homebrew官網(wǎng)。
  2. brew doctor確認(rèn)brew在正常工作。
  3. brew update更新包。
  4. brew install mysql 安裝mysql。
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.17.sierra.bottle.tar.gz######################################################################## 100.0%==> Pouring mysql-5.7.17.sierra.bottle.tar.gz==> Using the sandbox==> /usr/local/Cellar/mysql/5.7.17/bin/mysqld --initialize-insecure --user=liangze --basedir=/usr/local/Cellar/mysql/5.7.17 --datadir=/usr/local/var/mysql --t==> CaveatsWe've installed your MySQL database without a root password. To secure it run:    mysql_secure_installationTo connect run:    mysql -urootTo have launchd start mysql now and restart at login:  brew services start mysqlOr, if you don't want/need a background service you can just run:  mysql.server start==> Summary/usr/local/Cellar/mysql/5.7.17: 14,226 files, 444.4M
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

這里順帶提下一下,在網(wǎng)上有很多教程說要在安裝完mysql之后運(yùn)行mysql_install_db --verbose --user=whoami--basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp,我試了一下行不通,原因mysql官方已經(jīng)說了,看這段:

mysql_install_db is deprecated as of MySQL 5.7.6 because its functionality has been integrated into mysqld, the MySQL server. To initialize a MySQL installation, invoke mysqld with the –initialize or –initialize-insecure option. For more information, see Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”. mysql_install_db will be removed in a future MySQL release.

大意就是說mysql_install_db這個(gè)功能已經(jīng)在MySQL 5.7.6下取消了,它的功能現(xiàn)在已經(jīng)集成在了mysqld里了。所以盡量不要直接在網(wǎng)上拿來主義,如果我們仔細(xì)看brew install mysql的安裝過程,看這句:

==> /usr/local/Cellar/mysql/5.7.17/bin/mysqld –initialize-insecure –user=liangze –basedir=/usr/local/Cellar/mysql/5.7.17 –datadir=/usr/local/var/mysql –t

說明brew已經(jīng)為我們安裝好了。我們接下來需要做的brew也已經(jīng)告訴我了,看這句:

We’ve installed your MySQL database without a root password. To secure it run:
mysql_secure_installation

5.
那么我們就按照brew的提示運(yùn)行 mysql_secure_installation,運(yùn)行后會(huì)報(bào)錯(cuò):

 > mysql_secure_installationSecuring the MySQL server deployment.Enter password for user root:Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

莫慌,提示說找不到mysql.sock。原因是mysql進(jìn)程還沒啟動(dòng)。
6. 啟動(dòng)mysql服務(wù)

mysql.server start
  • 1

7.再運(yùn)行

> mysql_secure_installation
  • 1

發(fā)現(xiàn)成功執(zhí)行命令

Securing the MySQL server deployment.Connecting to MySQL using a blank password.VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW    Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special charactersSTRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file// 這里提示選一個(gè)密碼強(qiáng)度等級(jí)Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1Please set the password for root here.// 然后按照所選的密碼強(qiáng)度要求設(shè)定密碼New password:Re-enter new password:Estimated strength of the password: 50Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y ... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:Estimated strength of the password: 100Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : yBy default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.// 這里刪除默認(rèn)無密碼用戶Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.// 禁止遠(yuǎn)程root登錄,我選的是不禁止。因?yàn)槲业膍ac上的數(shù)據(jù)庫不會(huì)放到公網(wǎng)上,也不會(huì)存什么敏感數(shù)據(jù)Disallow root login remotely? (Press y|Y for Yes, any other key for No) : no ... skipping.By default, MySQL comes with a database named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.// 這里刪除默認(rèn)自帶的test數(shù)據(jù)庫Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database...Success. - Removing privileges on test database...Success.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : ySuccess.
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
CentOS下升級(jí)MySQL 5.0.19到5.5
Install Redmine 25x on Centos 65 complete
CentOS 7上搭建Zabbix4.0
mySQL數(shù)據(jù)庫安裝配置及數(shù)據(jù)庫位置移動(dòng)
MySQL安全配置文檔
Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服