データベースの作成
1 |
> create database test_app; |
データベースの一覧
1 |
> show databases; |
データベースの削除
1 |
> drop database test_app; |
データベースの選択
1 |
> use test_app; |
実践的なデータベースの作成手順
1 2 3 4 5 6 7 8 |
$ mysql -u root -p ←rootでログイン Enter password: xxxxx > create database test_app; ←データベース作成 > grant all on test_app.* to dbuser@localhost identified by 'xxxxx'; ←ユーザ作成 > exit; $ mysql -u dbuser -p test_app ←作成したユーザでログインし直す Enter password: xxxxx > |