<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      mysql學(xué)習(xí)筆記1

      安裝

      1.更新

      sudo apt update
      

      2.安裝

      $ sudo apt install mysql-server
      

      3.查看運(yùn)行狀況

      $ sudo systemctl status mysql.service 
      ● mysql.service - MySQL Community Server
           Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
           Active: active (running) since Mon 2024-09-23 16:13:22 CST; 48s ago
          Process: 3135 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=e>
         Main PID: 3143 (mysqld)
           Status: "Server is operational"
            Tasks: 38 (limit: 1917)
           Memory: 366.0M
              CPU: 980ms
           CGroup: /system.slice/mysql.service
                   └─3143 /usr/sbin/mysqld
      
      Sep 23 16:13:21 iZbp15gacvms2qkuahiq0oZ systemd[1]: Starting MySQL Community Se>
      Sep 23 16:13:22 iZbp15gacvms2qkuahiq0oZ systemd[1]: Started MySQL Community Ser>
      

      4.運(yùn)行安全腳本

      $ sudo mysql_secure_installation 
      
      Securing the MySQL server deployment.
      
      Connecting to MySQL using a blank password.
      
      VALIDATE PASSWORD COMPONENT can be used to test passwords
      and improve security. It checks the strength of password
      and allows the users to set only those passwords which are
      secure enough. Would you like to setup VALIDATE PASSWORD component?
      
      Press y|Y for Yes, any other key for No: 
      

      輸入y,選擇啟用并設(shè)置密碼驗(yàn)證組建。

      There are three levels of password validation policy:
      
      LOW    Length >= 8
      MEDIUM Length >= 8, numeric, mixed case, and special characters
      STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file
      
      Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 
      ```bash
      有三個(gè)級(jí)別的密碼驗(yàn)證策略:
          LOW:長(zhǎng)度至少為 8 個(gè)字符。
          MEDIUM:長(zhǎng)度至少為 8 個(gè)字符,并且包含數(shù)字、大小寫字母和特殊字符。
          STRONG:長(zhǎng)度至少為 8 個(gè)字符,并且包含數(shù)字、大小寫字母、特殊字符,并且不在字典文件中。
      輸入 0 1 2分別代表低 中 高 三檔。 `1`
      ```bash
      Skipping password set for root as authentication with auth_socket is used by default.
      If you would like to use password authentication instead, this can be done with the "ALTER_USER" command.
      See https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-password-management for more information.
      
      By default, a MySQL installation has an anonymous user,
      allowing anyone to log into MySQL without having to have
      a user account created for them. This is intended only for
      testing, and to make the installation go a bit smoother.
      You should remove them before moving into a production
      environment.
      
      Remove anonymous users? (Press y|Y for Yes, any other key for No) : 
      

      詢問(wèn)是否需要移除匿名用戶。 y

      Success.
      
      
      Normally, root should only be allowed to connect from
      'localhost'. This ensures that someone cannot guess at
      the root password from the network.
      
      Disallow root login remotely? (Press y|Y for Yes, any other key for No) : 
      

      是否禁止root用戶遠(yuǎn)程登陸 n

       ... skipping.
      By default, MySQL comes with a database named 'test' that
      anyone can access. This is also intended only for testing,
      and should be removed before moving into a production
      environment.
      
      
      Remove test database and access to it? (Press y|Y for Yes, any other key for No)
      

      是否刪除 test 數(shù)據(jù)庫(kù) n

      ... skipping.
      Reloading the privilege tables will ensure that all changes
      made so far will take effect immediately.
      
      Reload privilege tables now? (Press y|Y for Yes, any other key for No) : 
      

      是否重新加載權(quán)限表使設(shè)置生效?y

      Success.
      
      All done! 
      

      至此,安裝完成。

      試運(yùn)行

      1.登陸

      $ sudo mysql -u root -p
      Enter password: 
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 11
      Server version: 8.0.39-0ubuntu0.22.04.1 (Ubuntu)
      
      Copyright (c) 2000, 2024, 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> 
      

      指令中-u代表-user,登陸用戶為root-p代表-password,輸入密碼

      2.查看現(xiàn)有數(shù)據(jù)庫(kù)

      mysql> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | mysql              |
      | performance_schema |
      | sys                |
      +--------------------+
      4 rows in set (0.00 sec)
      

      show databases列出mysql服務(wù)器上所有數(shù)據(jù)庫(kù)。
      information_schema:這是一個(gè)系統(tǒng)數(shù)據(jù)庫(kù),提供了關(guān)于所有其他數(shù)據(jù)庫(kù)的信息。
      mysql:這是 MySQL 系統(tǒng)數(shù)據(jù)庫(kù),存儲(chǔ)了用戶賬戶、權(quán)限和其他系統(tǒng)級(jí)別的信息。
      performance_schema:這是一個(gè)性能模式數(shù)據(jù)庫(kù),用于監(jiān)控 MySQL 服務(wù)器的性能。
      sys:這是一個(gè)系統(tǒng)數(shù)據(jù)庫(kù),提供了一組視圖和過(guò)程,幫助分析 MySQL 性能。

      3.創(chuàng)建一個(gè)數(shù)據(jù)庫(kù)

      mysql> create database test_database;
      Query OK, 1 row affected (0.01 sec)
      
      mysql> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | mysql              |
      | performance_schema |
      | sys                |
      | test_database      |
      +--------------------+
      5 rows in set (0.00 sec)
      

      使用create database + 數(shù)據(jù)庫(kù)名 可以新建數(shù)據(jù)庫(kù)。

      4.選擇一個(gè)數(shù)據(jù)庫(kù)

      mysql> use test_database 
      Database changed
      mysql> select database();
      +---------------+
      | database()    |
      +---------------+
      | test_database |
      +---------------+
      1 row in set (0.00 sec)
      

      使用use進(jìn)行數(shù)據(jù)庫(kù)選擇,再使用select database();進(jìn)行查看已選擇的對(duì)象。

      5.刪除數(shù)據(jù)庫(kù)

      drop database test_database;
      

      使用drop database+數(shù)據(jù)庫(kù)名,刪除數(shù)據(jù)庫(kù)。
      刪除完成后,查看下

      mysql> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | mysql              |
      | performance_schema |
      | sys                |
      +--------------------+
      4 rows in set (0.00 sec)
      

      可見(jiàn)新建的test_database已被刪除。

      6.退出

      mysql> quit
      Bye
      

      或者

      mysql> exit
      Bye
      

      補(bǔ)充:創(chuàng)建用戶

      CREATE USER 'John_Lenon'@'%' IDENTIFIED BY 'Beatles!666';
      Query OK, 0 rows affected (0.17 sec)
      
      posted @ 2024-09-23 16:51  科里布  閱讀(17)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 免费a级毛片18以上观看精品 | 久久夜色撩人精品国产av| 日韩丝袜亚洲国产欧美一区 | 变态另类视频一区二区三区| 好吊视频在线一区二区三区| 中文字幕日韩有码国产| av天堂久久精品影音先锋| 亚洲高潮喷水无码AV电影| 青冈县| 乱人伦人妻中文字幕不卡| 国产成人MV视频在线观看| 日本欧美一区二区三区在线播放| 国偷自产av一区二区三区| 阿拉善左旗| 91中文字幕在线一区| 久久精品麻豆日日躁夜夜躁| 国产成人MV视频在线观看| 亚洲综合网一区中文字幕| 亚洲男人天堂2018| 黑人玩弄人妻中文在线| 久久道精品一区二区三区| 国产免费毛卡片| 在线涩涩免费观看国产精品| 亚洲av无码精品色午夜蛋壳| 18分钟处破好疼哭视频在线观看| 无码av中文字幕久久专区| 亚洲色成人一区二区三区| 又爽又黄又无遮挡的视频| 国产剧情视频一区二区麻豆| 国色天香成人一区二区| 日产精品久久久久久久| 久久伊99综合婷婷久久伊| 人妻少妇偷人一区二区| 宣汉县| 国产成人精品一区二区秒拍1o | 小金县| 亚洲粉嫩av一区二区黑人| 精品国产久一区二区三区| 妇女自拍偷自拍亚洲精品| 免费中文熟妇在线影片| 老司机午夜精品视频资源|