0
0

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.

mysql外部接続

Posted at

mysql 外部接続

select user, host, password from mysql.user;

GRANT ALL PRIVILEGES ON . TO aaa@"192.168.50.%" IDENTIFIED BY 'aaa' WITH GRANT OPTION;

MariaDB [(none)]> select user, host, password from mysql.user;
+-------------+--------------+-------------------------------------------+
| user | host | password |
+-------------+--------------+-------------------------------------------+
| root | localhost | |
| root | cent74 | |
| root | 127.0.0.1 | |
| root | ::1 | |
| | localhost | |
| | cent74 | |
| aaa | localhost | *A02AA727CF2E8C5E6F07A382910C4028D65A053A |
| bbbbbbbbbbb | localhost | *C92Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| aaa | 192.168.% | *A02AA727CF2E8C5E6F07A382910C4028D65A053A |
| aaa | 192.168.50.% | *A02AA727CF2E8C5E6F07A382910C4028D65A053A |
+-------------+--------------+-------------------------------------------+

削除

DROP USER aaa@192.168.50.%;

ポート
MariaDB [(none)]> SHOW VARIABLES LIKE 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.001 sec)

接続確認

mysql -h 192.168.3.58 -u aaa --password=aaa

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?