English 中文(简体)
远程 MySQL 主机认为我在另一个主机上
原标题:Remote MySQL host thinks I m on a different host
  • 时间:2012-05-24 22:13:39
  •  标签:
  • mysql

我试图从我的网络服务器上连接到远程主机, Dev。 当我从 Weservice compososor.domain.com 执行此命令时: mysql - u username - password - h dev.domain.com , 我确认拒绝访问< href=' /cdn- cgi/l/email- protection" 类时, 我发现一个错误。 [email protect] <_cf_mail_" 数据- cfemail="6c191f091e01092c1f1c031e1f4208080810d0502420f0301> > < email proted] 。

sports.domain.com IS 网站服务器上有效的 vhost, 但它是14个中的之一, 它不是主主主机, 也不是IP通过 DNS 解决的的主机 。

我该到哪里去了解 MySQL 为何认为我来自 sports.domain.com 而不是预期的 composer.domain.com ?

问题回答

创建 Mysql 用户时, 应该指定用户可以连接的主机。 默认是本地主机 。 尝试在数据库服务器上添加其它用户账户, 尝试 :

  1. CREATE USER username @ % IDENTIFIED BY PASSW或D password ;

  1. CREATE USER username @ sports.domain.com IDENTIFIED BY PASSW或D password ;

% - 这意味着所有客户都可以使用用户账户连接 。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签