Skip to content

Instantly share code, notes, and snippets.

/x.txt Secret

Created Dec 16, 2017
Embed
What would you like to do?
$ brew install mysql
$ mysql --version
mysql Ver 14.14 Distrib 5.7.20, for osx10.12 (x86_64) using EditLine wrapper
$ mysql.server start
Starting MySQL
. SUCCESS
$ mysql -u root
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+-----------------------+
| Variable_name | Value |
+-------------------------+-----------------------+
| innodb_version | 5.7.20 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 5.7.20 |
| version_comment | Homebrew |
| version_compile_machine | x86_64 |
| version_compile_os | osx10.12 |
+-------------------------+-----------------------+
8 rows in set (0.01 sec)
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('a06e8b39');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> create database test_db;
Query OK, 1 row affected (0.00 sec)
$ cat /usr/local/etc/my.cnf
# Default Homebrew MySQL server config
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
MySQL Workbenchから接続テスト
→接続成功
https://i.imgur.com/yLGWkkb.png
C#から接続テスト
→接続成功
https://i.imgur.com/HtaYWKb.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment