mysql(mariadb)新增資料庫(UTF-8)與使用者權限

Last Updated on 2019-03-23 by william

每次都會忘記, 而且之前一點都不在意把使用者與root權限分開,但資安還是要顧著.

MariaDB>CREATE DATABASE 資料庫名稱 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

新增使用者,密碼與權限

MariaDB> create database 資料庫名稱;
MariaDB> create user 使用者帳號@localhost identified by '使用者登入密碼';
MariaDB> grant all privileges on 資料庫名稱.* to 使用者帳號@localhost;
MariaDB> flush privileges;
MariaDB> quit

在〈mysql(mariadb)新增資料庫(UTF-8)與使用者權限〉中有 1 則留言

  1. 自動引用通知: Docker 安裝 WordPress – Kenny's Web

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

返回頂端