LoginSignup
3
3

More than 5 years have passed since last update.

MySQLコマンドメモ

Last updated at Posted at 2015-12-31

コマンドをすぐに忘れちゃうので、
自分の備忘録的にメモしてまいります!

ルートユーザのパスワード設定


$mysqladmin -u root password 新しいパスワード

mysqlクライアントの実行

$mysql -u root -p 

データベース作成

文字コードを指定して表示

CREATE DATABASE データベース名 CHARACTER SET utf8;

データベース一覧表示

mysql > SHOW DATABASES;

テーブルの一覧を表示

mysql > SHOW TABLES;

テーブルの構造の確認

mysql > desc table;
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3