国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

靜態(tài)網(wǎng)站建設(shè)課程設(shè)計(jì)百度一下生活更好

靜態(tài)網(wǎng)站建設(shè)課程設(shè)計(jì),百度一下生活更好,佛山企業(yè)網(wǎng)站建設(shè)平臺(tái),自建網(wǎng)站該頁(yè)無(wú)法顯示目錄 一.檢查mysql是否安裝 1. 查看文件安裝路徑 2. 查詢運(yùn)行文件所在路徑(文件夾地址) 二.登錄mysql 三.列出mysql全部用戶 四.常用指令 1.查看全部數(shù)據(jù)庫(kù) 2.選擇數(shù)據(jù)庫(kù) …

目錄

一.檢查mysql是否安裝

1.??查看文件安裝路徑

2.? 查詢運(yùn)行文件所在路徑(文件夾地址)

二.登錄mysql

三.列出mysql全部用戶

四.常用指令

1.查看全部數(shù)據(jù)庫(kù)

?2.選擇數(shù)據(jù)庫(kù)

3.查看該數(shù)據(jù)庫(kù)的全部數(shù)據(jù)表

4.顯示表結(jié)構(gòu)

5.運(yùn)行sql文件

6.顯示數(shù)據(jù)庫(kù)概況

五.查看幫助指令

一.檢查mysql是否安裝

1.??查看文件安裝路徑

# gr @ gr-System-Product-Name in ~ [10:05:21] 
$ whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /etc/mysql /usr/share/man/man1/mysql.1.gz

2.? 查詢運(yùn)行文件所在路徑(文件夾地址)

# gr @ gr-System-Product-Name in ~ [10:05:26] 
$ which mysql     
/usr/bin/mysql

二.登錄mysql

# gr @ gr-System-Product-Name in ~ [10:36:49] 
$ mysql -u用戶名 -p密碼
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 8.0.32 MySQL Community Server - GPLCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 

三.列出mysql全部用戶

必須要用root賬戶登錄,進(jìn)入mysql環(huán)境

# gr @ gr-System-Product-Name in ~ [10:39:50] 
$ mysql -uroot -p密碼
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 56
Server version: 8.0.32 MySQL Community Server - GPLCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 
mysql> SELECT User, Host FROM mysql.user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| ga               | %         |
| mysql.infoschema | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)

四.常用指令

1.查看全部數(shù)據(jù)庫(kù)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| test               |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
6 rows in set (0.02 sec)

?2.選擇數(shù)據(jù)庫(kù)

mysql> use mysql;
Database changed

3.查看該數(shù)據(jù)庫(kù)的全部數(shù)據(jù)表

mysql> show tables;
+------------------------------------------------------+
| Tables_in_mysql                                      |
+------------------------------------------------------+
| columns_priv                                         |
| component                                            |
| db                                                   |
| default_roles                                        |
| engine_cost                                          |
| func                                                 |
| general_log                                          |
| global_grants                                        |
| user                                                 |
+------------------------------------------------------+
38 rows in set (0.00 sec)

4.顯示表結(jié)構(gòu)

mysql> desc user;

5.運(yùn)行sql文件

mysql> use mysql
Database changed
mysql> source /user/test.sql

6.顯示數(shù)據(jù)庫(kù)概況

  當(dāng)前使用的數(shù)據(jù)庫(kù),當(dāng)前用戶,mysql版本信息

mysql> status
--------------
mysql  Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)Connection id:		59
Current database:	mysql
Current user:		root@localhost
SSL:			Not in use
Current pager:		less
Using outfile:		''
Using delimiter:	;
Server version:		8.0.32 MySQL Community Server - GPL
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4
UNIX socket:		/var/run/mysqld/mysqld.sock
Binary data as:		Hexadecimal
Uptime:			5 days 2 min 4 secThreads: 4  Questions: 2198  Slow queries: 0  Opens: 580  Flush tables: 3  Open tables: 499  Queries per second avg: 0.005
--------------

五.查看幫助指令

mysql> \?For information about MySQL products and services, visit:http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:http://dev.mysql.com/
To buy MySQL Enterprise support, training, or other products, visit:https://shop.mysql.com/List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
?         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit      (\e) Edit command with $EDITOR.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
nopager   (\n) Disable pager, print to stdout.
notee     (\t) Don't write into outfile.
pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
resetconnection(\x) Clean session context.
query_attributes Sets string parameters (name1 value1 name2 value2 ...) for the next query to pick up.
ssl_session_data_print Serializes the current SSL session data to stdout or fileFor server side help, type 'help contents'

六.權(quán)限問(wèn)題

1.查詢某用戶的權(quán)限

mysql> show grants for 'ga'@'%';
+---------------------------------------------------+
| Grants for gauture@%                              |
+---------------------------------------------------+
| GRANT USAGE ON *.* TO `ga`@`%`                    |
| GRANT ALL PRIVILEGES ON `table01`.* TO `ga`@`%`   |
| GRANT ALL PRIVILEGES ON `table01`.* TO `ga`@`%`   |
+---------------------------------------------------+
3 rows in set (0.00 sec)

2.給用戶添加權(quán)限

mysql> GRANT ALL PRIVILEGES ON test.* TO 'ga'@'%';
Query OK, 0 rows affected (0.01 sec)

七.退出

mysql> exit
Bye

http://aloenet.com.cn/news/41151.html

相關(guān)文章:

  • 網(wǎng)站404怎么做搜索排名提升
  • 網(wǎng)站怎么做直通車鄭州厲害的seo優(yōu)化顧問(wèn)
  • 做攻略的網(wǎng)站好企業(yè)中層管理人員培訓(xùn)課程
  • 廣州網(wǎng)站排名優(yōu)化費(fèi)用招聘網(wǎng)絡(luò)營(yíng)銷推廣人員
  • wordpress各部分功能百度seo關(guān)鍵詞優(yōu)化費(fèi)用
  • 自己做網(wǎng)站自己做推廣教程視頻教程網(wǎng)絡(luò)運(yùn)營(yíng)培訓(xùn)
  • 水果b2b電商平臺(tái)有哪些seo技術(shù)員
  • 蘇州營(yíng)銷型網(wǎng)站南寧企業(yè)官網(wǎng)seo
  • 上海做網(wǎng)站比較有名的公司湖南疫情最新消息今天
  • 我網(wǎng)站關(guān)鍵詞太多公司做網(wǎng)站推廣
  • 東莞市網(wǎng)站開發(fā)市場(chǎng)調(diào)研報(bào)告怎么寫范文
  • 攜程旅游網(wǎng)站建設(shè)的定位廣點(diǎn)通廣告平臺(tái)
  • 網(wǎng)站建設(shè)了解一下圖片蘇州seo報(bào)價(jià)
  • 開了網(wǎng)站建設(shè)公司 如何接業(yè)務(wù)蘇州seo怎么做
  • 網(wǎng)站建設(shè) php 企業(yè)網(wǎng)站重慶seo招聘
  • 網(wǎng)站建設(shè)與維護(hù)方式石家莊最新新聞事件
  • 群暉wordpress內(nèi)外網(wǎng)訪問(wèn)網(wǎng)站整站優(yōu)化推廣方案
  • 網(wǎng)站建設(shè)畢業(yè)設(shè)計(jì)說(shuō)明書word文檔關(guān)鍵詞優(yōu)化建議
  • 如何建立自己的企業(yè)網(wǎng)站網(wǎng)時(shí)代教育培訓(xùn)機(jī)構(gòu)官網(wǎng)
  • 做土司的網(wǎng)站bt磁力貓
  • 陜西網(wǎng)站制作定制疫情最新官方消息
  • 域名注冊(cè)好后怎么建設(shè)網(wǎng)站今日剛剛發(fā)生的軍事新聞
  • 網(wǎng)站后臺(tái)怎么做alt標(biāo)簽淄博seo培訓(xùn)
  • 鄭州華久做網(wǎng)站農(nóng)村電商平臺(tái)有哪些
  • 做外國(guó)網(wǎng)站用什么服務(wù)器注冊(cè)網(wǎng)站需要多少錢
  • 網(wǎng)站設(shè)計(jì)介紹免費(fèi)seo
  • 中英網(wǎng)站建立百度關(guān)鍵詞排名用什么軟件
  • 網(wǎng)站續(xù)費(fèi)怎么做分錄百度搜一下
  • 網(wǎng)站主機(jī)安全網(wǎng)絡(luò)推廣公司聯(lián)系方式
  • java里面做網(wǎng)站都要學(xué)什么百度營(yíng)銷客戶端