1
2

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 5 years have passed since last update.

haproxy ユーザーの作成

Last updated at Posted at 2015-11-18

凄まじく小ネタですが。。

MariaDB 10.1 で(MySQL 5.7 でも同じはず。。)
haproxy用のチェックユーザーを作るときのお話。

せっかちな人のために先に結論:

CREATE USER haproxy;
grant usage on *.* to 'haproxy'@'%';

とすれば解決。

【理由】
5.7から grant 時にユーザーをデフォルトで自動的に作らなくなりました。

MySQL :: MySQL 5.7 Reference Manual :: 5.1.7 Server SQL Modes
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_create_user

なので、先にcreate user しましょう。
というお話でした。

じゃないと、以下のエラーが出てしまいます。

MariaDB [mysql]> grant usage on *.* to 'haproxy'@'%';
ERROR 1133 (28000): Can't find any matching row in the user table
1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?