mysql基本指令

2021-10-02 11:17:14 字數 368 閱讀 6130

登入:

mysql -uroot -p+密碼

use:

use carry:使用"carry"資料庫

show:

如:show databases;會顯示所有資料庫

show tables;會顯示carry資料庫中的所有表

show columns form taobao;會顯示taobao表中的所有字段

(describe taobao;與show colunms from taobao;效果一樣)

show errors 和 show warnings ,用來顯示伺服器錯誤或警告訊息。

Mysql 基本指令備忘

1 mysql修改密碼 使用 mysqladmin u root p 原密碼,可省 password 新密碼可省 2 mysql登陸 mysql u root p 常用 預設本地主機位址 mysql h localhost u root p 命令列下當 mysql未 設定埠為 3306 情況下使用 ...

MySql基本使用指令

1.啟動mysql etc init.d mysql start 執行成功顯示 the mysql monitor.commands end with or g.your mysql connection id is18 server version 5.7 20 0ubuntu0.16 04.1 ...

MySQL操作基本指令

多行注釋 這是多行注釋 這是單行注釋 建立資料庫 create database 資料庫名 charset utf8 顯示所有資料庫 show databases 顯示某個資料庫的建立語句 show create database 資料庫名 刪除資料庫 drop database 資料庫名 修改某個...