mysql學習記錄(windows)

2022-07-11 21:30:23 字數 908 閱讀 4688

服務名稱叫做mysql一、mysql服務的啟動和停止

1、啟動mysql

net start mysql

2、停止mysql

net stop mysql

二、mysql服務端的登入和退出

1、登入mysql(-p密碼 之間不能有空格 )

命令:mysql -h 主機名 -p 埠號 -u 使用者名稱 -p密碼 (mysql -h localhsot -p 3306 -u root -p123456)

如果連線的是本機的3306埠直接   mysql -u 使用者名稱 -p密碼

2、退出mysql

exit;

三、mysql常見命令介紹

1、顯示都有哪些資料庫: show databases;

2、進入某個test資料庫 use test;

3、查詢test下面的所有表 show tables;

4、在test庫中,此時去查詢test1資料庫下面的所有表(執行完命令此時還在test庫中) show tables from test1;

5、查詢當前在哪個庫 select database();

6、建立stuinfo表 create table stuinfo(id int,name varchar(20));

7、檢視表結構 desc stuinfo;

8、檢視表資料 select * from stuinfo;

9、表中插入資料 insert into stuinfo (id,name) values (1,'dj');

mysql學習記錄 MySQL學習記錄 2

in 子查詢 select from student where id in 1,2 not in 不在其中 select from student where id not in 1,2 is null 是空 select from student where age is null is not...

學習記錄 Mysql

mysql 是官方發布的 乙個為mysql設計的c 語言的api,這個api的作用是使工作更加簡單且容易。mysql 為mysql的c api的再次封裝,它用stl standard template language 開發並編寫,並為c 開發程式設計師提供象操作stl容器一樣方便的運算元據庫的一套...

Mysql 學習記錄

本篇部落格主要記錄一些開發中使用的到一些知識點。cdata 這是乙個xml語法 是的所有在cdata中的資料都不會被解析詳細描述參見 cdata語法 concat 函式用於將多個字串連線成乙個字串注意 如有任何乙個引數為null 則返回值為 null。或許有乙個或多個引數。如果所有引數均為非二進位制...