MySQL學習(一)安裝及其入門

來源:互聯網
上載者:User

1. Mysql的

http://www.xiazaiba.com/html/361.html

2. Mysql的安裝

http://www.jz123.cn/text/2719438.html

注意會在第一次安裝的時候,會讓你設定root的密碼,第一次登入的時候需要使用

將C:\Program Files\MySQL\MySQL Server 5.5\bin

添加到環境變數path環境中,方便輸入命令。

1.      登入MySQ資料庫

進入DOS命令列,輸入:

Mysql –u root –p;

提示輸入密碼,就是第一次設定的密碼

建立新使用者的命令可以自行google之。

MySQL常用sql語句

1.      建立名為test4的sql:

create database test4

2.      查看資料庫名稱:

show databases;

3.   進入其中test4這個資料庫:

 

        use  test4

4.   建立表

create table user(id int not null primary key,name char(20));

5.  插入資料

Insert into user(id,name)Values(1,’mo’);Insert into user(id,name)Values(2,’he’);Insert into user(id,name)Values(3,’tao’);Insert into user(id,name)Values(4,’bao’);

6. 修改資料

Update user set name = “alipay” where id = 4

結果顯示

8.      刪除資料

Delete  from userwhere id = 4

結果顯示

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.