简体   繁体   English

Godaddy的未知MySQL服务器主机

[英]Unknown MySQL server host at godaddy

Hy there! 你好! I am using linux based hosting from godaddy. 我正在使用来自Godaddy的基于Linux的托管。 My domain is registered at somewhere else. 我的域名在其他地方注册。 Now i need to change hosting of my website. 现在,我需要更改网站的托管。

1) i changed the nameservers field at the domain registered site and added the godaddy nameservers. 1)我更改了域名注册站点上的域名服务器字段,并添加了哥达域名服务器。

2) I upload my website on godaddy in public_html folder. 2)我将网站上传到godaddy的public_html文件夹中。

3) I created a new username and database and uploaded my database there. 3)我创建了一个新的用户名和数据库,并将数据库上传到那里。

When i tried to check my domain it's giving strange error 当我尝试检查我的域时,出现了奇怪的错误

"Unknown MySQL server host 'db2' (2)"

After a long time, i am posting my problem here. 很长一段时间后,我在这里发布我的问题。 If anybody knows that what and where is something wrong then do share your ideas. 如果有人知道哪里出了问题以及哪里出了问题,那就一定要分享您的想法。

Also if anybosy knows that how to check the mysql server host information at linux based hosting of godadddy then also share it with me. 另外,如果anybosy知道如何在基于Godadddy的Linux主机上检查mysql服务器主机信息,那么也可以与我共享。 Advance thanks! 提前谢谢!

My initial lines of exported database files are 我导出的数据库文件的初始行是

-- phpMyAdmin SQL Dump
-- version 4.0.10.3
-- http://www.phpmyadmin.net
--
-- Host: db2
-- Generation Time: Jul 01, 2016 at 11:22 AM
-- Server version: 5.1.73
-- PHP Version: 5.4.34

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `arikai2_2`
--

-- --------------------------------------------------------

--
-- Table structure for table ``
--

db.php db.php

<?php

$conn = mysql_connect("localhost", "username","password") or die(mysql_error());

mysql_select_db("db_name");

You need to make sure the values of Hostname is correct, check the database details you will see a field that says hostname and make sure you use it. 您需要确保主机名的值正确,检查数据库详细信息,您将看到一个显示主机名的字段,并确保您使用它。 在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM