LOAD DATA INFILE

2004-07-22 Thread Phil Ewington - 43 Plc
Hi All,

Tearing my hair out with this one! I am trying to load data from a text file
from the command line, this is the syntax...

LOAD DATA INFILE 'users_1.csv' INTO TABLE 'ma0133' FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\r\n';

The error I get is...

ERROR 1049: Unknown database '\n''
ERROR:
Can't connect to the server

Hmm, I accessed the server using...

mysql -u root -p databasename

What am I doing wrong here?

TIA

Phil.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 19/07/2004


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



RE: LOAD DATA INFILE

2004-07-22 Thread Phil Ewington - 43 Plc
Resolved, used this syntax...

LOAD DATA INFILE '/path/from/root/to/file.csv' INTO TABLE ma0133 FIELDS
TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' ESCAPED BY '\\' LINES
TERMINATED BY '\r\n'


- Phil. 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 19/07/2004


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



Access denied for user: 'root@localhost'

2004-05-05 Thread Phil Ewington - 43 Plc
Hi All,

I have just installed mysql-4.0.18 on my cobalt RaQ4 and for the first time
seemed to actually got somewhere! however, my existing PHP scripts failed to
connect to localhost as the password has not been set after the install. I
ran the following command (obviously seriously misunderstood the docs)

mysqladmin -u root password new-password

I thought the above syntax would ask me for the password but it didn't now
all commands return

'Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)'

How do I actually set a password, and more importantly, how do I reset the
password for root, and what did I do? Any help will be greatly appreciated.

TIA

Phil.


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



Installing MySQL-3.23.54-1 pkg on RaQ4i

2004-04-15 Thread Phil Ewington - 43 Plc
Hi All,

I am trying to install MySQL-3.23.54-1 pkg on a RaQ4i (from pgkmaster.com),
which is something I have done on numerous occasions without problem.
However, this RaQ for some reason does not have /tmp/mysql.sock installed
when the package is installed. When I uninstall the pkg, the script warns
that /tmp/mysql.sock could not be removed as it does not exist. I have
installed the pkg and uninstalled and each time the same thing, no
/tmp/mysql.sock!! Can I simply copy this from one of my other servers into
/home/mysql and then create a sym link to it in /tmp??

Any assistance will be greatly appreciated.

TIA

Phil.


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



Cannot Connect to Server

2003-09-01 Thread Phil Ewington - 43 Plc
Hi All,

Having problems with connecting to mysql server as we have had to change all
the IP addresses on the server. I am assuming that localhost is the problem,
how can I manually change localhost to be an IP address?

The error message is:
Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/tmp/mysql.sock' (111) in /home/sites/.. on line 3
Unable to select database

TIA

Phil.


Phil Ewington - Technical Director
--
43 Plc
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)118 978 9500
F: +44 (0)118 978 4994
E: mailto:[EMAIL PROTECTED]
W: http://www.43plc.com



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



RE: Cannot Connect to Server

2003-09-01 Thread Phil Ewington - 43 Plc
Could not read response from last sender :o(



-Original Message-
From: Phil Ewington - 43 Plc [mailto:[EMAIL PROTECTED]
Sent: 01 September 2003 11:35
To: Mysql
Subject: Cannot Connect to Server


Hi All,

Having problems with connecting to mysql server as we have had to change all
the IP addresses on the server. I am assuming that localhost is the problem,
how can I manually change localhost to be an IP address?

The error message is:
Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/tmp/mysql.sock' (111) in /home/sites/.. on line 3
Unable to select database

TIA

Phil.


Phil Ewington - Technical Director
--
43 Plc
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)118 978 9500
F: +44 (0)118 978 4994
E: mailto:[EMAIL PROTECTED]
W: http://www.43plc.com



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



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



Functions as default values

2003-08-07 Thread Phil Ewington - 43 Plc
Hi All,

I am trying to use a function as a default value for a column but do not
seem to get the desired result. I want to use the NOW() function for a
last_updated column, here is my code...

CREATE TABLE test_table (
  last_updated datetime NOT NULL default `NOW()`
) TYPE=MyISAM;

This gives an error;

CREATE TABLE test_table (
  last_updated datetime NOT NULL default 'NOW()'
) TYPE=MyISAM;

Now the table shows a default value of -00-00 00:00:00, when I add a new
row the value of last_updated is also -00-00 00:00:00. I am using MySQL
3.23.37, can anyone help?

TIA


Phil Ewington - Technical Director
--
43 Plc
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)118 978 9500
F: +44 (0)118 978 4994
E: mailto:[EMAIL PROTECTED]
W: http://www.43plc.com



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



RE: Functions as default values

2003-08-06 Thread Phil Ewington - 43 Plc
No functions as default values is a bummer, but timestamp will do he trick,
so thanks for your help; much appreciated.


Phil.

-Original Message-
From: Cybot [mailto:[EMAIL PROTECTED]
Sent: 06 August 2003 15:37
To: [EMAIL PROTECTED]
Subject: Re: Functions as default values


 I am trying to use a function as a default value for a column but do not
 seem to get the desired result. I want to use the NOW() function for a
 last_updated column, here is my code...

 CREATE TABLE test_table (
   last_updated datetime NOT NULL default `NOW()`
 ) TYPE=MyISAM;

 This gives an error;

 CREATE TABLE test_table (
   last_updated datetime NOT NULL default 'NOW()'
 ) TYPE=MyISAM;

 Now the table shows a default value of -00-00 00:00:00, when I add a
new
 row the value of last_updated is also -00-00 00:00:00. I am using
MySQL
 3.23.37, can anyone help?

funcion as default-value is not allowed AFAIK

but timestamp will help you to get what you want!
http://www.mysql.com/doc/en/DATETIME.html


--
Sebastian Mendel

www.sebastianmendel.de
www.tekkno4u.de
www.nofetish.com


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




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