建立資料庫:
MariaDB [(none)]> CREATE DATABASE `dbname` CHARACTER SET utf8 COLLATE utf8_general_ci;
建立使用者:
MariaDB [(none)]> CREATE USER 'user' IDENTIFIED BY 'password';
建立連接許可權:
MariaDB [(none)]> GRANT USAGE ON *.* TO 'user'@localhost IDENTIFIED BY 'password';
授予資料庫權限:
MariaDB [(none)]> GRANT ALL privileges ON `dbname`.* TO 'user'@localhost;
更新權限:
MariaDB [(none)]> FLUSH PRIVILEGES;
沒有留言:
張貼留言