MySQL(一)基礎

來源:互聯網
上載者:User

標籤:blank   display   border   target   style   

1)啟動mysql

啟動mysql前,要檢查連接埠3306是否被佔用;

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M01/5B/4E/wKioL1UGRQbj1nqhAAIJFoGZLrw482.jpg" "646" height="417" />

2)串連mysql

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M02/5B/4E/wKioL1UGRQewNW1nAAMcr_xTHuk815.jpg" "570" height="446" />

3)修改密碼,空密碼是相當不安全的,必須第一時間修改密碼

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M00/5B/4E/wKioL1UGRQfwlLkIAAHUiQQ1zCI419.jpg" "657" height="261" />

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M01/5B/4E/wKioL1UGRQihAJqHAAKSfF5Yko0669.jpg" "730" height="319" />

 

4)刪除匿名使用者

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M02/5B/4E/wKioL1UGRQmjDKrSAAIG1Q3i4LM908.jpg" "534" height="465" />

5)忘記密碼如何解決

650) this.width=650;" title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://s3.51cto.com/wyfs02/M00/5B/4E/wKioL1UGRQqBS-oYAAHW50GLhRY581.jpg" "558" height="285" />

保證mysql當時無人串連

#vim /etc/my.cnf
在[mysqld]的段中加上一句:

skip-grant-tables /跳過授權表

skip-networking /禁止遠端連線,保證資料庫安全
例如:
[mysqld]
datadir=/mydata/data
skip-networking
skip-grant-tables

 

重啟mysql,進入其中後修改密碼。然後刪除剛才所添加的內容,skip-grant-tables,skip-networking.

MySQL(一)基礎

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.