LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2004, 03:39 PM   #1
nepcw
Member
 
Registered: Mar 2004
Posts: 81

Rep: Reputation: 15
Mysql importing problem


i have just switched from one hosting company to my own dedicated server and i had a forum on the old server that used a mysql dB.
Now i have exported the db to a .sql file and im using my test server to test this out.
I ahve installed the forums on the new server, started up a new dB and it is working fine.
What i want to do now is upload the old .sql file into it. I never had a problem before using the phpmyadmin tookl but now it times out.
So i figured i would upload the file to the server and run the mysql command.
I uploaded it but when i run the command it doesnt find the uploaded file.
my question is , what folder do i need to upload this .sql file to in order for mysql to see it when i run the command?
I am su to root
The command im running is mysql -u username -ppassword newdbname <new.sql file;
Is this right? it appears to want to work but tells me :
su: ivbd.sql: No such file or directory

I just logged onto my ftp onto the root account and dropped it in that folder, is that wrong?
 
Old 03-22-2004, 03:45 PM   #2
nepcw
Member
 
Registered: Mar 2004
Posts: 81

Original Poster
Rep: Reputation: 15
ok so now im getting a error:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
 
Old 03-22-2004, 04:08 PM   #3
nepcw
Member
 
Registered: Mar 2004
Posts: 81

Original Poster
Rep: Reputation: 15
i changed the password im all set with above error but im still having the problems with importing
 
Old 03-22-2004, 04:45 PM   #4
jsokko
Member
 
Registered: Mar 2004
Location: Phila, PA
Distribution: SuSE 9.0 / RH 9 / Slackware 9.1
Posts: 110

Rep: Reputation: 15
How did you export out your DB in MySQL? did you include all INSERTs? If you did, you need to take these steps via MySQL CLI:

1. login AS root or user with all SUPER priv into MySQL
2. create empty DB
3. type (without single quotes) 'use [NEW DB NAME];'
4. run this command : (without single quotes or brackets) '\. [file/full/path/here/][FILENAME].sql;'
5. grant the appropriate user ID its priv to read / write to new DB
6. Test connection

you should be set after that.


J
 
Old 03-22-2004, 05:09 PM   #5
nepcw
Member
 
Registered: Mar 2004
Posts: 81

Original Poster
Rep: Reputation: 15
yah it worked after i cahnge the password. Thank you all for your help!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem importing database back to MySql shubb Programming 3 11-29-2005 01:36 PM
Shell scripting problem for importing Firefox files montylee Programming 6 06-03-2005 01:52 AM
mysql importing inq Robin01 Linux - Newbie 1 11-30-2003 09:12 AM
MySQL: Importing a database from an XML file concoran General 0 09-08-2003 02:58 AM
Importing FreeBSD mysql database to RedHat Linux 7.3 RKris Linux - Software 6 05-06-2003 04:07 AM


All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration