Windows 訪問CentOS上Mysq配置說明
Windows 訪問CentOS上Mysq配置說明:要完成Windows上的客戶端訪問CentOS上的MySQL,就需要做到兩點:關閉CentOS上防火牆;賦予資料庫使用者遠端訪問的許可權,並清除許可權的快取,具體配置如下:
[root@mysql ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@mysql ~]# mysql -uroot -proot
ERROR 1045 (28000): Access denied for user (using password:
[root@mysql ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.66 Source distribution
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@mysql ~]# mysql -uroot -proot
ERROR 1045 (28000): Access denied for user (using password:
[root@mysql ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.66 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set password=password('rootroot');
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@mysql ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.66 Source distribution
Bye
[root@mysql ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.66 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> quit
Bye
[root@mysql ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.66 Source distribution
Bye
[root@mysql ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.66 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all on *.* to identified by 'rootroot';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to identified by 'rootroot';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22275400/viewspace-764623/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS8中systemd配置檔案說明CentOS
- Redis 6.0 訪問控制列表ACL說明Redis
- Centos7 中 Systemd 的Unit檔案配置說明CentOS
- Centos系統中 Systemd 的Unit檔案配置說明CentOS
- centos下部署redis服務環境及其配置說明CentOSRedis
- Kafka配置說明Kafka
- FTP配置說明FTP
- rust配置說明Rust
- CentOS 7升級核心簡明說明CentOS
- Spring配置說明Spring
- 客戶端網路配置上的一點說明客戶端
- centos7 安裝 ElasticSearch 配置外網訪問CentOSElasticsearch
- centos6配置遠端桌面,使用xmanager訪問CentOS
- WINDOWS訊息說明 (轉)Windows
- CentOS6.4 訪問域局網中Windows的共享CentOSWindows
- C++ 訪問說明符詳解:封裝資料,控制訪問,提升安全性C++封裝
- pureftpd安裝配置簡明說明 (轉)FTP
- elasticsearch.yml 配置說明Elasticsearch
- Elasticsearch 引數配置說明Elasticsearch
- goldengate ddl 配置說明Go
- kafka 引數配置說明Kafka
- webwork.properties配置說明Web
- 交換機配置命令說明
- kettle MongoDB Output 配置說明MongoDB
- 雷池 docker env 配置說明Docker
- Centos6.3下Apache配置https證書訪問CentOSApacheHTTP
- 訪問被拒絕。 說明: 訪問服務此請求所需的資源時出錯。伺服器可能未配置為訪問所請求的 URL。...伺服器
- Oracle EM Https WIndows不能訪問防火牆配置OracleHTTPWindows防火牆
- Redis應用配置項說明Redis
- Nginx的配置檔案說明Nginx
- Docker 的配置檔案說明Docker
- Nginx負載均衡配置說明Nginx負載
- Apache 配置檔案說明(轉)Apache
- 在CentOS中配置VNC實現遠端登入訪問CentOSVNC
- windows NT事件日誌說明 (轉)Windows事件
- webshpere4.0AE + Oracle8i配置詳細說明(上) (轉)WebOracle
- coreseek實戰(二):windows下mysql資料來源部分配置說明WindowsMySql
- Nginx的gzip配置引數說明Nginx