查询MSQL [英] Query on MSQL

查看:84
本文介绍了查询MSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用mysql_connect命令从php文件连接到mysql

服务器。


我应该使用什么HOST名称?


我使用的教程书是localhost。但我安装文件

住在互联网上,而不是在PC上的本地主机上。


(有3个参数---主机名,用户名,userpassword。)。


感谢您的帮助。

解决方案

< a href =mailto:re ************** @ yahoo.co.in> re ************** @ yahoo.co.in 写道:

我试图使用mysql_connect命令从php文件连接到mysql
服务器。

什么是HOST名称我应该使用?




通常它是localhost。如果它是其他东西,它就像

server.address.com或192.168.0.1。但是,如果您的服务提供商没有为您提供任何主机地址,那么很可能是localhost。如果它不是b $ b,那么我们无法知道它是什么,你需要向服务提供商询问



re *********** ***@yahoo.co.in 写道:

我试图使用mysql_connect命令从php文件连接到mysql
服务器。
<我应该使用什么HOST名称?




哦,如果你不明白,主机名是地址(你可能知道你可以

联系到位于另一台计算机上的服务器而不是你的

php脚本正在运行。


re**************@yahoo.co.in 写道:

我试图使用mysql_connect命令连接到mysql
来自php文件的服务器。

我应该使用什么主机名?

我使用的教程书是localhost。但是我将文件安装在互联网上,而不是安装在PC上的本地主机上。




使用主机的主机名(或IP地址)运行MySQL。


如果MySQL和你的PHP脚本在同一主机上运行,​​你可以使用

常规别名localhost。


别名localhost表示启动

连接的同一主机。不一定是_you_本地的主人。


问候,

Bill K.


Im trying to use the mysql_connect command to connect to the mysql
server from a php file.

What is the HOST name I should use?

The tutorial book I have uses "localhost" but Im installing the file
live on the internet, not on a local host machine on pc.

(There are 3 parameters given --- hostname, username, userpassword.).

thank you for any help.

解决方案

re**************@yahoo.co.in wrote:

Im trying to use the mysql_connect command to connect to the mysql
server from a php file.

What is the HOST name I should use?



Usually it is localhost. If it is something else, it is something like
server.address.com or 192.168.0.1. But if your service provider didn''t
provide you any host address, then it is most likely localhost. If it
isn''t, then we have no way knowing what it is and you need to ask that
from your service provider.


re**************@yahoo.co.in wrote:

Im trying to use the mysql_connect command to connect to the mysql
server from a php file.

What is the HOST name I should use?



Oh, and in case that wasn''t obvious to you, the host name is the address
of the machine where MySQL server is running (as you might know you can
contact to server that is located on another computer than where your
php script is running).


re**************@yahoo.co.in wrote:

Im trying to use the mysql_connect command to connect to the mysql
server from a php file.

What is the HOST name I should use?

The tutorial book I have uses "localhost" but Im installing the file
live on the internet, not on a local host machine on pc.



Use the hostname (or IP address) of the host running MySQL.

If MySQL and your PHP scripts run on the same host, you can use the
conventional alias "localhost".

The alias "localhost" means the same host which is initiating the
connection. Not necessarily the host that is local to _you_.

Regards,
Bill K.


这篇关于查询MSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆