用PHP连接MySQL代码的参数说明
代码是这样的:
$link=mysql_connect("localhost","root","123456");
if(!$link) echo "没有连接成功!";
else echo "连接成功!";
?>
其中红色部分可以根据自己的实际情况进行修改。
localhost:表示数据库所在地。如果是本机,则写localhost,如果在其它机器上,则可写IP地址。
root:进入数据库的用户名。MySQL默认用户名为root。
123456:用户名所对应的密码。根据自己设的管理员密码修改这串数字。
当然,所以以上提到的这些代码都是在配置好Apache + MySQL + PHP 之后才能运行成功的。请大家注意。
作者:Sunec
原载:Cenus Blog
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
