Problems with MYSQL

This is a discussion on "Problems with MYSQL" within the Databases section. This forum, and the thread "Problems with MYSQL are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old May 4th, 2006, 16:19
New Member
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Problems with MYSQL

Hi all,

I have a flatfile database that has 6 fields, each field is seperated by the ; symbol. I have tried to upload this in to a table whithin phpMyAdmin - version 2.80.3 on a server run by my host.

The format of the fields for the database are like this:

mixtape_ID;mixtape_DJ;mixtape_MC;mixtape_Event;mix tape_Date;mixtape_Style

I get this error:

Invalid parameter for CSV import: Fields enclosed by

Is there a way of getting around this problem? can i change some settings within the phpmyadmin? I have tried to change the Fields enclosed by text box with nothing but this doesn't work, it used to work but for some reason doesn't anymore... I hope i don't have to enclose each value with an enclosed by value...

Any help would be greatly appreciated...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 4th, 2006, 17:26
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

I don't use phpMyAdmin so I don't know what your options are, but...

The first thing you need to try is to change all the ; seperators for , (commas).

CSV does stand for Comma Seperated Value after all.

You might also like to consider using, what I consider to be, a far superior tool.

SQLyog, available form: http://www.webyog.com

They do a free version as well as two paid for versions.

You will have to get your hosting service to grant you external access to your database but any good one should do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 4th, 2006, 17:44
New Member
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

I already have external access to my host, they use phpMyAdmin so there isn't a way i can choose my software... The values can be ; and do not have to be changed to a , as there is a facility with the phpadmin interface that allows me to change this, but it does ask for the data relating to the error i previously posted...

Thanks for your help, i know it can be done with the existing set up as it was working before until the host migrated there servers... it's just finding where the option is and how to implement it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 4th, 2006, 22:04
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

In your first post, it looks like you didn't include all of the error message.

Is there something missing?

It's a while since I had to upload a csv file but there is something nagging away at me that you need to include the seperator after the last field as well but I could be wrong there.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 5th, 2006, 07:59
New Member
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

There are 2 options, import CSV file or import CSV using load data. The Import CSV LOAD DATA give these additional options

Format of imported file CSV

CSV using LOAD DATA

SQL


CSV optionsReplace table data with fileIgnore duplicate rowsFields terminated byFields enclosed byFields escaped byLines terminated byColumn namesAnd the import CSV gives the below options Options for CSV import using LOAD DATAReplace table data with fileIgnore duplicate rowsFields terminated byFields enclosed byFields escaped byLines terminated byColumn namesUse LOCAL keyword SQL optionsThis format has no options



Now i have a different error, great lol... see below... i cannot find anywhere to edit the preferences to change Using Password to "No", i only get this error in the import csv with load data.
Error

SQL query:
LOAD DATA INFILE '/tmp/phpshKPEj' INTO TABLE `mixtapes` FIELDS TERMINATED BY ';'
MySQL said:
#1045 - Access denied for user: 'cdrj1n29t22y@localhost' (Using password: YES)



If i use the import CSV option without the load data facility then i get this error message
Error

Invalid field count in CSV input on line 2.

'1', 'Druid', '', 'Studio Tape', '1992-04-18', 'Oldskool'
Remember my data is structered as follows:


ID;DJ;MC;Eventate;Genre

in line 2 above there is no mc fot the event hence 2 '' together

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 5th, 2006, 09:31
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

Quote:
Originally Posted by rhythm_doctor
SQL query:
LOAD DATA INFILE '/tmp/phpshKPEj' INTO TABLE `mixtapes` FIELDS TERMINATED BY ';'
MySQL said:
#1045 - Access denied for user: 'cdrj1n29t22y@localhost' (Using password: YES)
I have my sql tool running on my own machine and hook up remotely to the server.

In the past, when I've had a message like the one shown, it's because the server is not recognising my right to connect.

Check your database logon data and also if your hosting service has stopped your remote access for some reason, even accidentally.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old May 9th, 2006, 19:37
Up'n'Coming Member
Join Date: Nov 2005
Location: England
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

Quote:
Originally Posted by ukgeoff
It's a while since I had to upload a csv file but there is something nagging away at me that you need to include the seperator after the last field as well but I could be wrong there.
That sounds familiar to me as well. hence why your upload breaks on line 2 because it doesnt know the first line has ended. Have you tried adding a ; to the end of the first line to see if the error moves to line 3?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old May 9th, 2006, 20:18
New Member
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Problems with MYSQL

The thing is it never did this before...

Since the host migrated the bloody servers it messed all my scripts up, i managed to sort the others out but their not using SQL so weren't so much of a problem...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
problems, mysql

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP MySQL ccandeland Databases 3 Nov 17th, 2007 10:19
MySQL ccandeland Databases 3 Sep 3rd, 2007 21:31
Mysql Paul00000001 Databases 7 Sep 13th, 2006 21:48
asp file upload script having problems with MYSQL paulmcn Classic ASP 2 Oct 5th, 2005 18:45
Installing mySQL on Windows XP SP 2 - any know problems? Sqrlgrl Databases 2 Jun 3rd, 2005 21:11


All times are GMT. The time now is 22:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42