简体   繁体   中英

Unknown MySQL server host at godaddy

Hy there! I am using linux based hosting from godaddy. 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.

2) I upload my website on godaddy in public_html folder.

3) I created a new username and database and uploaded my database there.

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. 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

<?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. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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