老熟女激烈的高潮_日韩一级黄色录像_亚洲1区2区3区视频_精品少妇一区二区三区在线播放_国产欧美日产久久_午夜福利精品导航凹凸

重慶分公司,新征程啟航

為企業提供網站建設、域名注冊、服務器等服務

mariadb數據庫

##配置網絡
 vim/etc/sysconfig/network-scripts/ifcfg-eth0 寫網絡配置文件
 systemctl restart network  重啟網絡
##配置yum源
 vim /etc/yum.repos.d/rhel_dvd.repo 寫yum源配置文件
 yum clean all     重置yum源
##修改服務器名字
 hostnamectl set-hostnamemariadb.westos.com 更改本地服務器名字
 hostname 查看本地本地服務器名字

成都創新互聯-專業網站定制、快速模板網站建設、高性價比資陽網站開發、企業建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式資陽網站制作公司更省心,省錢,快速模板網站建設找我們,業務覆蓋資陽地區。費用合理售后完善,十載實體公司更值得信賴。

mariadb數據庫

mariadb數據庫

mariadb數據庫


####### mariadb數據庫########### 數據庫廠商 MySQL  oracle

一 數據庫的安裝與配置
    1 yum install mariadb-server -y  ##安裝mariadb 

mariadb數據庫

    2 systemctl start mariadb        ##開啟mariadb服務
    3 mysql                          ###進入mysql數據庫
    4 netstat -antlpe | grep mysql   ###查詢mysqul
    5 vim /etc/my.cnf               ###mysqul的配置文件
       skip-networking=1

mariadb數據庫

    6 systemctl restart mariadb      ###重啟mariadb服務
    7 netstat -antlpe | grep mysqul 
    8 mysql
    9 mysql_secure_installation     ###mysql安全內容配置
       (1)Enter current password for root(enter for none):[Enter]
       (2)Set root password? [Y/n]Y
           New password:                ###輸入新密碼
           Re-enter new password:       ###確認密碼
       (3)Remove anonymous users? [Y/n]Y
       (4)Disallow root login remotely?[Y/n] Y
       (5)Remove test database and accessto it? [Y/n] Y
       (6)Reload privilege tables now?[Y/n] Y
   10 mysql -uroot -p 
   11 mysql
圖:

mariadb數據庫

mariadb數據庫

mariadb數據庫

mariadb數據庫


二  數據庫基本語句
 1 登陸
   (1)mysql -uroot -pqwer1234  ##qwer1234是密碼
   (2)mysql -uroot -p 
     Enter password:             ##密碼不顯示;安全性能高
 2 查詢
    (1)show databases;             ###顯示數據庫

   (2)use mysql                  ###進入mysql庫

    (3)show tables;                ###顯示當前庫中表的名字
    (4)select * from user          ###查詢user表中的所有內容(* 可以用表中所有字段來代替)
    (5)desc user;                  ###查詢表的結構 (顯示所有字段的名稱)

mariadb數據庫

mariadb數據庫

mariadb數據庫

mariadb數據庫


 3 數據庫及表的建立
  (1)create database westos;  ####創建westos庫
         show databases;         ###顯示數據庫

mariadb數據庫

  (2)use westos               ###進入westos庫
       create table linux(      ####linux表
    -> username varchar(15) not null,
    -> password varchar(15) not null); ###表中含有username,password兩個字段;字符長度最大為15個,都不為空。(字符長度可根據需要更改)
      desc linux;               ###查詢表的結構 (顯示所有字段的名稱)

mariadb數據庫

  (3)insert into linux values ('user','123');###向表中插入數據,
       select * from linux;      ###查詢linux表中的所有內容            
      insert into linux values('user1',password('123') );
      ###向表中插入數據,加密密碼mariadb數據庫


 4 更新數據庫信息
   (1)update linux set password=('234') where username='user1';
        ##### 更新user1的密碼
       select * from linux;  ###查詢linux表中的所有內容 

mariadb數據庫

   (2)update linux set password=password('123') where  username='user';
        #####更新use的密碼,并加密
         select * from linux; 

mariadb數據庫

   (3)alter table linux add age varchar(4);
       ####增加age字段到表的最后一列
        select * from linux; 

mariadb數據庫

   (4)alter table linux add exam varchar(4) after password;
        ####增加exam字段到指定位置
        select * from linux; 

mariadb數據庫

   (5)alter table linux drop exam; ####刪除linux中的exam字段
        select * from linux; 

mariadb數據庫

    (6)update linux set password=password('123')where ( username='user' or username='user1');
    ####更新兩個用戶的密碼,并加密
     select * from linux;
mariadb數據庫


 5 數據庫的備份
       2 mysqldump -u root -pqwer1234 --all-database
          ####備份所有表中的所有數據
       3 mysqldump -u root -pqwer1234 --all-database --no-data
          ####備份所有表,但不備份數據
       4 mysqldump -u root -pqwer1234 westos
          ####備份westos庫
       5 mysqldump -u root -pqwer1234 westos > /mnt/westos.sql
          ####備份westos庫并把數據保存到/mnt/westos.sql
       8 mysql -uroot -pqwer1234 -e "create database westos;"
          ####建立westos庫
       9 mysql -u root -pqwer1234 westos < /mnt/westos.sql
          ####把數據導入westos庫
      10 mysql -u root -pqwer1234
      16 mysqldump -u root -pqwer1234 westos linux > /mnt/linux.sql
           ####備份westos庫中的linux表并把數據保存到/mnt/linux.sql
      17 mysqldump -u root -pqwer1234 westos test> /mnt/test.sql
          ####備份westos庫中的test表并把數據保存到/mnt/test.sql
      27 mysql -u root -pqwer1234 -e "show tables from westos"
          ###顯示westos庫中表的名字
      28 mysql -u root -pqwer1234 westos < /mnt/test.sql
          ####把test表中數據導入westos庫
      29 mysql -u root -pqwer1234 -e "show tables from westos"
          ###顯示westos庫中表的名字

mariadb數據庫

mariadb數據庫

mariadb數據庫


 6 數據庫的刪除
   (1) 刪除表中數據  delete from linux where username='username';
       mysql -u root -pqwer1234
       MariaDB [(none)]> usewestos    ###進入westos庫
       MariaDB [westos]> select * fromlinux;    ###查詢linux表中的所有內容
        delete from linux whereusername='user1'; ###刪除linux表中的user1的數據
        delete from linux whereusername='user'; ###刪除linux表中的user的數據
        select * from linux; ###查詢linux表中的所有內容

mariadb數據庫

   (2)刪除表
        drop table linux;
   (3)刪除庫
        drop database westos;

mariadb數據庫

mariadb數據庫



 7 用戶授權
  (1)建立用戶
     MariaDB [(none)]> create userlee@localhost identified by ' lee';
      ####建立用戶lee本機登陸
     MariaDB [(none)]> create userlee@'%' identified by ' lee';
      ####建立lee用戶,網絡登陸

mariadb數據庫

mariadb數據庫


  (2)用戶授權
     MariaDB [(none)]> grantinsert,update,delete,select on westos.test to lee@localhost;
       ### 本機登陸lee,授權
      MariaDB [(none)]> grant selecton westos.* to lee@'%' ;
        ####網絡登陸lee,授權

mariadb數據庫

   (3)查看用戶權力
      MariaDB [(none)]> show grantsfor lee@'%'
       ####查看用戶權力
      MariaDB[(none)] > show grantsfor lee@localhost;、
       ####查看用戶權力

   (4)去除用戶授權權力
       MariaDB [(none)]> revoke deleteon westos.test from lee@localhost;
       ######去除用戶授權權力
       MariaDB [(none)]> show grantsfor lee@localhost; 查看權限

mariadb數據庫

    (5)刪除用戶
         MariaDB [(none)]> selectUser,Host from mysql.user;查看用戶
         MariaDB [(none)]]> drop userlee@'%'; 刪除用戶
         MariaDB [(none)]> selectUser,Host from mysql.user;查看用戶mariadb數據庫


8  密碼修改
  (1)超級用戶密碼知道
   mysqladmin -uroot -p234 password lee   ##修改超級用戶密碼為lee
  (2)超級用戶密碼忘記
   [root@mariadb mnt]# mysqld_safe--skip-grant-tables &
    ####開啟mysql登陸接口并忽略授權表
   [root@mariadb mnt]# mysql ###進入mysql
    MariaDB [(none)]> selectUser,Host,Password from mysql.user;
    ####查看mysql.user中用戶及用戶密碼
    MariaDB [(none)]> updatemysql.user set Password=password('234') where User='root';  ##更新超級用戶密碼信息為234
    MariaDB [(none)]> select User,Host,Passwordfrom mysql.user;
     ####查看mysql.user中用戶及用戶密碼
    MariaDB [(none)]> quit
[root@mariadb mnt]# fg
[root@mariadb mnt]# killall -9 mysqld_safe ####關閉mysqld_safe進程
[root@mariadb mnt]# ps aux | grep mysql ###過濾mysql的所有進程
[root@mariadb mnt]# kill -9 mysqlpid    ####關閉mysql的所有進程
[root@mariadb mnt]# systemctl restart mariadb ###重啟mariadb服務
[root@mariadb mnt]# mysql -uroot -p234 ###登陸測試

mariadb數據庫

mariadb數據庫

mariadb數據庫

mariadb數據庫


 三 數據庫的頁管理工具
1.安裝    
156 yum install httpd php php-mysql -y ##安裝 httpd php php-mysql三個安裝包
     yum install php-mysql.x86_64-y
     yum install httpd -y
     yum install php.x86_64 -y

157 systemctl start httpd.service              ##開啟httpd服務
158 systemctl enable httpd
159 systemctl stop firewalld.service              ##關閉火墻
160 systemctl disable firewalld
2. 需要下載
162 phpMyAdmin-3.4.0-all-languages.tar.bz2 #### 壓縮包
163 tar jxf phpMyAdmin-3.4.0-all-languages.tar.bz2 -C /var/www/html
    ####解壓壓縮包到/var/www/html
164 mv phpMyAdmin-3.4.0-all-languages/ mysqladmin
   #### 將安裝包下的所有文件移動到 mysqladmin
165 cd mysqladmin
166 cp -p  config.sample.inc.phpconfig.inc.php ###復制配置文件
167 vim config.inc.php   ###寫配置文件

  $cfg['blowfish_secret'] = 'mysql';/* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

mariadb數據庫

168 systemctl restart httpd
3.測試
訪問
173 http://172.25.254.144/mysqladmin

mariadb數據庫

mariadb數據庫

mariadb數據庫

mariadb數據庫



網頁名稱:mariadb數據庫
分享路徑:http://www.xueling.net.cn/article/jhsgds.html

其他資訊

在線咨詢
服務熱線
服務熱線:028-86922220
TOP
主站蜘蛛池模板: 日本中文一区二区三区亚洲 | 中文字幕在线免费看线人 | 国产视频1 | 一级黄色片播放 | 人妻内射一区二区在线视频 | 91视频免费进入 | 久久一区二区视频 | 国产中文字幕欧美 | 91国内在线播放 | jizz成熟丰满韩国女人 | 国产精品久久久久久无码 | 天天爽av | 嫩草欧美 | 国内a级一片免费av 麻豆日产六区 | 国产成人无码短视频 | 极品少妇xxxxⅹ免费视频 | 国产真实乱子伦视频播放 | 天天摸夜夜添狠狠添高潮出水 | 综合人妻久久一区二区精品 | 欧美一级大片在线视频 | 综合天堂av久久久久久久 | 中文字幕第一页在线视频 | 免费播放大片免费观看视频 | 青青免费视频在线 | 日本视频三区 | 久久久99国产 | 日韩一区二区三区色 | 成人在线中文字幕 | 欧美一区二区三区在线视频观看 | 国产成人无码精品久久久免费 | 四虎最新影院 | 亚洲一区二区三区蜜桃 | 妖精森林的救世主动漫在线观看 | 自拍亚洲伦理 | 亚洲免费图区在线视频 | 久色青青 | 亚洲一区二区三区蜜桃 | 日本成人一级片 | 国产视频一区二区三区在线 | 99九色| 豪放女大兵免费看 |