January 7 night, Baidu upgraded webmaster Complaints Center. The upgrade will be the webmaster complaints from the Baidu Complaint Center (tousu.baidu.com) in the stripped, officially merged into the Baidu Webmaster platform. With the Webmaster Complaints Center of Independence, Baidu and
Introduction: This is a detailed page for differences between localhost and 127.0.0.1. It introduces the knowledge, skills, experience, and some PHP Source Code related to PhP.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339602 'rolling = 'no'>
What is the difference between localhost and 127.0.0.1? I believe some people will say it is a local IP address. S
The difference between localhost and 127.0.0.1What is the difference between localhost and 127.0.0.1? Believe that some people will say is the local IP, has been said that with 127.0.0.1 than localhost better, can be reduced once the resolution. It seems that this entry question is still unclear, in fact, there is a difference between the two.No1:
In PHP, localhost is used to connect to Mysql. In PHP, how to use localhost to connect to Mysql is unsuccessful. localhostmysql encountered a problem when compiling and installing the Linux environment for a colleague yesterday: the WEB server is apache, how to use localhost in PHP to connect to Mysql is unsuccessful. localhostmysql
Problems found
I encountered
The code is as follows:
connect_error) { die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);};echo 'ok';
If the above connection address is ' localhost ' there will be an error, as follows:Warning:mysqli::mysqli (): (hy000/2002): No such file or directory IN/MNT/WWW/CGlevi/publichtml/mysql.php on Li Ne 2Connect Error (2002) No such file or directory
Link normal after modifying '
localhostLocalHost in the computer network, localhost (meaning "local host" means "this computer") is a standard host name for The Loop network Interface (loopback), and the corresponding IP address is 127.0.0.1 (IPV4) and [:: 1] (IPV6).
Directory
1 Introduction
2 setting 2.1 Settings in Windows: 2.2 Linux settings:1 IntroductionThis name is also a reserved domain name (RFC 2606) and is listed separately in order to avoid confusion with the narrowly
Locally installed PHP and MySQL environment, with localhost access to a page, the page is just a simple link MySQL database and the following SQL statement to execute the query and echo out the data, which also uses a popular online paging function, each page shows 20 data, There are 300,000 data in the total database.
SELECT Id,col1,col2col3,col4,col5 FROM DBtable LIMIT 100,20;
The execution time of this statement in the MySQL task window is only 0.
The difference between localhost and 127.0.0.1, localhost127.0.0.1
Today a new server, the code moved past the time, unexpectedly database connection, looked, the original will be configured from 127.0.0.1 to localhost on it. Look at the difference between the two below.
Many people will be exposed to this IP address 127.0.0.1. Maybe you'll ask 127.0.0.1 what's the address? In fact, 127.0.0.1 is a loopback
the problem, Chrome browser stay on this page. (This page is the default page of Apache, not the page in the virtual host)Later, I think it will not be the Hosts file error? So I tried to use IP:HTTP://127.0.0.1/access, and to my surprise, this time the visit was successful.So I decided that the problem arose between localhost and ip:http://127.0.0.1/, to find the point where the problem occurred, and then I found the results in Baidu 1,
Opinion
The difference between localhost and 127.0.0.1What is the difference between localhost and 127.0.0.1? I believe some people will say that the local IP, has been said, with 127.0.0.1 than localhost better, you can reduce the one time parsing. It seems that some people are not clear about this problem, in fact, there is a difference between the two.
No1:
Many of my friends may encounter a problem. I don't know what is the difference between 127.0.0.1 and localhost. However, sometimes I find that the connection fails when I use localhost, but I changed it to 127.0.0.1, so what are their differences? I will introduce them to you below.
Many of my friends may encounter a problem. I don't know what is the difference between 127.0.0.1 and
Error: [ins-06101] IP address of localhost cocould not be determined when installing Oracle 11gr2
This error occurs because the host name and/etc/hosts file are inconsistent. You only need to write the host name and its IP address to the/etc/hosts file and then OK.
View the relationship between the host name and the IP Address:
[Root @ localhost ~] # Cat/etc/sysconfig/Network
Networking = Yes
Networking_
Error: [ins-06101] IP address of localhost cocould not be determined when installing Oracle 11gr2
This error occurs because the host name and/etc/hosts file are inconsistent. You only need to write the host name and its IP address to the/etc/hosts file and then OK.
View the relationship between the host name and the IP Address:
[Root @ localhost ~] # Cat/etc/sysconfig/Network
Networking = Yes
Networking_
This article describes how to use localhost to connect to Mysql in PHP, but there is no problem when using 127.0.0.1, this article also explains the difference between using 127.0.0.1 and localhost to connect to the MySQL host. For more information, see
Problems found
I encountered a problem yesterday when I was helping my colleagues compile and install the Linux environment:The WEB server is apache and th
Today want to try Php7, but found that PHP7 only support Apache2.4 version, and my Computer Apache is 2.2 version, in order to want to taste, you have to download the new Apache2.4PHP7 and apache2.4 after the installation integration, localhost can be accessed normally, no problem.Then I configured a few virtual host, this time, the virtual host can be normal access, but localhost will not be able to access
Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO), 28000 denied
Recently, mysql 5.6 has encountered the following problems.
Thank you for sharing the original article:
CASE Environment:
Operating System:Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit
Database Version:Mysql 5.6.19 64 bit
Case study:
I started to learn mysql this day and installed Mysql 5.6.19 64bit database. The installat
(0) CatalogueGo, is a lifetime, not to go, but also for life (the road of the program Ape)Navicat connection MySQL appears 2003--can ' t connect to MySQL server on localhost (10061)One: Cause(0) As a result of a recent illness, leisure time (i.e. illness) has been thinking about the following questions:Think of a: how to be a qualified program ape, how to become a veritable procedural ape?Think two: There is the end, it is not worth staying up late to
PHP links MySQL host 127.0.0.1 and localhost
PHP links MySQL host 127.0.0.1 and localhost
Use mysql-u root-p to enter the MySQL operation interface
You can directly use/usr/local/php5/bin/php/web/test. php to connect to the database.
Apache is also restarted, which is also invalid.
Question: Why does the web page fail to be executed but the command is successfully executed?This is depressing. If you
Original link: http://blog.csdn.net/xifeijian/article/details/12879395Many people will be exposed to this IP address 127.0.0.1. Maybe you'll ask 127.0.0.1 what's the address? In fact, 127.0.0.1 is a loopback address, refers to the local machine, commonly used for testing. We often use to ping 127.0.0.1 to see the local ip/tcp is not normal, if you can ping the normal usage.For most of the customary localhost, it is essentially pointing to 127.0.0.1, t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.