host

CentOS本地host修改配置IP域名之间解析

有些话、适合烂在心里 提交于 2020-03-02 05:06:28
在进行web开发的时候,通常需要以http://localhost或者127.0.0.1之类的访问本地环境的网站。但是,如果本地放的网站多了,不得不做别的操作,比如端口设置。结果不容易记住啦。 我在本地之用的是ubuntu+nginx环境,nginx允许设置多个域名,只需要分别指向不同的存储位置即可。那么,接下来就要如何设置一个自己选定的域名,同时这个域名只访问本地某个网站呢? 在windows中,有一个文件:system32/drivers/etc/host,在这个文件里,可以配置域名指向本地IP,从而实现上述目的。 在ubuntu里面(一般linux都如此),则是在/etc下查找hosts文件,这个就是相当于那个host文件一样的存在。如果没有的话,就自己新建一个。 sudo vi /etc/hosts 添加你需要的项,格式如下: <IP> <HOSTNAME>.<DOMAIN> <ALIAS> 以下是我做的一些配置: 127.0.0.1 www.v.com #在我的计算机 浏览器 中输入www.v.com域名,就可以访问我本地指定的网站。当然仅限于本地。不了解内情的还以为我注册了www.v.com这个域名呢。 127.0.0.1 www.b2b.com 127.0.0.1 www.itdiffer.org 127.0.0.1 www.weixin.com 要注意的是

MySQL : 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost

时光总嘲笑我的痴心妄想 提交于 2020-03-02 03:08:26
摘自: http://www.cnblogs.com/xyzdw/archive/2011/08/11/2135227.html 报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1。 改表法。 可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user; 2. 授权法。 例如,你想myuser使用mypassword从任何主机连接到mysql 服务器 的话。 [ 我用这个方法 测试可行,其他 方法没试过] GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 如果你想允许用户myuser从ip为192.168.1

[mysql] 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost

蹲街弑〆低调 提交于 2020-03-02 03:07:48
报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1。 改表法。 可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user; 2. 授权法。 例如,你想myuser使用mypassword从任何主机连接到mysql 服务器 的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql 服务器 ,并使用mypassword作为密码 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3'

HOST ip is not allowed to connect to this MySql server

♀尐吖头ヾ 提交于 2020-03-02 03:07:00
报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1。 改表法。 可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>flush privileges; mysql>select host, user from user; mysql>quit 2. 授权法。 例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器,并使用mypassword作为密码 GRANT ALL PRIVILEGES ON

Host '192.168.1.21' is not allowed to connect to this MySQL server

泪湿孤枕 提交于 2020-03-02 03:06:33
报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1。 改表法。 可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user; 2. 授权法。 例如,你想myuser使用mypassword从任何主机连接到mysql 服务器 的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql 服务器 ,并使用mypassword作为密码 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3'

HOSt ip is not allowed to connect to this MySql server

时光怂恿深爱的人放手 提交于 2020-03-02 03:06:04
报错:1130-host ... is not allowed to connect to this MySql server 解决方法: 1。 改表法。 可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>flush privileges; mysql>select host, user from user; mysql>quit 2. 授权法。 例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器,并使用mypassword作为密码 GRANT ALL PRIVILEGES ON

Host is not allowed to connect to this MySQL server

孤街醉人 提交于 2020-03-02 03:05:12
转自: http://www.cnblogs.com/wliang22/archive/2009/11/13/1602423.html 如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '210.13.92.66' is not allowed to connect to this MySQL server 请按照如下方法解决: login as: root ///登陆系统 root@tqwm.cn's password: ///输入密码 Last login: Tue Apr 15 14:06:54 2008 from 210.13.92.66 [root@myserver ~]# /usr/local/mysql/bin/mysql -uroot -hlocalhost -p ///登入mysql Enter password: ///输入mysql对应用户的密码 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 431 Server version: 5.0.58-enterprise-gpl-log Source Type 'help;' or '\h' for help. Type '\c' to clear the

Host is not allowed to connect to this MySQL server

笑着哭i 提交于 2020-03-02 03:04:39
解决方法: [root@GYQ-Prod-Zabbix ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3911752 Server version: 5.5.60-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix' WITH GRANT OPTION; Query OK, 0 rows affected (0.02 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.04 sec) 来源: https://www.cnblogs.com

‘Host’ is not allowed to connect to this mysql server

冷暖自知 提交于 2020-03-02 03:04:05
‘Host’ is not allowed to connect to this mysql server mysql 数据库不允许远程连接 方法一:修改 host 表 进入mysql数据库,选择mysql mysql> use mysql;    选择 host 表 mysql> select host from user;    更新 host, 然后退出。 mysql> update user set host = '%' where user='root';    重启数据库, 完成。 # service mysqld restart    -------------- 打赏码 -------------------------------- 来源: https://www.cnblogs.com/Jomini/p/10750277.html

Mysql数据库连接报错!1130:host XXX is not allowed to connect to this mysql server

删除回忆录丶 提交于 2020-03-02 02:59:22
我猜想是可能是连接的用户权限问题。结果这样子操作mysql库,可以解决此问题。在本机登入mysql后,更改 “mysql” 数据库里的 “user” 表里的 “host” 项,从”localhost”改称'%'。。 mysql -u root -p mysql>use mysql; mysql>select 'host' from user where user='root'; mysql>update user set host = '%' where user ='root'; mysql>flush privileges; mysql>select 'host' from user where user='root'; 第一句是以权限用户root登录 第二句:选择mysql库 第三句:查看mysql库中的user表的host值(即可进行连接访问的主机/IP名称) 第四句:修改host值(以通配符%的内容增加主机/IP地址),当然也可以直接增加IP地址 第五句:刷新MySQL的系统权限相关表 第六句:再重新查看user表时,有修改。。 重起mysql服务即可完成 一、通过MySQL-Front或mysql administrator连接mysql的时候发生的这个错误 ERROR 1130: Host *** is not allowed to connect to this