MySQL Error#: 2002

2013-03-18 Thread Patrice Olivier-Wilson
I have about 60 websites based on mysql and php. Suddenly they have all gone 
blank, just white pages. The files are still on the server and I can see the 
tables in all the databases via myphpadmin interfact. I'm not getting any 
response from hosting gods yet. When I try to connect to server via 
Dreamweaver, the error message is:  MySQL Error#: 2002
Can't connect to local MySQL server through socket 
'/var/lib/myswl/mysql.sock'(111).

I have one site that uses a different IP number that that site is ok. My static 
sites, ie, no database inclusion, are ok.

Any ideas what to look for, most appreciated.

Regards,

Patrice Olivier-Wilson
828-628-0500
http://Biz-comm.com
b...@biz-comm.com


Everything will be alright in the end, so if it is not alright, it is not yet 
the end. - Quote from movie: The Best Exotic Marigold Hotel


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



List archive?

2010-12-14 Thread Patrice Olivier-Wilson
I have a question that this list solved a year ago, and I can't remember 
what the solution was. Does this list have an archive?


(Sorry if it is on one of the links to the list, but I don't have any on 
hand at the moment.)

--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: List archive?

2010-12-14 Thread Patrice Olivier-Wilson

On 12/14/10 12:51 PM, Patrice Olivier-Wilson wrote:

I have a question that this list solved a year ago, and I can't remember
what the solution was. Does this list have an archive?

(Sorry if it is on one of the links to the list, but I don't have any on
hand at the moment.)


see  it on the bottom of my post... thanks and sorry for noise

--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Not to show until a certain date

2010-09-29 Thread Patrice Olivier-Wilson

On 9/28/10 8:33 PM, Chris W wrote:



SELECT *
FROM announcements
WHERE announcements_expiredate  CURDATE()
AND announcements_postdate = CURDATE()
ORDER BY announcements_expiredate ASC



Thank you!
--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Not to show until a certain date

2010-09-28 Thread Patrice Olivier-Wilson

Hi... beginner here. Working on a php page and using this



$query_announcements = SELECT * FROM announcements WHERE 
announcements.announcements_expiredate CURDATE() ORDER BY 
announcements_expiredate ASC ;



Client now wants the announcement NOT to show until a specific date.

I have an announcements_postdate in the table. Just not sure what the 
WHERE should be to not show until that date.


Thanks much,



--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Not to show until a certain date

2010-09-28 Thread Patrice Olivier-Wilson

On 9/28/10 10:52 AM, Patrice Olivier-Wilson wrote:

Hi... beginner here. Working on a php page and using this



$query_announcements = SELECT * FROM announcements WHERE
announcements.announcements_expiredate CURDATE() ORDER BY
announcements_expiredate ASC ;


Client now wants the announcement NOT to show until a specific date.

I have an announcements_postdate in the table. Just not sure what the
WHERE should be to not show until that date.

Thanks much,




Figured it out

SELECT *
FROM announcements
WHERE announcements.announcements_expiredate CURDATE() AND 
announcements.announcements_postdateCURDATE()

ORDER BY announcements_expiredate ASC

thx


--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: newbie question database tables

2010-09-11 Thread Patrice Olivier-Wilson



Thanks all... I got this to work! Much appreciated..

And thanks for patience with a newbie!

--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



newbie question database tables

2010-09-10 Thread Patrice Olivier-Wilson
I'm working on a database that needs to do a few things and getting 
brain freeze on one part.


Scenario:


I want to compile a db of articles with these tables:

Categories
Topics
Users

Categories


cat_ID | cat_name


Topics

top_ID | top_name  | top_content | cat_ID


Users

user_ID | user_name | top_ID
or
user_ID | user_name | top_ID | top_IDb | top_IDc etc

(output to web page using php)

But I need to show which users are using which topics, and I can add 
top_ID to the user file, which is fine if they are only using one topic.


I could add 5 different topic to each user, but then I couldn't expand 
later.


Reverse is true if I add user_ID to the Topics.

So, need an idea how to solve this so it doesn't matter how many new 
users I keep adding, I can still see who is using the topics.


As I said, a newbie question. Thanks much.
--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: newbie question database tables

2010-09-10 Thread Patrice Olivier-Wilson

On 9/10/10 12:31 PM, Jerry Schwartz wrote:

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341
E-mail: je...@gii.co.jp
Web site: www.the-infoshop.com



Thank you!

--
Patrice Olivier-Wilson
http://biz-comm.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Importing table contents

2010-01-02 Thread Patrice Olivier-Wilson
I have 2 databases, different domains. Both have a table named 'tips'... 
both have different contents in the table.

Using phpMyAdmin for GUI.

I want to export databaseA tips as sql (done) then import content into 
databaseB tips. But when I run that operation, the databaseB says that 
there is already a table named tips in databaseB.


Yep, know that... I want to bring in the contents...not make a new table.

Any help, most appreciated

Thanks as always

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Importing table contents

2010-01-02 Thread Patrice Olivier-Wilson

Gary Smith wrote:

Patrice Olivier-Wilson wrote:
I have 2 databases, different domains. Both have a table named 
'tips'... both have different contents in the table.

Using phpMyAdmin for GUI.

I want to export databaseA tips as sql (done) then import content 
into databaseB tips. But when I run that operation, the databaseB 
says that there is already a table named tips in databaseB.


Yep, know that... I want to bring in the contents...not make a new 
table.


Any help, most appreciated
When you export, PHPMyAdmin has the option to add drop table. This 
will drop the existing table structure and create a new one as it was 
when it was exported. Is this what you're after?


Gary


I have data I need to keep in both db just trying to merge.



--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Importing table contents

2010-01-02 Thread Patrice Olivier-Wilson

Gary Smith wrote:

Patrice Olivier-Wilson wrote:

I have data I need to keep in both db just trying to merge.

There's two ways around this:

First is to not export the structure (uncheck structure). The second 
is to export with if not exists. This should (IIRC) do a create 
table if not exists, so it'll do what you're wanting to do.


Do you have any primary keys/auto increment columns that are going to 
overlap or anything like that?


Cheers,

Gary


Gave it a try got this:
MySQL said:

#1062 - Duplicate entry '1' for key 1

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Importing table contents

2010-01-02 Thread Patrice Olivier-Wilson

Gary Smith wrote:

Patrice Olivier-Wilson wrote:

Gave it a try got this:
MySQL said:

#1062 - Duplicate entry '1' for key 1
Yeah, that's what I was saying about in my previous mail. It looks 
like you've got a primary key on one of your columns, and you're 
attempting to insert data into it with a duplicate primary key (ie 
what the error message says). The easiest way to get around this one 
would be to write a query that pulls all of the columns apart from the 
primary key, and then replace that field with '' or somesuch.


For instance, let's say you've got a schema of the following:

table1(primarykey,column2,column3,column4,column5)

primarykey is obviously a primary key. You'd do something along the 
lines of select '',column2,column3,column4,column5 from table1;


Then export that resultset to an SQL file.

Anyone else aware of an easier way to do this? I've got into some bad 
habits over the years, but I'm not aware of another way to do what 
Patrice is trying to do.


Cheers,

Gary

If I export both db tables into csv, combine and then import back, that 
should do it, methinks...


just create a new table called tips2, merge the 2 into one...

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



inserting csv - solved, but more to the puzzle

2009-10-16 Thread Patrice Olivier-Wilson
In case anyone might find this of the least interest, probably not, but 
I always hope to add to discussion just as part of the thank you for help.


Further work with same issues found that a file received from a PC based 
client, if opened in PC environment, didn't have the same problems (so 
far) as if opened in a Mac environment. The next file I had to work with 
in this particular project, I opened in PC, then uploaded using 
phpMyadmin with no issues. Same client, same type of file.


So, maybe there is a PC/Mac thing happening to cause the line 17, 
missing commas in csv?


Just a thought. If anyone has any insight, most appreciated.

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: inserting csv - solved, but more to the puzzle

2009-10-16 Thread Patrice Olivier-Wilson
Thank you for the confirmation, Andy. I appreciate your patience with 
such a newbie who is just trying to learn.



Andy Wallace wrote:

I've run into similar situations w/regard to Mac vs PC CSV files,
it usually has to do with the EOL character sequence. Macs use
LF (chr(10)), while PCs use CRLF (chr(13)chr(10)).

andy

Patrice Olivier-Wilson wrote:
In case anyone might find this of the least interest, probably not, 
but I always hope to add to discussion just as part of the thank you 
for help.


Further work with same issues found that a file received from a PC 
based client, if opened in PC environment, didn't have the same 
problems (so far) as if opened in a Mac environment. The next file I 
had to work with in this particular project, I opened in PC, then 
uploaded using phpMyadmin with no issues. Same client, same type of 
file.


So, maybe there is a PC/Mac thing happening to cause the line 17, 
missing commas in csv?


Just a thought. If anyone has any insight, most appreciated.






--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Inserting csv

2009-10-15 Thread Patrice Olivier-Wilson

Newbie question, please.

I have a csv file of 950 records, 20 fields.

I used this converter
http://csv2sql.evandavey.com/

and copied/pasted insert code into SQL in phpMyAdmin

and got this error


SQL query:

INSERT INTO membership(  `members_ID` ,  `updated` ,  `notes` ,  
`preferred_mail_street` ,  `preferred_mail_csz` ,  `first_name` ,  
`last_name` ,  `street` ,  `city` ,  `state` ,  `zip` ,  `location_code` 
,  `property` ,  `camp_street` ,  `camp_city` ,  `camp_zip` , 
`member_year` ,  `director` ,  `email` ,  `camp_phone` ,  `20` ,  `21` 
,  `22` ,  `23` )

VALUES (

'',  '',  '',  '',  '',  'xxx',  '',  '102 Summer St',  
'Dover-Foxcroft',  'xx',  '04426',  'B',  'M15_L1_S20',  'Mill Brook',  
'Bowerbank',  '',  '',  '',  '',  '',  '',  '',  '',  ''

);

MySQL said:

#1054 - Unknown column '20' in 'field list'

Actually the first time, it was column 21, so to trouble shoot, I removed that 
column from csv file and field name in phpMyAdmin.


camp_phone should be the last field but 

`20` ,  `21` ,  `22` ,  `23` ) 

is there too... 


Any assistance most appreciated!

I checked the file and didn't see any odd entries after the camp_phone field.





--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



insertng csv - solved

2009-10-15 Thread Patrice Olivier-Wilson

A HUGE thank you to Michael and John.

There were a couple of things going on but I do not know why things 
got the way they were can only assume the client files had some issue.


I pulled the file into text wrangler and removed

,  `20` ,  `21` ,  `22` ,  `23`  etc.

Then counted the number of extra commas for the lines, did a find 
replace and removed them. If there hadn't been so many, that trick would 
have been nearly impossible though.


Then, on a hunch, I removed clients column content for how they had 
entered dates: 1/11/09 type of entry. Just blanked it out.

Tried to import and it stopped at line 17 (again). BUT progress!

So, went back to the converter and entered into SQL on phpmyadmn 
interface... viola! success.



Thank you both so much for your help.

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



csv import issues - good solution found

2009-10-06 Thread Patrice Olivier-Wilson
A week or so ago, I was seeking a solution for breaking lines for 
importing csv to phpmyadmin interface


Found a slick solution:


http://csv2sql.evandavey.com/

create table in database, upload the csv file to above page, copy/paste 
the resulting code into SQL field for the database (not the table) -- 
viola!

:-)
Just thought I'd share in case anyone else might need it...

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Newbie question: importing cvs settings - followup

2009-09-30 Thread Patrice Olivier-Wilson

Thanks again for assistance. FYI, I did track this thread down

http://ask.metafilter.com/57007/Missing-commas-in-CSV-file

(exerpt:
Maybe there is a space or something in the 14th column of the first 15 rows.
posted by. on February 14, 2007


It's a bug in Excel (not something you did wrong.)
posted by . February 14, 2007

)


--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Newbie question: importing cvs settings

2009-09-29 Thread Patrice Olivier-Wilson

Jerry Schwartz wrote:

[JS] This is just a shot in the dark, but Excel can be rather surprising when 
it puts out a CSV file. Depending upon the data, and exactly how you've 
specified the export, it can put double-quotes in unexpected places.


If you leave out the 17th line of data what happens?

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com


  
  

Thanks Jerry, Gavin and John:

Sorry for not an immediate response to all of your suggestions. Other 
demands were pulling at me since I first asked for assistance.



I opened the .csv file with Text Wrangler, and the commas are missing at 
about line 17



portfolio_ID,portfolio_sort_ID,portfolio_title,portfolio_bodycopy,portfolio_image,portfolio_before
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg,
,1,Kitchens,,123.jpg
,1,Kitchens,,123.jpg
,1,Kitchens,,123.jpg

So not sure why that is happening. I'm on a Mac, using Excel 2008. But 
at least you all have helped me find what it is doing, so now, I can at 
least pull into a txt file and make corrections manually.


My thanks to all of you for your help and patience.

(above represents an empty portfolio_ID, a filled in sort_ID, title, 
empty bodycopy, image, empty before)


Thank you.

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Newbie question: importing cvs settings

2009-09-27 Thread Patrice Olivier-Wilson
Back again... I have 192 records to import, and tried my extra line at 
the end hoping for a work around, but nope, it failed at line 17 again.



Invalid field count in CSV input on line 17.

Anyone have an idea why this might be happening?



Patrice Olivier-Wilson wrote:

Yep, typo ...:-(

I did some screen shots of 2 tests. A workaround solution is to make a 
final entry in the csv file that I don't really need. Then everything 
up to that point gets imported ok using CSV method. The LOAD DATA 
method did not enter anything.


My earlier assumption about line 17 was false. It was dependent on how 
many rows, and I had been using tests with same amount of data.

As I said, very beginner level, so thanks for the patience.

screenshots at
http://biz-comm.com/mysqlprojects/

thank you



 






--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Newbie question: importing cvs settings

2009-09-26 Thread Patrice Olivier-Wilson

Greetings:

I have a project for which need to import cvs files into db.

I can do so up to a point. The import will only do 16 lines, 
consistently. Error is failing at line 17.


Steps:

create table fields in Excel document, where they all match database fields
enter information in several of the columns, but not all as client will 
be filling it in online (leaving ID blank)

save excel to .cvs
log into phpMyAdmin
import cvs


I've experimented with several settings in the import, but consistently, 
it fails at line 17, even with different .cvs files.



Any guidance, most appreciated.

--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Newbie question: importing cvs settings

2009-09-26 Thread Patrice Olivier-Wilson

Yep, typo ...:-(

I did some screen shots of 2 tests. A workaround solution is to make a 
final entry in the csv file that I don't really need. Then everything up 
to that point gets imported ok using CSV method. The LOAD DATA method 
did not enter anything.


My earlier assumption about line 17 was false. It was dependent on how 
many rows, and I had been using tests with same amount of data.

As I said, very beginner level, so thanks for the patience.

screenshots at
http://biz-comm.com/mysqlprojects/

thank you

John wrote:

I assume you mean csv not cvs!

What is the error you get when the import fails? What version of MySQL are
you using? Can you post the output of SHOW CREATE TABLE for the table you
are trying to load the file in to and a sample of the csv which is failing
to load?

Do you get the same error if you try and load the files using MySQL client
and the LOAD DATA INFILE command? (See this link for details on how to use
LOAD DATA INFILE http://dev.mysql.com/doc/refman/5.1/en/load-data.html)

Regards

John Daisley
MySQL  Cognos Contractor

Certified MySQL 5 Database Administrator (CMDBA)
Certified MySQL 5 Developer (CMDEV)
IBM Cognos BI Developer

Telephone +44 (0)7812 451238
Email j...@butterflysystems.co.uk

-Original Message-
From: Patrice Olivier-Wilson [mailto:b...@biz-comm.com] 
Sent: 26 September 2009 17:08

To: mysql
Subject: Newbie question: importing cvs settings

Greetings:

I have a project for which need to import cvs files into db.

I can do so up to a point. The import will only do 16 lines, 
consistently. Error is failing at line 17.


Steps:

create table fields in Excel document, where they all match database fields
enter information in several of the columns, but not all as client will 
be filling it in online (leaving ID blank)

save excel to .cvs
log into phpMyAdmin
import cvs


I've experimented with several settings in the import, but consistently, 
it fails at line 17, even with different .cvs files.



Any guidance, most appreciated.

  



--
Patrice Olivier-Wilson
888-385-7217
http://biz-comm.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org