简体   繁体   English

使用核心ftp将网站上传到服务器后如何附加数据库?

[英]How to attach database after uploading website to server using core ftp?

I uploaded complete website to server using Core FTP but i want to connect database and dashboard for website. 我使用Core FTP将完整的网站上传到服务器,但是我想连接网站的数据库和仪表板。

How to connect the database to website? 如何将数据库连接到网站?

Please help me out.... 请帮帮我。

I tried to connect using 我尝试使用连接

$con = mysqli_connect('localhost', 'root', '', 'applicants');

OR 要么

$con = mysqli_connect('IP Address or web URL', 'root', '', 'applicants');

The second option looks correct as 1st option doesn't have password in call. 第二个选项看起来正确,因为第一个选项在通话中没有密码。
DO as below example: 请按照以下示例进行操作:

<?php
$con = mysqli_connect("localhost","my_user","my_password","my_db");

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
?>

Here localhost is MySql server location 本地主机是MySql服务器位置
my_user is userId of MySql my_user是MySql的userId
my_password is Password of MySql my_password是MySql的密码
my_db is database name of MySql my_db是MySql的数据库名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Core FTP Le 将网站上传到服务器后如何附加数据库 - How to attach Database after uploading website to server using Core FTP Le 使用Codeigniter设计的上载网站上的数据库错误 - Database error on uploading website designed using codeigniter 如何移动数据库并将其附加到SQL Server 2008 - How to move database and attach it to SQL Server 2008 FTP数据库到webhost服务器 - FTP Database to webhost server 如何从另一台服务器附加 SQL Server 数据库文件 - How to attach a SQL Server database file from another server 使用登录号从ENA数据库的ftp服务器下载数据 - Download data from ftp server of ENA database using accession numbers 将数据库上传到服务器 - Uploading a database to server 如何使用PHP将文件上传到服务器时将文件名存储在数据库中以及其他信息? - How to store file name in database, with other info while uploading image to server using PHP? 读取/写入数据到服务器,ftp或网站 - Reading/writing data to server, ftp, or website SQL Server 2005:使用 sp_attach_db 或 CREATE DATABASE 与多个文件组和全文目录连接数据库 - SQL Server 2005: Attach database using sp_attach_db or CREATE DATABASE with multiple filegroups and full text catalog
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM