Click to See Complete Forum and Search --> : Transferring to Host SQL Database from Localhost?


ne_plus_ultra
11-06-2007, 05:36 PM
I recently finalized my database using WAMPserver and MySQL query browser. I would like to take that database and transfer it (upload) to my host's secure SQL database. However here is the tricky question.

I set a password for root access in MySQL query browser. I go into Wampserver to access myPHPadmin and I receive this error.

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

So, logically I go back to MySQL Query Browser and attempt to take the password off of the root user and it doesn't give me that option. How can I get back into myPHPadmin so I can download the sql files and transfer my database? Any thoughts?

chazzy
11-07-2007, 06:54 AM
It sounds like your PhpMyAdmin is setup incorrectly. There should be a configuration file (sorry i forget where :-() that contains the root information. Try checking it there.

If you can't find it, you can run this statement on the mysql.user table.


UPDATE mysql.user SET Password = NULL where User='root';


But I would really not recommend the second option.

ne_plus_ultra
11-07-2007, 10:56 AM
It sounds like your PhpMyAdmin is setup incorrectly. There should be a configuration file (sorry i forget where :-() that contains the root information. Try checking it there.

If you can't find it, you can run this statement on the mysql.user table.


UPDATE mysql.user SET Password = NULL where User='root';


But I would really not recommend the second option.

Thanks. That was very helpful. For some reason now a second issue has popped up. :) Go figure. I am not sure how to fix this?

I recently attempted to load my database from my localhost (Server version:
5.0.45-community-nt) into my 1and1.com secure sql database 5.0 and the
following error is given:


#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
'"countries" (
"CountryID" int(10) NOT NULL auto_increment,
"CountryName" var' at line 20


Detail on Error:

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.11.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 06, 2007 at 08:36 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.4
--
-- Database: `blue_sky_music`
--
-- --------------------------------------------------------
--
-- Table structure for table `countries`
--
CREATE TABLE "countries"(
"CountryID"int( 10 ) NOT NULL AUTO_INCREMENT ,
"CountryName"varchar( 50 ) default NULL ,
"CountryAbbrev"varchar( 50 ) default NULL ,
PRIMARY KEY ( "CountryID" ) ,
KEY "CountryID"( "CountryID" )
) AUTO_INCREMENT =8

MySQL said: Documentation
#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
'"countries" (
"CountryID" int(10) NOT NULL auto_increment,
"CountryName" var' at line 20

chazzy
11-07-2007, 07:14 PM
This seems to work flawlessly


CREATE TABLE countries(
CountryID int( 10 ) NOT NULL AUTO_INCREMENT ,
CountryName varchar( 50 ) default NULL ,
CountryAbbrev varchar( 50 ) default NULL ,
PRIMARY KEY ( CountryID ) ,
KEY CountryID( CountryID )
) AUTO_INCREMENT =8