PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 9th, 2000, 12:30 PM
rainmaker rainmaker is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 23 rainmaker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hey, all... I'm having a bit of a problem, in that I have a text document (update.txt) on my local drive, and while using phpmyadmin, I need to update the nec. tables.

I keeping getting an error with phpmyadmin that states:
'Error
MySQL said: File 'php2' not found (Errcode: 2)'

I don't know what this error is, and I really need the ability to remotely update the databse... I'm running mysql and php on a backoffice server. right now I go to the server and use:
mysql DBNAME < TABLENAME.txt
to import the data... Soon, I will need to do this remotely... Please let me hear your ideas as to the strange error message. Perhaps I'm using phpmyadmin incorrectly?

Thanks!
rainmaker



------------------
Everyone want's to be a rock star.... I just want the money.

Reply With Quote
  #2  
Old May 9th, 2000, 12:38 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
phpMyAdmin, AFAIK, does not support uploading a local schema file to the remote db. The only way you could do this via MyAdmin is to copy and paste the contents of the file to the "Run SQL query/queries..." text box.

You could also do this the traditional way and upload the file to the server and use the command line.

Reply With Quote
  #3  
Old May 9th, 2000, 02:16 PM
rainmaker rainmaker is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 23 rainmaker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHPmyAdmin specifically has an option entitled: Insert textfiles into table

My text file looks like:

********************************************
INSERT INTO phone_table
VALUES (
NULL,
2,
'Jones',
'John',
'Micro Spec.',
'jones@texasU.edu',
'443-4567',
'443-4448',
'443-3456',
NULL );
********************************************

When you select this option, you are asked to fulfill these options:

Location of text file:
Fields terminated by:
Fields enclosed by:
Fields escaped by:
Lines terminated by:

as well as a few others that are yes/no questions.

I would be fine with uploading and doing it from the command line, however, I can't telnet to this box; so that, I can't do.

Besides, updating tables via a text doc and a browser is something I would like to know how to do. I was planning on getting this to work, then view the phpmyadmin source and insert it into my own, custom project.

Thanks for everyone's replies.
rainmaker


------------------
Everyone want's to be a rock star.... I just want the money.

Reply With Quote
  #4  
Old May 10th, 2000, 10:58 AM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
rainmaker-

It looks to me like there is not a problem with MySQL or phpMyAdmin, but rather with the file upload configuration of your webserver. In order for phpMyAdmin to allow you to browse your local drive and choose a file for MySQL, the web server has to then save that file to a temporary location, which MySQL then reads. (thus the 'File not found' message)

Check up on how IIS4 supports the File Upload form element. (I am more familiar with Apache, sorry)

Also, this might simply be a bug with phpMyAdmin/NT. phpMyAdmin was originally written with Unix in mind, and it might have a problem with the Windows '' directory naming convention. (notice the 'php2' in the error message) You might check for the latest version of phpMyAdmin, or ask the creators if this is a bug.

Good luck

Reply With Quote
  #5  
Old May 10th, 2000, 04:22 PM
aarongb aarongb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 60 aarongb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
I think you mut be using this on Win32. I have the same issue on three installs on Win32 (98/NT), but it works fine on Linux. phpMyAdmin was definitely written for 'nixes. Also, there are some issues with PHP4RC1/RC2 and phpMyAdmin 2.0.5. return statements from a "require()" need to be changed to "include()".

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > update mysql with text file from phpmyAdmin

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap