If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Installing database after moving to new host

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-12, 10:07
matthew-marc matthew-marc is offline
Registered User
 
Join Date: Jul 2012
Posts: 4
Installing database after moving to new host

Hi,

I am a complete novice at PHP and mysql so I'd really appreciate your help.

I have moved my website to a new hosting company and need to install the .mysql database file using phpmyadmin.

New database details:
Database name : db424388701
Host name : db424388701.db.1and1.com
User name : dbo424388701


This is what it says when I try to install via phpmyadmin...

SQL query:

-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- phpMyAdmin
--
-- Host: localhost:3306
-- Generation Time: Jul 17, 2012 at 01:18 PM
-- Server version: 5.1.56
-- PHP Version: 5.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- phpMyAdmin
--
--' at line 1


What do I need to change? Here's the first section of code...

-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- phpMyAdmin
--
-- Host: localhost:3306
-- Generation Time: Jul 17, 2012 at 01:18 PM
-- Server version: 5.1.56
-- PHP Version: 5.3.10

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: `opencart_5`
--
CREATE DATABASE `dbo424388701` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `dbo424388701`;

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


Please let me know the best way I can find the solution I need to install the database.

Thank you,
Matthew
Reply With Quote
  #2 (permalink)  
Old 07-19-12, 10:33
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
try removing all lines with '--' in the first 2 characters
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Tags
mysql, mysql database

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On