日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Linux系统xshell常用指令,linux系统安装数据库时,xshell工具常用MySQL(5.5)相关命令...

發(fā)布時(shí)間:2024/1/23 数据库 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux系统xshell常用指令,linux系统安装数据库时,xshell工具常用MySQL(5.5)相关命令... 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1、進(jìn)入mysql數(shù)據(jù)庫

[root@centos6 /]# mysql -u root -p

Enter password: root

Welcome to the MySQL monitor. ?Commands end with ; or \g.

Your MySQL connection id is 11

Server version: 5.5.18-log MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

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>

2、查看數(shù)據(jù)庫編碼

mysql> show variables like 'character%';

3、分頁查看my.cnf文件

[root@centos6 ~]# cd /etc/

[root@centos6 etc]# more my.cnf

然后按space空格鍵進(jìn)行下一頁翻頁,翻到最后按space時(shí)候會(huì)自動(dòng)回到命令根目錄[root@centos6 etc]#

4、分頁查看文件目錄(固定頁數(shù))

例如查看/etc目錄下的子目錄,每頁顯示5條信息文件

[root@centos6 etc]# ls -l ?| more -5

5、停止、啟動(dòng)、重啟mysql服務(wù)

[root@centos6 etc]# service mysql stop

Shutting down MySQL... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [確定]

[root@centos6 etc]# service mysql start

Starting MySQL... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[確定]

[root@centos6 etc]# service mysql restart

Shutting down MySQL. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [確定]

Starting MySQL.. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [確定]

[root@centos6 etc]#

6、退出mysql

mysql> quit

7、查看MySQL版本

[root@centos6 /]# mysql --version

mysql ?Ver 14.14 Distrib 5.5.18, for Linux (x86_64) using readline 5.1

8、[root@centos6 etc]# vi my.cnf

這個(gè)命令沒任何作用,用完后需用“:quit”然后按回車(Enter)退出到命令根目錄[root@centos6 etc]#

9、查看mysql的位置

[root@centos6 /]# whereis mysql

10、查看mysql占用的端口號(hào)

mysql> show variables like 'port';

11、查看mysql的監(jiān)聽、端口、及連接

[root@centos6 /]# netstat -apn|grep mysql

12、創(chuàng)建數(shù)據(jù)庫

mysql> create database xxx;

總結(jié)

以上是生活随笔為你收集整理的Linux系统xshell常用指令,linux系统安装数据库时,xshell工具常用MySQL(5.5)相关命令...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。