17
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MySQL ユーザ名&ホストの変更

Posted at

MySQL ユーザ名&ホストの変更

概要

MySQLにおけるユーザ名&ホストの変更について説明します。

手順

構文

RENAME USER 'ユーザー名'@'ホスト名' to '新ユーザー名'@'新ホスト名';

例文

RENAME USER 'admin'@'localhost' TO 'admin'@'%';

「%」を使う場合は'(シングルコーテーション)をつける必要があります。

確認方法

SELECT user, host FROM mysql.user;

参考

17
10
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
17
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?