SQL Import Error

 
Post new topic   Reply to topic    34SP.com Forum Index // Database Support
View previous topic :: View next topic  
Author Message
Viper93
34SP Newbie
34SP Newbie


Joined: 26 Nov 2009
Posts: 3

PostPosted: Thu Nov 26, 2009 12:18 pm    Post subject: SQL Import Error Reply with quote
Hi, I am having problems importing a database into my site. Here is the error I am getting. I am new to SQL and not understanding what it is saying.

SQL query:
/*!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: `rotarydb_autoforum`
--
CREATE DATABASE `rotarydb_autoforum` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
MySQL said:
#1044 - Access denied for user 'user1'@'%' to database 'rotarydb_autoforum'



The database name I am trying to import to is localhost. I have already imported rotarydb_autophoria.

I am new to SQL's and websites in general. Would you be able to tell me where am I going wrong?


Thanks.

Chris
Back to top
View user's profile Send private message
micr
34SP Newbie
34SP Newbie


Joined: 19 Mar 2006
Posts: 21

PostPosted: Thu Nov 26, 2009 12:33 pm    Post subject: Reply with quote
Hi Chris,

I have been blundering around trying to do slightly similar things and getting 1044 and 1045 errors - access denied.

As far as I understand it at present you have to create the database using the plesk control panel and also create a user for the database.

Then you can run the sql which generates the tables. I have actually just done it in this sequence and transferred the tables from one database to a new one.

there may be better ways of achieveing the same result, but so far I seem stymied in trying to set up new users and permissions to using the plesk control panel facility. Some general pointers from an expert would be welcome here also.
_________________
micr
Back to top
View user's profile Send private message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Thu Nov 26, 2009 6:54 pm    Post subject: Reply with quote
Thats correct - get rid of everthing upto and including the CREATE DATABASE line in your sql file then try the import again.
_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Viper93
34SP Newbie
34SP Newbie


Joined: 26 Nov 2009
Posts: 3

PostPosted: Thu Nov 26, 2009 8:38 pm    Post subject: Reply with quote
Thanks for the conformation, will try it again tomorrow.
Back to top
View user's profile Send private message
Viper93
34SP Newbie
34SP Newbie


Joined: 26 Nov 2009
Posts: 3

PostPosted: Mon Nov 30, 2009 5:24 pm    Post subject: Reply with quote
I get a new error now.

Error
SQL query:
-- phpMyAdmin SQL Dump
-- version 2.11.9.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 12, 2009 at 11:15 AM
-- Server version: 5.0.81
-- PHP Version: 5.2.9
--
-- Database: `rotarydb_autoforum`
--
USE `rotarydb_autoforum` ;
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 '

USE `rotarydb_autoforum`' at line 1
Back to top
View user's profile Send private message
Post new topic   Reply to topic    34SP.com Forum Index // Database Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group