RE: Abt Mysqldump

2003-09-02 Thread Matthew Smith
re listed in my.ini (in clear which is odd) When I use the password in conjunction with the user I get an error that says access denied with password YES or sometimes with password NO. Any clues? Thanks for the help Albert Atlanta - Original Message - From: "Matthew Smith&qu

RE: Abt Mysqldump

2003-09-02 Thread Matthew Smith
Hi The only problem I get with mysqldump is that if I have used a reserved word as a column name, then the create starement fails. (eg CREATE TABLE fred ( KEY int(10) not null default '0' ); will fail (but as produced by mysqldump) However, if you edit the file and put ` character

RE: Regex and email

2003-09-01 Thread Matthew Smith
Hi, Not sure about php syntax, but check out the perl module (in CPAN) Email::Valid. Here is the code fragment for the regex: # Regular expression built using Jeffrey Friedl's example in # _Mastering Regular Expressions_ (http://www.ora.com/catalog/regexp/). $RFC822PAT = <<'EOF'; [\040\t]*(?:\(

RE: impossible to start mysql

2003-07-24 Thread Matthew Smith
Does the user you wish to run mysqld as have owner read write to /var/lib/mysql and its sub directories? (if you are not sure what I mean, can we see your my.cnf file and do a 'ls -la /var/lib/mysql') Matthew -Original Message- From: antoine druon [mailto:[EMAIL PROTECTED] Sent: 24 July

RE: CSV Formated output

2003-07-03 Thread Matthew Smith
Don't forget ouput with spaces/tabs/quotes etc... The more adventurous solution use perl use DBI use DBD:CSV(or Text::CSV_XS) use DBD:mysql then just take the output of the select and insert into the CSV Matthew On Thu, 3 Jul 2003, Jeff McKeon wrote: > Is there a way to output the

RE: Odd thing

2003-06-19 Thread Matthew Smith
Hi, are you using MSDOS/Windows anywhere here - it might be a trailing ^M which Windows uses before ^J as the end of line character. Regards Matthew -Original Message- From: Christensen, Dave [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 15:50 To: 'Jay Blanchard'; '[EMAIL PROTECTED]' Cc:

RE: wierd sort query, how do you do it? (sort by ip proximity guess)

2003-06-19 Thread Matthew Smith
Hi, If you convert the IP address into integers, then do an xor (exclusive or), you could call the resultant value the approximate 'distance' between the values. (think of the IP address in binary, any identical bits will result in 0, any differing will be 1. This means that the most significant

Re: Accessing last_insert_id problem.

2003-01-02 Thread Matthew Smith
st archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > -- Matthew Smith Nominet UK

RE: query requiring two results from one table?

2002-12-30 Thread Matthew Smith
Hi, Your query will need to look like: select G.datetime, A.name, B.name from Games as G, Teams as A, Teams as B where A.teamid = G.homeid and B.teamid = G.awayid and G.datetime < ? and G.datetime > ? order by G.datetime would be a good place to start Regards M -O

RE: one mysql-test issue

2002-11-19 Thread Matthew Smith
Does it have write permissions for the user running the tests? M -Original Message- From: Yu, Jerry [mailto:[EMAIL PROTECTED]] Sent: 19 November 2002 08:03 To: Matthew Smith; Yu, Jerry; [EMAIL PROTECTED] Subject: RE: one mysql-test issue Sure, the directory exists. :) Rgds --Jerry

RE: one mysql-test issue

2002-11-18 Thread Matthew Smith
Does the directory /usr/local/mysql/var/run exist? If not, try creating it! Regards Matthew Smith -Original Message- From: Yu, Jerry [mailto:[EMAIL PROTECTED]] Sent: 19 November 2002 07:41 To: [EMAIL PROTECTED] Subject: one mysql-test issue > Hi,all > I built the mysql-4.0.

RE: Insert default Date

2002-10-15 Thread Matthew Smith
In Mysql (http://www.mysql.com/doc/en/Date_and_time_functions.html) funnily enough: NOW() orSYSDATE() will return what you want. Regards M -Original Message- From: Arthur [mailto:[EMAIL PROTECTED]] Sent: 15 October 2002 12:56 To: MYSQL Subject: Insert default Date Hello

Re: Math Computations

2002-07-11 Thread Matthew Smith
punctuation before inserting it into a database. Example in Perl: $mynumber =~ s/.//g; $mynumber =~ s/,//g; Cheers M -- Matthew Smith | _ ASCII Ribbon Campaign IT Consultant | ( ) - No HTML/RTF in e-mail Kadina, South Australia | X - No Microsoft docs in e-mail http://

RE: mysql daemon

2002-06-27 Thread Matthew Smith
ps ax | head -1 PID TT STAT TIME COMMAND from 'man ps' TT is the controlling terminal. a ?? in the TT column means that it is not controlled by a terminal. Daemons and some background processes detach from terminals. This is normal and to be expected for mysqld and other daemons started

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Matthew Smith
y we want sub-selects in MySQL 4!) 3) Pop each value from the array and use it as the criterion to select all the details that you want from the artists table - what comes back is your final results. So, yes, what you've done looks right. Only one way to find out ;-) Cheers Mat

Re: Encrpt/Decrypt

2002-04-17 Thread Matthew Smith
cryption. This is how stuff is done in the world of Unix (and its clones) and others. Authentication is done by taking the password provided, encrypting it, then comparing against the encrypted key in the database. Cheers M -- Matthew Smith | _ ASCII Ribbon Campaign IT Co

Re: [MANY to MANY] relationship with MySQL ???

2002-04-17 Thread Matthew Smith
know if not clear. It works for me... Cheers Matthew Smith Robbie Newton wrote: > Hello all, > > [~~I guess I could do something like MySQL>select FROM "Songs" where > "artists" contains $currentArtist~~] > > I have a sampling section on a site tha

Replication Oddity

2002-04-17 Thread Matthew Smith
een tested in char and text fields on two different tables. Sufficient to say, this all worked fine when I tried it out in the lab (two machines on same LAN). Has anyone seen anything like this before, or can they give me any pointers as to what might be happening? Cheers M -- Mat

RE: Platforms for MYSQL

2002-04-17 Thread Matthew Smith
MySQL (server) will run on Win9X, WinNt and later platforms. I use it with Delphi on my Win98 laptop and on my Win2K desktop. You will need TCP/IP for your peer to peer network. Much better than Paradox M -Original Message- From: Colin Rooke [mailto:[EMAIL PROTECTED]] Sent: 17 A

RE: How to store an Image on MySQL

2002-02-28 Thread Matthew Smith
Check the archives, it has been covered reacently, but assuming something like perl: $sql=qq{ insert into some_table (some_blob) values ( ?) }; $sth=$dbh->prepare($sql); $sth->execute( $my_blob); Regards M -Original Message- From: Hector Rosas [mailto:[EMAIL PROTECTED]]

RE: How does one put images into a MySql database

2002-01-22 Thread Matthew Smith
This is an OK solution for a small number of images. Most filesystems (unix/linux et al included) have a severe time penalty in opening a known file in a folder when the folder contains many files. So while easier to hold a reference to a file (filename) it will become slower when your number of

RE: Password reset.

2002-01-07 Thread Matthew Smith
Initially you will have had no password, so setting root's password to 'test1' would be done with: mysqladmin -u root password test1 To change this password to test2 use: mysqladmin -u root -ptest1 password test2 Regards M -Original Message- From: Matthew Darcy [mailto:[EMAIL PRO

RE: creating users ??? I must be blind.

2002-01-07 Thread Matthew Smith
look for 'GRANT SYNTAX' in the manual. Regards M -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 13:16 To: MySql List Subject: creating users ??? I must be blind. Hi, the manual referes to creating users using mysqladmin and mysqlaccess, I have

RE: Column Names

2002-01-07 Thread Matthew Smith
What would SELECT 42 FROM SOME_TABLE return? column name 42 or the numerical value 42 ? M -Original Message- From: Sparta Cruz [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 08:23 To: MySQL Subject: Column Names MySQL's Documentation: A name may start with any character that i

RE: Select with dbi perl??? Help please!

2002-01-06 Thread Matthew Smith
I would suggest turning logging on ('log' entry in my.cnf under mysqld) do a search and look to see what the actual SELECT parsed by the mysqld server was. My hunch is that it is only seeing '%' and not '123456789123%' as expected. OK, so I now look at your code. It will be looking for '$input{

RE: Problems With New Installation

2001-12-24 Thread Matthew Smith
Is the mysqld daemon set to run as root? do either ps -auxw | grep mysql or ps -ef | grep mysql and see what mysqld is running as. You can set the server to run as a particular user regardless of what the file ownership of mysqld is. Also, have you installed the mysql database with mysql_in

RE: Perl Problem!

2001-12-24 Thread Matthew Smith
If you are doing lots of similar sql statements, you could use the following instead: --- start my $dbh = DBI->connect("DBI:mysql:database=prepaid;host=localhost", "root", "sascha28", {'RaiseError' => 1}); my $sql=qq{ INSERT INTO pins (pin, msis

RE: hostname.pid

2001-12-23 Thread Matthew Smith
The option --pid-file=/var2/db can be used for mysqld In my.cnf use pid-file=/var2/db Matthew -Original Message- From: Jacob Friis Larsen [mailto:[EMAIL PROTECTED]] Sent: 23 December 2001 15:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Mysql maillist Subject: RE: hostname.pid Thank

RE: hostname.pid

2001-12-23 Thread Matthew Smith
Does the unix user who wunns mysqld have write permissions to /var/local/var (and does it exist?) M -Original Message- From: Jacob Friis Larsen [mailto:[EMAIL PROTECTED]] Sent: 23 December 2001 15:09 To: Mysql maillist Subject: hostname.pid How do I correct this database problem ? Plea

RE: Problems in Foreign Key Syntax

2001-12-23 Thread Matthew Smith
I do not see this as a feature(documented bug). It is a handy implementation method for potentially saving storage space. Not all database designers (people who design databases as opposed to those who have a qualification to do so) understand the meaning of the various types. One database I ha

RE: mysqldump - basic question

2001-12-20 Thread Matthew Smith
You could use one of: 1. .my.cnf with a password set for the client 2. use -p on the command line Depends on how secure you want it - use the appropriate grant for the user. M -Original Message- From: ROry O'Connor [mailto:[EMAIL PROTECTED]] Sent: 20 December 2001 09:36 To: [EMAIL PRO

RE: Changing the locations of the tables

2001-12-18 Thread Matthew Smith
ensure that the account that the mysqld is running under has the proper permissions to the new directory. I ran into that one before.. - Original Message - From: "Matthew Smith" <[EMAIL PROTECTED]> To: "'MySQL'" <[EMAIL PROTECTED]> Sent: Tues

RE: Changing the locations of the tables

2001-12-18 Thread Matthew Smith
I think the key was _without_ reinstalling. I emailed this privately first, but should work with minimum downtime and preserve data: mysqladmin -u . shutdown su cd /var/lib tar -cf - mysql | (cd /usr/lib ; tar xvBpf -) rm -rf mysql vi /etc/my.cnf :%s/\/var\/lib\/mysql/\/usr\/lib\/mysql/g :x

RE: ERROR 1006: Can't create database 'mynewdb'. (errno: 28)

2001-12-18 Thread Matthew Smith
What does df show? -Original Message- From: John Lepone [mailto:[EMAIL PROTECTED]] Sent: 17 December 2001 20:41 To: '[EMAIL PROTECTED]' Subject: Re: ERROR 1006: Can't create database 'mynewdb'. (errno: 28) I don't think I'm out of room on the volume. Below is the directory listing: -r

RE: timestamp additional info

2001-12-14 Thread Matthew Smith
mysql> CREATE TABLE tblTEST ( -> KeyValue int(10) NOT NULL default 0, -> DataValue varchar(255) default NULL, -> LastEdited timestamp(14) NOT NULL, -> PRIMARY KEY (KeyValue) -> ); mysql> insert into tblTEST (KeyValue, DataValue) values( 1, 'Hello'); Query OK, 1 row affect

RE: sequence and nextval

2001-12-13 Thread Matthew Smith
the SELECT LAST_INSERT_ID() gets the last autoincremented number for the current connection. See http://www.mysql.com/doc/G/e/Getting_unique_ID.html The auto_incremenet field is sadly lacking in Oracle (IMHO). M -Original Message- From: Henrik Erlandsson [mailto:[EMAIL PROTECTED]] Sen

RE: 4 G table limit?

2001-12-13 Thread Matthew Smith
Do you compress the data? I use perl and Compress::Zlib::memGzip to keep size down. Also, you could split into months by something like: oA column MESSAGE_DATE set on insertion oa cron script run once a month to: o create another table for the month to be archived o INSERT IN