mysql 5を設定します.7リモート接続
2084 ワード
ubuntu 14.04にmysql 5をインストールします.7以降、ローカルでMySQLサーバーに接続できます.リモートではだめです.
注記/etc/mysql/mysql.conf.d/mysqld.cnfの中のbind-address=127.0.0.1 1 2 1 2
Access denied for user'root'@'ipアドレス'(using password:YES)のような問題がある場合 1 1
rootユーザーパスワードを入力しmysqlサーバコマンドラインに入ります 1 2 3 1 2 3
次に、次のコマンドを使用して、どのユーザーとhostがアクセスできるかを確認します.%は任意のipアドレスを表します. 1 1
注記/etc/mysql/mysql.conf.d/mysqld.cnfの中のbind-address=127.0.0.1
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
Access denied for user'root'@'ipアドレス'(using password:YES)のような問題がある場合
mysql -uroot -p
rootユーザーパスワードを入力しmysqlサーバコマンドラインに入ります
use mysql;
Grant all on *.* to 'root'@'%' identified by 'root ' with grant option;
flush privileges;
次に、次のコマンドを使用して、どのユーザーとhostがアクセスできるかを確認します.%は任意のipアドレスを表します.
select user,host from user;