Re: Mysqld

2001-05-03 Thread B. van Ouwerkerk

At 22:00 2-5-01 -0600, Al Green wrote:
When I try to run mysqld I get the following message. How do I rebuild the 
.sock
file. It is not where it should be and the one's that are there are 0 bites
Any suggestions

The size is right. If the .sock can't be found point to the right location 
in your my.cnf

If this doesn't help search this lists archive.. it's really a FAQ.

Bye,

B.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




install into raq4

2001-05-03 Thread LoSiuWong

How can I install mysql into raq4?



Inserting Date Formats ??

2001-05-03 Thread Andy Woolley

Hi,

I have a date in a string like so May 02, 2001 09:15:57 and this date is
not a standard MySQL date and so it wont insert correctly.

My question is this, is there a function to convert the date to something
that MySQL can understand or do I have to convert it manualy?

Thanks in advance.

Andy Woolley.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: tty beeps uncontrollably when hitting CR after mysqld

2001-05-03 Thread Robin Keech

It's just a quick thought, and may not be relevant at all, but ...

If you have a tail on the mysql log file that is doing something with blobs
(binary objects), sometimes the bell character turns up and causes your
system to beep.  It worried me untill I realised what was happening.

May not be much help, sorry.

Robin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 15:18
To: [EMAIL PROTECTED]
Subject: tty beeps uncontrollably when hitting CR after mysqld


Description:
This happens whether launching mysqld directly or safe_mysqld.
Following
the instructions carefully (with the  backgrounder at the end), I
get:

/usr/local/libexec/mysqld: ready for connections

but the prompt does not return. If you then hit ENTER on your
keyboard,
it begins to beep uncontrollably (using Win2K Telnet). Quitting ALL
appli-
cations doesn't even fix it, and Restart will not work. I'm forced
to 
power down my PC or else annoy everyone else in the entire building!

Perhaps the daemon isn't backgrounding properly.
How-To-Repeat:

Fix:
Unknown. I'm hoping it doesn't present problems when I put it into
my startup script.

Submitter-Id:  submitter ID
Originator:Dave Kitabjian
Organization:
 
MySQL support: none 
Synopsis:  
Severity:  unknown
Priority:  
Category:  mysql
Class: sw-bug 
Release:   mysql-3.22.27 (Source distribution)

Environment:

System: FreeBSD ldap1.netcarrier.net 3.5-STABLE FreeBSD 3.5-STABLE #0: Thu
Jul  6 13:30:20 EDT 2000
[EMAIL PROTECTED]:/usr/src/sys/compile/LB1  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: gcc version 2.7.2.3
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock
--with-low-memory --with-mit-threads=yes
Perl: This is perl, version 5.005_03 built for i386-freebsd

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Rolling back of a transaction

2001-05-03 Thread Greg Cope

Sudhir wrote:
 
 Hi,
 
 I am a Sudhir, working as a Software Consultant in Unidux Technologies,
 Singapore.  My job here is to suggest Technology.  Now we are planning to
 purchase license for the application server JRun.  Currently we are
 developing a procurement engine in Java, using MySql as the data base
 server.  As per my database administrator, MySql don't have rolling back
 procedure for a transaction which is not to be committed.  With Oracle or
 MSSqlServer I can commit or rollback a transaction.  I mean I can control
 the transaction whether it has to be committed or rolled back.  Is it true
 that MySql don't have rollback.  We are planning to develop the engine using
 EJB and JTA.  If MySql does not have this rolling back, I fear we can not
 use JTA with MySql as back end.  So please inform me whether I can suggest
 MySql or not for developing the engine using EJB with JTA to my
 organization.
 

RTFM

specifically DBD, Inobase, and Gemini.

It amazes me that people withh start / think about product developement,
without reading the (in this case excellent) manual.

Greg


 Thanks  Best Regards,
 
 Venkata Sudhir Kurapati
 Software Consultant
 64A, Horne Road,
 Singapore - 209072
 DID : +65 - 3914521
 Fax : +65 - 2962651
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re:compatible with oracle

2001-05-03 Thread Heikki Tuuri

Nandana,

MySQL does not currently support stored procedures or triggers.

The solution is to code the logic in the application. If Java allows
the use of interpreted code, you could maybe store some Java procedures
in TEXT fields in your database. Then your applications could fetch
them from the database and execute them locally. In this way you would
at least get some maintenance relief: you do not need to update your
client programs if you change the stored procedures in the server.
Just an idea, though.

Generally, since different databases have different stored procedure
syntax, writing portable stored procedures is hard anyway.

Does anyone know how standardized is Java as a stored procedure language?
I think several databases today allow writing stored procedures also in
Java, in addition to some proprietary language.

Regards,

Heikki Tuuri
Innobase Oy


Hi,

we have some our groupware products,written in java using 3 tier archi.
front end -jsps running on tomcat/apachebissiness logic- ejb running on ias
back end - oraclewe have written some stored procedures,trigers for oracle.
Now we want to use Mysql as the database as well as the oracle.Actually
we want to make the database independent product.
is Mysql support SPs and Trigeers??

if not, what is the solution for
achieving our target with minimal changes..Please reply me soon.Thank you..

nandana dassanayake.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




...IN SHARE MODE will be ...LOCK IN SHARE MODE in 3.23.38

2001-05-03 Thread Heikki Tuuri

Hi!

To resolve a problem in the MySQL parser I decided to change the
syntax of SELECT ... FROM ... WHERE ... IN SHARE MODE so that
an additional word LOCK is added before IN SHARE MODE.
The change will be effective in 3.23.38.

An example:

SELECT * FROM T WHERE A = 5 LOCK IN SHARE MODE;

The benefit of the additional word LOCK is also that it better
conveys the meaning of the clause: the SELECT will lock in share
mode those rows it encounters in calculation of the result set.

The clause ...FOR UPDATE stays as it was before, since it is copied from
the syntax of Oracle.

This change is relevant to users of InnoDB. MyISAM ignores the
SHARE MODE clause.

I apologize the extra work this causes to you, but I assume not too many
users are yet using the SHARE MODE clause.

Regards,

Heikki Tuuri
Innobase Oy


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




[PHP-DB] help - strange error message`

2001-05-03 Thread Marc Bragg

Hi:

Installed redhat 7.0 and had multiple mysql problems, but php4 from the
disc seemed fine. Updated mysql to 3.23.37, now it works fine, but php
gives me:

PHP Warning: Unable to load dynamic library '/usr/lib/php4/mysql.so' -
libmysqlclient.so.9: cannot open shared object file: No such file or
directory in Unknown on line 0

the file mysql.so is present in the php4 directory?

Any ideas what I need to do?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Doubt

2001-05-03 Thread Sreevatsava Varada

Hi,

   I've recently moved from MS-SQL Server 7.0 to mySQL. In MSSQL I used to give the 
default value 'GetDate()' for a field in the database with the datetime datatype. In 
mySQL I tried using Now(). But when I insert a new row the datetime field is taking 
:00:00 00:00:00 value. Please let me know what should I give as the default value 
for 'record_date' field (of datetime datatype) so that it takes the value returned by 
Now() function when a new row is inserted using php script.


Thanks.



Re: GUI client for large SELECT query results

2001-05-03 Thread Sinisa Milivojevic

Andreas Metzner writes:
 Hello all,
 
 I'm using the libmysql.dll API to interface to a mySQL-Server Database.
 The GUI client is generic, so the user can bind any SELECT query on
 a large database (Logging database).
 
 How can I prevent the mySQL client to use mysql_store_result (),
 since this would transfer the whole query result to the client.
 
 With mysql_use_result () I have the problem, that the client do not
 know in front, how many records matched the query.
 
 But if the GUI client user wants to see the last but 30 query result
 records, e.g.,
 I have to know recordnumber of the last matching record.
 
 Does anyone had the same problem, since I guess it's a fundemental one ?!
 
 Thank You in advance.
 
 Andreas Metzner
 MAN Roland AG
 Software Management DICO
 [EMAIL PROTECTED]

Hi!

Solution is quite simple. Use our mysqlgui.

You will find it on our pages.

It can accomodate a result set of 10 Gb in 100 Kb of RAM.

And your user can open as many spreadsheets containing huge result
sets as he / she wishes to, in the same time.


Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Mysql++ API Compilation troubles

2001-05-03 Thread Sinisa Milivojevic

GGreg . writes:
 Hi,
 
 I've installed the mysql++ RPM under my Mandrake 7.2 and it works.
 After that, yhen I'm trying to compile a src file :
 
 
 #include sqlplus.hh
 #include iostream
 #include iomanip
  
 int main() {
  
Connection con(MISDIS,localhost,root,DisMis);
  
Query query = con.query();
  
query  select * from Wizard;
  
Result res = query.store();
  
cout  Query:   query.preview()  endl;
  
cout  Records Found:   res.size()  endl  endl;
  
return 0;
  
 }
 
 with g++, it tells me :
 
 /tmp/ccfWoaBO.o: In function `main':
 /tmp/ccfWoaBO.o(.text+0x2e): undefined reference to 
`MysqlConnection::MysqlConnection(char const *, char const *, char const *, char 
const *, bool)'
 /tmp/ccfWoaBO.o(.text+0x18c): undefined reference to 
`MysqlConnection::~MysqlConnection(void)'
 /tmp/ccfWoaBO.o(.text+0x21d): undefined reference to 
`MysqlConnection::~MysqlConnection(void)'
 /tmp/ccfWoaBO.o(.rodata+0x15c): undefined reference to `mysql_date type_info node'
 /tmp/ccfWoaBO.o(.rodata+0x194): undefined reference to `mysql_time type_info node'
 /tmp/ccfWoaBO.o: In function `MysqlDate type_info function':
 /tmp/ccfWoaBO.o(.gnu.linkonce.t.__tf9MysqlDate+0x18): undefined reference to 
`mysql_date type_info function'
 /tmp/ccfWoaBO.o: In function `MysqlTime type_info function':
 /tmp/ccfWoaBO.o(.gnu.linkonce.t.__tf9MysqlTime+0x18): undefined reference to 
`mysql_time type_info function'
 /tmp/ccfWoaBO.o: In function `MysqlRes::~MysqlRes(void)':
 /tmp/ccfWoaBO.o(.gnu.linkonce.t._._8MysqlRes+0x1b): undefined reference to 
`MysqlResUse::~MysqlResUse(void)'
 /tmp/ccfWoaBO.o: In function `MysqlQuery::preview(void)':
 /tmp/ccfWoaBO.o(.MysqlQuery::gnu.linkonce.t.preview(void)+0x1b): undefined reference 
to `SQLQuery::str(SQLQueryParms const ) const'
 /tmp/ccfWoaBO.o: In function `MysqlRes::num_rows(void) const':
 /tmp/ccfWoaBO.o(.MysqlRes::gnu.linkonce.t.num_rows(void) const+0x14): undefined 
reference to `mysql_num_rows'
 /tmp/ccfWoaBO.o: In function `MysqlQuery::store(SQLQueryParms , query_reset)':
 /tmp/ccfWoaBO.o(.MysqlQuery::gnu.linkonce.t.store(SQLQueryParms , query_reset) 
+0x40): undefined reference to `SQLQuery::str(SQLQueryParms const , query_reset)'
 /tmp/ccfWoaBO.o: In function `MysqlRes::fetch_row(void) const':
 /tmp/ccfWoaBO.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xd8): undefined 
reference to `mysql_fetch_row'
 /tmp/ccfWoaBO.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xec): undefined 
reference to `mysql_fetch_lengths'
 /tmp/ccfWoaBO.o: In function `MysqlRes::data_seek(unsigned int) const':
 /tmp/ccfWoaBO.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int) const+0x1c): 
undefined reference to `mysql_data_seek'
 /tmp/ccfWoaBO.o: In function `MysqlConnection::store(basic_stringchar, 
string_char_traitschar, __default_alloc_templatetrue, 0  const )':
 /tmp/ccfWoaBO.o(.MysqlConnection::gnu.linkonce.t.store(basic_stringchar, 
string_char_traitschar, __default_alloc_templatetrue, 0  const )+0x1d): 
undefined reference to `MysqlConnection::store(basic_stringchar, 
string_char_traitschar, __default_alloc_templatetrue, 0  const , bool)'
 /tmp/ccfWoaBO.o: In function `MysqlResUse::num_fields(void) const':
 /tmp/ccfWoaBO.o(.MysqlResUse::gnu.linkonce.t.num_fields(void) const+0x12): undefined 
reference to `mysql_num_fields'
 /tmp/ccfWoaBO.o: In function `FieldTypes::FieldTypes(MysqlResUse const *)':
 /tmp/ccfWoaBO.o(.FieldTypes::gnu.linkonce.t.(MysqlResUse const *)+0x4d): undefined 
reference to `FieldTypes::init(MysqlResUse const *)'
 collect2: ld returned 1 exit status 
 
 
 Please, help me...
 
 Thaks.
 
 Quiks
 -- 


Hi!

You have to add -lsqlplus to the linker args. 

Next, libsqllus.so has to be in a directory visibie with your dynamic
linker. 

Easiest way to do it is to add directory containing library to
/etc/ld.so.conf and tu run ldconfig.

If that does not help, add #include define_short as the first
include.


Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




User

2001-05-03 Thread Marco Battistoni

I'm new with Mysql database there is anybody that could explain to me how to 
create an user in a specific database with encrypted password?

I'll tank you very much
Marco
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Obtaining warnings

2001-05-03 Thread Terry Gliedt

My apologies for even needing to ask this question, but I've
spend hours combing through the docs and have not figured this
out. :-(

The problem is basically how to obtain warnings and the question
comes in a couple of flavors:

For example if one does update tbl set my_int='21.3 a' where
my_key=4 (where my_int = int(11)) my_int will be set to 21 and a
warning is generated. Try as I might, I cannot see how to get the
mysql client to show these to me.

Issuing the same command in PHP4, I can not see an interface
which will return me an indicator that a warning was generated or
how to fetch the warning message.

Doing an INSERT where data is converted/truncated apparently
generates no warnings (as indicated in the mysql client), but
surely MYSQL will generate a warning when the data is converted.

Lastly, can I set some flag so that MYSQL is more strict about
this stuff? Seems to me that my_int=21.3 isn't correct in some
cases and I should at least get a warning and even better be able
to force MySQL to reject this as incorrect.

TIA

-- 
=
Terry Gliedt [EMAIL PROTECTED]   http://www.hps.com/~tpg/
Biostatistics, Univ of Michigan  Personal Email:  [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Solaris Installation problems

2001-05-03 Thread Matthew P. Marino

I think I remember getting around it by installing binutils from the GNU site.
That's generaly the problem with solaris. Open source is GNU centric, Solaris
prior to 2.8 is definately NOT.

EXT-Chung, Kenneth wrote:
 
Thanks. I got the gtar from the download page.
 
Now I have unpacked it with mysql-3.23.37-sun-solaris2.7-sparc directory
 
 But I have another problems with running scripts/mysql_install_db
 
 % scripts/mysql_install_db
 ld.so.1: ./bin/my_print_defaults: fatal: libcrypt_i.so.1: open failed: No 
such file or directory
 
 ld.so.1: ./bin/mysqld: fatal: libcrypt_i.so.1: open failed: No such file or 
directory
 Killed
 Installation of grant tables failed!
 
 Looks like I am missing a libcrypt_i.so.1, where am I supposed to get it ?
 
 Thanks
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: User

2001-05-03 Thread Ansgar Becker

 I'm new with Mysql database there is anybody that could explain to me how
to
 create an user in a specific database with encrypted password?


simply use MySQL-Front (www.mysqlfront.de) - adding users with specific
restrictions is very easy there.


Greetings,
Ansgar


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: windoze and batch files

2001-05-03 Thread Sander Pilon

No editing?!? Psch... louzy programmers. 

( see http://www.jpsoft.com/index.htm for proof that consoles in NT/2K
consoled can edit just fine, etc.)

But... there are numerous mysql clients available, also for windows. I
bet you can find one with fine edit capabilities in the contrib section.
( I heard http://www.anse.de/mysqlfront/ aint too bad. )

 -Original Message-
 From: Bordeaux Stan [mailto:[EMAIL PROTECTED]] 
 Sent: 3 May 2001 02:23
 To: [EMAIL PROTECTED]
 Subject: windoze and batch files
 
 
 Hi all,
 unfortunately, I am forced to do some background mysql 
 development work on a windoze box, which for reasons I wont 
 go into here requires that I use the mysql console client.  
 As many would know this does not allow any commands to be 
 edited in the console as does linux.  
 
 I decided that it would be easier to write a batch file to do 
 some work but can't find out how to get mysql to process the 
 batch file.  Issuing the mysql  batch file in dos mode wont work.  
 
 Any help appreciated as I'm getting sick and tired of 
 entering long queries at the mysql prompt and then retyping 
 the whole thing if I make a small syntax error.
 
 Stan Bordeaux
 Injury Prevention Policy Officer
 Public  Environmental Health Service
 1/34 Davey St
 Hobart 7000
 ph: (03)6233 3774
 fax: (03)6223 1163
 email: [EMAIL PROTECTED]
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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
 
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: User

2001-05-03 Thread Stefan Linges

Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

Bye..

Stefan Linges

- Original Message -
From: Marco Battistoni [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 1:17 PM
Subject: User


 I'm new with Mysql database there is anybody that could explain to me how
to
 create an user in a specific database with encrypted password?

 I'll tank you very much
 Marco
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




AW: [PHP-DB] help - strange error message`

2001-05-03 Thread Stefan Siefert

you could download the sources of php (4.0.5) and compile it with following
commands:

./configure --with-mysql=/your/path/to/mysql (append here all the other
configurations you would like to use)

make
make install

and normaly this should work..

you might need to edit the httpd.conf file ..

stefan Siefert



-Ursprungliche Nachricht-
Von: Marc Bragg [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 3. Mai 2001 14:01
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: [PHP-DB] help - strange error message`


Hi:

Installed redhat 7.0 and had multiple mysql problems, but php4 from the
disc seemed fine. Updated mysql to 3.23.37, now it works fine, but php
gives me:

PHP Warning: Unable to load dynamic library '/usr/lib/php4/mysql.so' -
libmysqlclient.so.9: cannot open shared object file: No such file or
directory in Unknown on line 0

the file mysql.so is present in the php4 directory?

Any ideas what I need to do?


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Benchmark

2001-05-03 Thread Raf Geusens

Hi,

I wanna know how many INSERT queries my MySQL server can resolve in a 
second? What benckmark should I use or how should I do this?
I've read something in the manual about looking for sql-bench, but it's 
nowhere on my pc. Is it possible that it's not installed??

Greetings,
Raf
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




only 194 error messages

2001-05-03 Thread Jacco Rens

i have a strange problem here;

/usr/local/libexec/mysqld: Fatal error: Error message file 
'/usr/local/share/mysql/english/errmsg.sys' had only 194 error messages, 
but it should have at least 205 error messages.
Check that the above file is the right version for this program!

010501 22:23:59  mysqld ended

hmmm, should i delete and compile the whole thing over ?

or is there a smarter way to do this?


Best,
jacco
Netherlands

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




BDB tables.

2001-05-03 Thread Diego Zabaleta

For some reason the tables BDB corrupt. 
Last night it leaves running programs (implemented in C)  that consults and
modifies these tables and in morning one of the indexes was corrupt. 
All the programs use mysql_close to close the connection to the database.
Look the query i did today of morning :
mysql describe sist_adm; (BDB TABLE)

+-+-+--+-+-++
| Field   | Type| Null | Key | Default | Extra
|

+-+-+--+-+-++
| id  | int(11) |  | PRI | NULL| auto_increment
|
| nombre  | varchar(30) | YES  | MUL | NULL|
|
| so  | varchar(30) | YES  | | NULL|
|
| descripcion | varchar(50) | YES  | | NULL|
|

+-+-+--+-+-++
4 rows in set (0.00 sec)

mysql select * from sist_adm;
++--+-+---+
| id | nombre   | so  | descripcion   |
++--+-+---+
|  1 | master   | AIX 4.2 | Equipo de comunicaciones  |
|  2 | zeus | Solaris 2.6 | Sistema de pruebas.   |
|  3 | donald   | Solaris 2.6 | Sistema de desarrollo |
|  4 | apserver | Solaris 2.6 | Sistema standby de produccion |
++--+-+---+
4 rows in set (0.00 sec)

mysql select * from sist_adm where id1;
Empty set (0.00 sec)

The command resolve_stack_dump reports:

0x40077552 _end + 9374242427
0x811815d berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 81
0x816222a __bam_cmp + 138
0x81a8da8 __bam_search + 856
0x819ea50 __bam_c_search + 1628
0x819c6ac __bam_c_get + 1288
0x8175751 __db_c_get + 841
0x8115a4f index_read__11ha_berkeleyPcPCcUi16ha_rkey_function + 395
0x8108e8a get_next__12QUICK_SELECT + 282
0x810af5f rr_quick__FP14st_read_record + 23
0x80f7fac
mysql_update__FP3THDP13st_table_listRt4List1Z4ItemT2P4ItemUl15enum_duplicate
s13thr_lock_type + 2316
0x80cd3f1 mysql_execute_command__Fv + 5173
0x80d02c3 mysql_parse__FP3THDPcUi + 199
0x80cb6d9 do_command__FP3THD + 1305
0x80cac06 handle_one_connection__FPv + 578

mysqld died in the query:
UPDATE alarmas SET status=0,fechahora=SYSDATE() WHERE id=-125

Server version  3.23.36
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 41 min 0 sec

Threads: 1  Questions: 73  Slow queries: 0  Opens: 71  Flush tables:
1  Open tables: 64 Queries per second avg: 0.030
Environment:
machine, os, target, libraries (multiple lines)
System: Linux centinela 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000
i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''
LDFLAGS=''
LIBC:
lrwxrwxrwx1 root root   13 Mar 30 21:12
/lib/libc.so.6 - libc-2.1.3.so
-rwxr-xr-x1 root root  4101324 Feb 29  2000
/lib/libc-2.1.3.so
-rw-r--r--1 root root 20272704 Feb 29  2000
/usr/lib/libc.a
-rw-r--r--1 root root  178 Feb 29  2000
/usr/lib/libc.so

¿ Any idea ?
Sorry for my english.

Regards,
Diego.-

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Column Privilege Question

2001-05-03 Thread David C. Troy

Hi, List!

I have a table.  The table has columns A, B, and C.

I want User1 to be able to read columns A,B, and C, but I want User2 to
only be able to read column A.

Is this possible using MySQL columns_priv security?

Thanks,
Dave

=
David C. Troy   [[EMAIL PROTECTED]]   410-544-6193 Sales
ToadNet - Want to go fast?410-544-1329 FAX
570 Ritchie Highway, Severna Park, MD 21146-2925  www.toad.net


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




problems downloading the Solaris version of the MySQL GUI

2001-05-03 Thread John Silva

Hi,

When I try to download the Solaris version of the mySQL GUI all I get is a
screen full of control characters.

I am attempting this from the following web page:
www.mysql.com/downloads/gui-clients.html

Any help you can give would be appreciated.

John Silva
Senior Engineer
Mesh Networks, Inc.
(407) 659-5323
(407) 659-5301
http://www.MeshNetworks.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




query in UDF??

2001-05-03 Thread Danny Cardonne

hi

can i do a query in a udf?
if so how?

if not then it's more complicated:
i want for security reason that a certain user make a query to the
database and receive the result, but i don't want the user to modify the
query except the where field=variable, so i want to create a function
that do the query with the variable given by the user...
if it's impossible, can you restrict a user to only 1 query that he
cannot modify?


Danny

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Rolling back of a transaction

2001-05-03 Thread Paul DuBois

At 5:34 PM +0800 3/14/01, Sudhir wrote:
Hi,

I am a Sudhir, working as a Software Consultant in Unidux Technologies,
Singapore.  My job here is to suggest Technology.  Now we are planning to
purchase license for the application server JRun.  Currently we are
developing a procurement engine in Java, using MySql as the data base
server.  As per my database administrator, MySql don't have rolling back
procedure for a transaction which is not to be committed.  With Oracle or
MSSqlServer I can commit or rollback a transaction.  I mean I can control
the transaction whether it has to be committed or rolled back.  Is it true
that MySql don't have rollback.  We are planning to develop the engine using
EJB and JTA.  If MySql does not have this rolling back, I fear we can not
use JTA with MySql as back end.  So please inform me whether I can suggest
MySql or not for developing the engine using EJB with JTA to my
organization.

Your db admin may be thinking of older versions of MySQL (either that,
or he's been visiting the OpenACS Web site. :-))

Older versions of MySQL didn't have transaction support, but recent versions
do.  You need to make sure to use table types that support transactions.
(For example, ISAM and MyISAM tables don't, BDB tables do.)


Thanks  Best Regards,

Venkata Sudhir Kurapati
Software Consultant
64A, Horne Road,
Singapore - 209072
DID : +65 - 3914521
Fax : +65 - 2962651


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: windoze and batch files

2001-05-03 Thread Wayne Kodie

One of the best Windows clients for editing queries is
urSQL
(http://www.urbanresearch.com/software/utils/urbsql/urquery.php)

--- Sander Pilon [EMAIL PROTECTED] wrote:

 But... there are numerous mysql clients available,
 also for windows. I
 bet you can find one with fine edit capabilities in
 the contrib section.
 ( I heard http://www.anse.de/mysqlfront/ aint too
 bad. )
 


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Apache/PHP/MySQL - processes multiply until about 30, then doom

2001-05-03 Thread Gary Bickford

Thanks for the reply!, Scott!  I considered changing the number of 
allowed connections but I figured this would just defer the problem, 
as the root problem was the increasing number of connections.

Last night I went through the entire website looking for code that 
used mysql_pconnect() in PHP, which provides 'persistent' 
connections.  I had thought before that I had caught all of these but 
found another 40 or so files that had either been missed or magically 
appeared.  I converted all those to standard mysql_connect() calls 
and ran a stress test all night - using wget to fetch 1000 pages as 
fast as possible from a neighboring machine, over and over.

On the server I have a loop running like this:

   N=1; while [ $N -ge 1 ]; do ps aux|grep mysql |wc; sleep 5; done

which shows the number of mysql processes every five seconds or so.
I had run this test earlier and over two hours' time the number of 
connections increased to about 22.  After changing all the 
mysql_pconnect() calls to mysql_connect(), and leaving the wget job 
running all night (the 'at' job I set up to kill it while I was 
sleeping failed), the number of connections was still at 5.  This 
involved fetching almost 400,000 pages. 

So it appears that the increasing number of connections has to do 
with some persistent connections never being closed, although PHP 
thought they were.  Determining if this is a PHP, MySQL, Apache or 
Redhat problem is beyond my desired effort and code experience level. 
At least all parts are open source!!

Interestingly, the rate at which wget could fetch pages almost 
doubled while the server's CPU load dropped from 86% to 77%, which 
bears out the experience of some others on various PHP lists. Some 
users get dramatic improvements using mysql_pconnect(), others don't.

I will now make another pass at a couple of pages that seemed to be 
the focus of the errors that users received, to see if I can improve 
the error handling (and maybe mail myself a message!).  For now, I'm 
calling the bug worked-around.

GB

On Wednesday 02 May 2001 04:43 pm, Scott Baker opined:
 You can look into increasing the number of allowed connections that
 MySQL will accept... are you using connect or pconnect?

 At 04:23 PM 5/3/2001 -0700, Gary Bickford wrote:
 Repost - nobody has any ideas?  I've run some stress tests,
  sending several thousand page requests, and the number of mysql
  processes goes up and down but over time continues to rise.  It's
  up to about 22 now.  When it gets to about 30, every request from
  the web server will be will fail.
 
 Could some of these processes be threads that are orphaned for
  some reason (perhaps Apache continuing to expire its own
  processes?) and hang around, idle?  I speculate that there is
  some maximum number of processes and finally MySQL can't won't
  start another thread/process. GB
 
 On Tuesday 01 May 2001 05:26 pm, Gary E Bickford opined:
   I am running MySQL (3.23.27 at this point) with Apache1.3.12
   and PHP3 on a PC running Redhat 6.0.  My problem has survived
   upgrades of all components from earlier versions.
  
   Every PHP page has at least one query to a MySQL database for
   session tracking (home-rolled code, not PHPLib or anything off
   the shelf)  There are also on some pages other queries, to a
   different database, same server (same mysql).  Most of the
   latter are Phorum queries.
  
   Periodically the number of mysql instances that show up in 'ps
   auxww'1 gets to about 30 and mysql no longer listens to
   PHP/Apache. However I can still use the mysql shell with no
   problem, so MySQL is still running but can't hear anything from
   PHP.
  
   The only way to fix it is to run 'apachectl restart' or
   equivalent. 'graceful' doesn't do it.  Im not sure if
   restarting MySQL instead works.  After Apache is restarted, the
   mysql processes are down to 3 and everybody's happy again.
  
   I have been trying for months to figure out what is happening
   and how to fix it.  I had heard at one point that there was a
   problem with Redhat 5.2 kernel that caused a similar problem,
   but I upgraded that but no joy.
  
   Temporarily I have built a kluge cron job that restarts apache
   every so often, which worked as long as the server was low
   volume. But now usage is dramatically increasing due to some
   new web sites that have been installed and announced to the
   entire corporation. So the problem is triggered before the
   restart cleans up the mess. I can't have it restarting every 20
   minutes.
  
   I've also changed every instance of pconnect() to connect()
   where I can, but no difference.
  
   Can anybody tell me anything useful?  I'm supposed to come back
   with a firm fixit schedule tomorrow morning, so please email me
   directly as well as on the list - I'm afraid I'll miss it in
   the volume on the list. If I don't get this fixed very shortly
   my consulting contract with this company will no doubt begin to
   fade out!!

Re: Doubt

2001-05-03 Thread Eric Fitzgerald

There are a few options here.

First off, when making the query, just put the NOW() statement into the
tableit's only a few extra keys to type, and it really isn't that
difficult.

The second option is using the TIMESTAMP type...take a look, it's probably
what your looking for :)

- Original Message -
From: Sreevatsava Varada [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 02, 2001 8:03 PM
Subject: Doubt


Hi,

   I've recently moved from MS-SQL Server 7.0 to mySQL. In MSSQL I used to
give the default value 'GetDate()' for a field in the database with the
datetime datatype. In mySQL I tried using Now(). But when I insert a new row
the datetime field is taking :00:00 00:00:00 value. Please let me know
what should I give as the default value for 'record_date' field (of datetime
datatype) so that it takes the value returned by Now() function when a new
row is inserted using php script.


Thanks.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Apache/PHP/MySQL - processes multiply until about 30, then doom

2001-05-03 Thread Scott Baker

That's very odd...  Technically pconnect should be a lot faster, not sure 
exactly why it's not.  The other thing you might want to look at is the 
MySQL idle timeout (or something like that).  That's how long your 
pconnects stay connected if they don't transfer any traffic.  I think it 
defaults to 30 minutes, which is probably ok.  Depending on the traffic of 
your site.

At 09:27 AM 5/4/2001 -0700, Gary Bickford wrote:
Thanks for the reply!, Scott!  I considered changing the number of
allowed connections but I figured this would just defer the problem,
as the root problem was the increasing number of connections.

Last night I went through the entire website looking for code that
used mysql_pconnect() in PHP, which provides 'persistent'
connections.  I had thought before that I had caught all of these but
found another 40 or so files that had either been missed or magically
appeared.  I converted all those to standard mysql_connect() calls
and ran a stress test all night - using wget to fetch 1000 pages as
fast as possible from a neighboring machine, over and over.

On the server I have a loop running like this:

N=1; while [ $N -ge 1 ]; do ps aux|grep mysql |wc; sleep 5; done

which shows the number of mysql processes every five seconds or so.
I had run this test earlier and over two hours' time the number of
connections increased to about 22.  After changing all the
mysql_pconnect() calls to mysql_connect(), and leaving the wget job
running all night (the 'at' job I set up to kill it while I was
sleeping failed), the number of connections was still at 5.  This
involved fetching almost 400,000 pages.

So it appears that the increasing number of connections has to do
with some persistent connections never being closed, although PHP
thought they were.  Determining if this is a PHP, MySQL, Apache or
Redhat problem is beyond my desired effort and code experience level.
At least all parts are open source!!

Interestingly, the rate at which wget could fetch pages almost
doubled while the server's CPU load dropped from 86% to 77%, which
bears out the experience of some others on various PHP lists. Some
users get dramatic improvements using mysql_pconnect(), others don't.

I will now make another pass at a couple of pages that seemed to be
the focus of the errors that users received, to see if I can improve
the error handling (and maybe mail myself a message!).  For now, I'm
calling the bug worked-around.

GB

On Wednesday 02 May 2001 04:43 pm, Scott Baker opined:
  You can look into increasing the number of allowed connections that
  MySQL will accept... are you using connect or pconnect?
 
  At 04:23 PM 5/3/2001 -0700, Gary Bickford wrote:
  Repost - nobody has any ideas?  I've run some stress tests,
   sending several thousand page requests, and the number of mysql
   processes goes up and down but over time continues to rise.  It's
   up to about 22 now.  When it gets to about 30, every request from
   the web server will be will fail.
  
  Could some of these processes be threads that are orphaned for
   some reason (perhaps Apache continuing to expire its own
   processes?) and hang around, idle?  I speculate that there is
   some maximum number of processes and finally MySQL can't won't
   start another thread/process. GB
  
  On Tuesday 01 May 2001 05:26 pm, Gary E Bickford opined:
I am running MySQL (3.23.27 at this point) with Apache1.3.12
and PHP3 on a PC running Redhat 6.0.  My problem has survived
upgrades of all components from earlier versions.
   
Every PHP page has at least one query to a MySQL database for
session tracking (home-rolled code, not PHPLib or anything off
the shelf)  There are also on some pages other queries, to a
different database, same server (same mysql).  Most of the
latter are Phorum queries.
   
Periodically the number of mysql instances that show up in 'ps
auxww'1 gets to about 30 and mysql no longer listens to
PHP/Apache. However I can still use the mysql shell with no
problem, so MySQL is still running but can't hear anything from
PHP.
   
The only way to fix it is to run 'apachectl restart' or
equivalent. 'graceful' doesn't do it.  Im not sure if
restarting MySQL instead works.  After Apache is restarted, the
mysql processes are down to 3 and everybody's happy again.
   
I have been trying for months to figure out what is happening
and how to fix it.  I had heard at one point that there was a
problem with Redhat 5.2 kernel that caused a similar problem,
but I upgraded that but no joy.
   
Temporarily I have built a kluge cron job that restarts apache
every so often, which worked as long as the server was low
volume. But now usage is dramatically increasing due to some
new web sites that have been installed and announced to the
entire corporation. So the problem is triggered before the
restart cleans up the mess. I can't have it restarting every 20

problems with privileges, MySQL for Windows 3.23.xx

2001-05-03 Thread MySQL-Mail

Hello,

how I can set Permission on Tables and Columns?
I have create a user Hugo with no permissions in the user, hosts and db table.
Then I type:
grant select(Sp1,Sp2), update(Sp2) on MyTestBase.Tab1 to hugo@localhost;
grant select on MyTestBase.Tab1 to hugo@localhost;
flush privileges;

in the columns_priv and tables_priv the permission are right

when I type show grants for hugo@localhost; i get 

Grants for hugo@localhost 



GRANT SELECT (Sp2, Sp1) ON MyTestBase.Tab1 TO 'hugo'@'localhost' 

1 row(s) affected on show grants for hugo@localhost



So I think everything is right, but i cannot access with hugo. why

Even, when I set select right to the Database direktly I can access to the Database. 
But wenn I set a update right to a seperate column it dosn't work(i cannot update, 
but access)

is there an other thing I have not done?

the same scrips works on linux perfektly

thanks for everyone how can help me.




can not see data or tables in database

2001-05-03 Thread Richard Kurth

I set up a couple of databases last night in mysql and every thing is
working just fine. Today when I try to access the data it is not there
Using phpMyAdmin when I look at the databases that are completely empty
of tables and data that also includes the mysql database. If I start up telnet and
go into mysql it shows
that all of the tables and data are their including the mysql data.
This seems realy strange to me. Could you tell me what I need to do
to correct this problem or at lest looking in the right direction.


Thank you
Richard Kurth



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: can not see data or tables in database

2001-05-03 Thread B. van Ouwerkerk


I set up a couple of databases last night in mysql and every thing is
working just fine. Today when I try to access the data it is not there
Using phpMyAdmin when I look at the databases that are completely empty
of tables and data that also includes the mysql database. If I start up 
telnet and
go into mysql it shows
that all of the tables and data are their including the mysql data.
This seems realy strange to me. Could you tell me what I need to do
to correct this problem or at lest looking in the right direction.

Perhaps a problem with rights.. (settings in phpmyadmin not being saved?).. 
Not using phpmyadmin myself.. did read about it.

Bye,


B.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




NULL value in VARCHAR fields

2001-05-03 Thread stefan mojschewitsch

hi list,

i have a problem with DEFAULT NULL value in a varchar field.
mysql is version 3.23.33.

i want to have an user field in a row, to see who has created the row.

create table minidb.tel (
id  int UNSIGNED NOT NULL AUTO_INCREMENT,
tel char(16) NOT NULL,
service char(1) BINARY,
idate   timestamp(14) NOT NULL,
iuser   varchar(255) NOT NULL,
primary key (id, tel, idate)
);  

using DEFAULT USER(), would be nice, but only constants are allowed.
to prevent inserting rows without iuser, i like to have this field 
with NOT NULL restriction and default value NULL.
 
when inserting a row with 
insert into tel set tel='+49 174 92932000', service=1; 

there will be a record with iuser = ''.
i thought the meaning of NOT NULL is to reject inserting rows with 
iuser as NULL. 

the line 
iuser   varchar(255) NOT NULL DEFAULT NULL,
will rejected with an errormsg.

thx in advance for your help

stefan

-- 
st3V13h

nach diktat verreist

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: What do I do now?

2001-05-03 Thread tyler


stat error seems like a permissions error.

I'd guess it's a permissions problem.   Perhaps figure out what user the 
process trying to stat the file is running under and then figure out 
what permissions that user has on the file in question.
(Also check the directory chain going up for permissions being 
appropriate?).

luck,
Tyler


On Wednesday, May 2, 2001, at 07:22 PM, Paul DuBois wrote:

 At 11:52 PM -0600 5/1/01, Colin Faber wrote:
 why not just use the LOAD DATA INFILE option?

 That probably won't help much.  All the mysqlimport does is issue
 a LOAD DATA statement for you.

 LOAD DATA LOCAL INFILE might help, though.  Or mysqlimport --local.
 At least, if the file_name.csv file is on the client host.



 Bombardier Systems Consulting wrote:

  HELP!!!

  I sent a message to this forum a couple of days ago about a problem 
 that I
  am having with MySQL 3.23.37 (and now 36) running under RedHat 7.1.

  I am trying to use the mysqlimport utility and continue to get the 
 following
  error:

  mysqlimport: Error: Can't get stat of '/home/yada/yada/file_name.csv'
  (Errcode: 13), when using table: file_name

  This utility was working when I was running 3.23.36 and RedHat 7.0 
 but
  RedHat kept crashing and so I had to upgrade to 7.1.  When I 
 installed MySQL
  I got the 3.23.37 version of MySQL.  I have since re-installed 
 RedHat 7.1
  and the MySQL 3.23.36 version and am getting the same error.  I 
 looked up
  the error in the documentation and tried the UMASK change, rebooted, 
 created
  new directory and moved file into it...still same problem.

  ANY ASSISTANCE WOULD BE APPRECIATED!

  Jim

  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)

  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail mysql-unsubscribe-
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: 
 http://lists.mysql.com/php/unsubscribe.php

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


 -- Paul DuBois, [EMAIL PROTECTED]

 -
 Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




MYSQL C API

2001-05-03 Thread VVM Ravikumar Sarma Chengalvala

Hi,
1.
I am using C_API for accessing data from MYSQL.
2.
mysql_query() function returns the following values:
0 if the query is successful
-1 if the query fails.
3.
At the same time mysql-C_API documentation specifies
that it returns a non zero number if query is a
failure.Does the function return any other values
other than -1 if the query fails?
4.
If I use the mysql_query() for INSERT or UPDATE
statements I am facing the following problem:
If the database column value I am trying to update is
the same as the the value already existing in the
database,then the mysql_query() returns  0 and the 
mysql_affected_rows() returns zero.

It will be good if mysql_query either returns -1  for
this case as the value being updated is same as that
of existing one.

Regards,
Ravi



Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




NULL value in VARCHAR fields

2001-05-03 Thread lists


Stefan, 

When you insert a row in a table and you do not specify a value 
for a field, mySQL (and any other DBMNS?) will do the following:

1. If field accepts null: it will set the value of that field 
to null

2. If field DOES NOT accept null - no default value set: it will 
set the field's value as per primitive data type of field. If CHAR()
it will set it to '', if date/datetime to -00-00, if numeric
to 0. And so on.  And this is why you get the '' in your field
when you do your insert.

2. If field DOES NOT accept null - default value set: 
it set the field's value to the deafult.


Christopher Lambrou,
CGL Computer Services, Inc.
Empire State Building, 
PMB 16J Suite 3304 
New York, NY 10118
Tel: (212) 971-9723
Fax: (212) 564-1135
URL: http://www.cglcomputer.com
Email: [EMAIL PROTECTED]

On 5/03/2001 20:59:48, you said:
hi list,

sorry for posting again, i will learn it.

i have a problem with DEFAULT NULL value in a varchar field.
mysql is version 3.23.33.

i want to have an user field in a row, to see who has created the row.

create table minidb.tel (
id  int UNSIGNED NOT NULL AUTO_INCREMENT,
tel char(16) NOT NULL,
service char(1) BINARY,
idate   timestamp(14) NOT NULL,
iuser   varchar(255) NOT NULL,
primary key (id, tel, idate)
);  

using DEFAULT USER(), would be nice, but only constants are allowed.
to prevent inserting rows without iuser, i like to have this field 
with NOT NULL restriction and default value NULL.
 
when inserting a row with 
insert into tel set tel='+49 174 92932000', service=1; 

there will be a record with iuser = ''.
i thought the meaning of NOT NULL is to reject inserting rows with 
iuser as NULL. 

the line 
iuser   varchar(255) NOT NULL DEFAULT NULL,
will rejected with an errormsg.

thx in advance for your help

stefan


-- 
st3V13h

nach diktat verreist

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Dual Processors and Threads?

2001-05-03 Thread Derrick T. Woolworth

Interesting question.  This really depends on multiple things (operating
system, table locking, etc.)

LinuxThreads are implemented more like multiple processes sharing memory, so
you will see a benefit from having multiple processors as these threads
(processes) are scheduled across both processors.  However, you will not see
much benefit when accessing the same table for inserts, updates and
deletions.  I believe locking prevents access by multiple processes when
performing these operations.  I am not sure of the granularity of the locks.

The question is really, does MySQL do record locking or page locking or
complete table locking during these operations?  If MySQL does record
locking, then the performance gains will be much higher.

D


- Original Message -
From: Bryan Coon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 2:12 PM
Subject: Dual Processors and Threads?


 Would someone briefly explain to me how MySQL uses threading in a
 multi-processor environment?

 Currently I have a Dual 1gHz processor box running RedHat 7.1 with the smp
 kernel.  Does this automatically take care of things?  Is mysql
parallelized
 at all, or is this inherent in the threading?  Insofar as optimization,
are
 there any manual things I have to do to optimize mysql for a dual
processor
 box?

 This is kind of a new topic for me so my apologies if I have missed the
 obvious somehow.

 Thanks!
 Bryan

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re[2]: can not see data or tables in database

2001-05-03 Thread Richard Kurth

Hello B.,

Thursday, May 03, 2001, 11:42:39 AM, you wrote:


I set up a couple of databases last night in mysql and every thing is
working just fine. Today when I try to access the data it is not there
Using phpMyAdmin when I look at the databases that are completely empty
of tables and data that also includes the mysql database. If I start up 
telnet and
go into mysql it shows
that all of the tables and data are their including the mysql data.
This seems realy strange to me. Could you tell me what I need to do
to correct this problem or at lest looking in the right direction.

B. Perhaps a problem with rights.. (settings in phpmyadmin not being saved?).. 
B. Not using phpmyadmin myself.. did read about it.

None of the programs on the web can access the mysql not just
phpmyadmin. It was working fine before yesterday and now it just wont
work. is there anything that I should check on the server or would it be
best to uninstall mysql and reinstall it.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




SET type columns and MYSQL_FIELD-length

2001-05-03 Thread Zak Greant

Good Day!

I am working on the MySQL section of a reference manual for PHP and need to
confirm one small detail on the length of SET type columns.

It looks like the MYSQL_FIELD-length value for SET columns is the length of
a string containing the SET elements separated by commas.

Is this right?


Thank You!

Zak Greant
Freelance Designer / Programmer / Writer

PHP QA Team Member
http://qa.php.net/

Am I working on a project for or with you?
Check http://calendar.yahoo.ca/jagreant



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: JOIN query gone awry

2001-05-03 Thread Bob Hall

Greetings.

I have two tables that are identical in structure, but each contains 
data for different years.

Here is the desc of the first table:

mysql desc counts2000;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| version | decimal(6,3)| YES  | | NULL|   |
| sequence| tinyint(4)  | YES  | | NULL|   |
| dt_year | bigint(4)   | YES  | | NULL|   |
| dt_month| bigint(2)   | YES  | | NULL|   |
| dt_mon_name | varchar(10) binary  | YES  | | NULL|   |
| dt_day  | bigint(2) unsigned zerofill | YES  | | NULL|   |
| date_taken  | date| YES  | | NULL|   |
| exams   | bigint(21)  |  | | 0   |   |
| dt_label| varchar(6)  | YES  | | NULL|   |
+-+-+--+-+-+---+
9 rows in set (0.03 sec)

The desc for the other is included at the end of the message.  This 
first one has data for Jan/2000 - Jun/2000.  The second has data for 
Jan/2001 - Apr/2001.

I want to combine the two tables into one new one.  Since they have 
a differing number of rows, but I want all of the rows from 
counts2000, I thought to use a JOIN.  Here is the code I am trying 
to use:

 code starts here --

DROP TABLE IF EXISTS counts;

CREATE TABLE counts SELECT
 AL1.sequence,
 AL1.dt_month,
 AL1.dt_day,
 AL1.dt_label,
 SUM(AL1.exams) AS y2000,
 SUM(AL2.exams) AS y2001
FROM
 counts2000 AL1
LEFT JOIN
 counts2001 AL2
USING
 (sequence,dt_label)
WHERE
 AL1.version = '2'  AND
 AL2.version = '2'
GROUP BY
 AL1.sequence,
 AL1.dt_label
ORDER BY
 AL1.sequence,
 AL1.dt_month,
 AL1.dt_day;
ALTER TABLE counts ADD INDEX sequence (sequence);
ALTER TABLE counts ADD INDEX dt_month (dt_month);
ALTER TABLE counts ADD INDEX dt_day (dt_day);

 code ends here --

Seems like it should work.  It does run, but the goal behind using 
the JOIN (to get all of the rows in counts2000) is not being met.  I 
only gets rows from both tables where the row exists in both tables.

I am running MySQL 3.23.34 (for Windows) on Windows 2000 Professional.


Here is some of the data from counts2000 that is not showing up in 
the resultant table:

2.000   1   20005   May 01  2000-05-01  154 01-May
2.000   1   20005   May 02  2000-05-02  283 02-May
2.000   1   20005   May 03  2000-05-03  373 03-May
2.000   1   20005   May 04  2000-05-04  298 04-May
2.000   1   20005   May 05  2000-05-05  160 05-May
2.000   1   20005   May 06  2000-05-06  117 06-May
2.000   1   20005   May 07  2000-05-07  44  07-May
2.000   1   20005   May 08  2000-05-08  308 08-May
2.000   1   20005   May 09  2000-05-09  408 09-May

Any ideas why the JOIN does not seem to be working?

Thanks,
Dan




 SUPPORTING DOCS ---

mysql desc counts2001;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| version | decimal(6,3)| YES  | | NULL|   |
| sequence| tinyint(4)  | YES  | | NULL|   |
| dt_year | bigint(4)   | YES  | | NULL|   |
| dt_month| bigint(2)   | YES  | | NULL|   |
| dt_mon_name | varchar(10) binary  | YES  | | NULL|   |
| dt_day  | bigint(2) unsigned zerofill | YES  | | NULL|   |
| date_taken  | date| YES  | | NULL|   |
| exams   | bigint(21)  |  | | 0   |   |
| dt_label| varchar(6)  | YES  | | NULL|   |
+-+-+--+-+-+---+
9 rows in set (0.03 sec)

Dan Huston

Sir, the join is working fine. That's the way it's supposed to work. 
If the two tables have identical structure, then use a MERGE table to 
combine them, and select from the MERGE table.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

-
Before posting, please check:
   

Re: Agregrate in joined table result

2001-05-03 Thread Bob Hall

I have this tables :

mysqlselect * from bid_history;
+---++-+---+--+-+
| domain_id | bid_time   | user_id | price | bid_type | proxy_price |
+---++-+---+--+-+
| 1 | 20010501035942 |   2 | 10.00 |1 |   10.00 |
| 1 | 20010501035952 |   3 | 10.00 |1 |   10.00 |
| 1 | 20010501035956 |   4 | 10.00 |1 |   10.00 |
| 1 | 20010501040628 |   5 | 11.00 |1 |   11.00 |
| 2 | 20010501052520 |   2 | 10.00 |1 |   10.00 |
| 2 | 20010501052529 |   3 | 10.00 |1 |   10.00 |
| 1 | 20010501052542 |   2 | 11.00 |1 |   11.00 |
| 2 | 20010501052655 |   2 | 12.00 |1 |   12.00 |
| 1 | 20010501052542 |   3 | 11.00 |1 |   11.00 |
+---++-+---+--+-+

mysql select domain_id , domain_name from domain;
+---+-+
| domain_id | domain_name |
+---+-+
| 1 | iwan|
+---+-+

I have doing this query (but the results don't satisfied me) :
mysqlselect b.domain_id, b.user_id , max(b.price) as mb , b.bid_time ,
a.domain_name , a.minimum_price from domainplayer_bid_history as b ,
domainplayer_domain as a where a.domain_id = b.domain_id group by
b.domain_id , b.user_id , b.bid_time order by b.domain_id , mb desc ,
b.bid_time asc ;
+---+-+---++-+--
-+
| domain_id | user_id | mb| bid_time   | domain_name | minimum_price
|
+---+-+---++-+--
-+
| 1 |   5 | 11.00 | 20010501040628 | iwan| 10.00
|
| 1 |   2 | 11.00 | 20010501052542 | iwan| 10.00
|
| 1 |   3 | 11.00 | 20010501052542 | iwan| 10.00
|
| 1 |   2 | 10.00 | 20010501035942 | iwan| 10.00
|
| 1 |   3 | 10.00 | 20010501035952 | iwan| 10.00
|
| 1 |   4 | 10.00 | 20010501035956 | iwan| 10.00
|
+---+-+---++-+--
-+

I want the query's result :
+---+-+---++-+--
-+
| domain_id | user_id | mb| bid_time   | domain_name | minimum_price
|
+---+-+---++-+--
-+
| 1 |   5 | 11.00 | 20010501040628 | iwan| 10.00
|
| 1 |   2 | 11.00 | 20010501052542 | iwan| 10.00
|
| 1 |   3 | 11.00 | 20010501052542 | iwan| 10.00
|
| 1 |   4 | 10.00 | 20010501035956 | iwan| 10.00
|
+---+-+---++-+--
-+

How to do this in mysql ?

Sir, don't group on bid_time.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Problem with multi-part keys

2001-05-03 Thread Bob Hall

Hello All,

I've bumped into a problem and can't figure out how to solve it.
If anyone has a spare minute to give me a hint on what's wrong
I'd apreciate it a lot!

The problem is that when I add 'use index (multi-part index)'
to my queries, MySQL doesn't always use the whole key,
but decides what left-most part of the key to use itself.
Sometimes its decisions are rather strange to me.

Here are some tests that show what I mean:


CREATE TABLE test3 (
   pr mediumint(8) unsigned NOT NULL default '0',
   a mediumint(8) unsigned default '0',
   b mediumint(8) unsigned default '0',
   data mediumint(8) unsigned default '0',
   KEY a (a),
   KEY b (b),
   KEY k (a,b)
);

INSERT INTO test3 VALUES (1,0,0,9);
INSERT INTO test3 VALUES (2,0,1,9);
INSERT INTO test3 VALUES (3,1,0,9);
INSERT INTO test3 VALUES (4,1,1,9);
INSERT INTO test3 VALUES (5,1,2,9);
INSERT INTO test3 VALUES (6,0,0,9);



Test 1
==
explain select R.data from test3 as R, test3 as L use index (k)  where
L.a=IF(R.a=0,1,0) and
L.bR.b;

# The result is OK (just what I expected):
+---+---+---+--+-+--+--+
-+
| table | type  | possible_keys | key  | key_len | ref  | rows | Extra
|
+---+---+---+--+-+--+--+
-+
| R | ALL   | b | NULL |NULL | NULL |6 |
|
| L | index | a,b,k | k|   8 | NULL |6 | where used;
Using index |
+---+---+---+--+-+--+--+
-+


Test 2
==
explain select R.data from test3 as R, test3 as L use index (k)  where
((L.a=0 and R.a=1) or (L.a=1 and R.a=0)) and
L.bR.b;

# Why doesn't MySQL use the whole k index (8 bytes)?
+---+---+---+--+-+--+--+
-+
| table | type  | possible_keys | key  | key_len | ref  | rows | Extra
|
+---+---+---+--+-+--+--+
-+
| R | ALL   | a,b,k | NULL |NULL | NULL |6 | where used
|
| L | range | a,b,k | k|   4 | NULL |5 | where used;
Using index |
+---+---+---+--+-+--+--+
-+


Test 3
==
explain select R.data from test3 as R, test3 as L use index (k)  where
L.aR.a and
L.bR.b;

# k key isn't choosen by MySQL. Why?
+---+--+---+--+-+--+--+-
-+
| table | type | possible_keys | key  | key_len | ref  | rows | Extra
|
+---+--+---+--+-+--+--+-
-+
| R | ALL  | a,b,k | NULL |NULL | NULL |6 |
|
| L | ALL  | k | NULL |NULL | NULL |6 | range
checked for each record (index map: 4) |
+---+--+---+--+-+--+--+-
-+


Test 4
==
explain select R.data from test3 as R, test3 as L use index (k)  where
R.a=0 and
L.a=0 and
L.bR.b;

# Why doesn't MySQL use the whole k index (8 bytes)?
+---+--+---+--+-+---+--+
-+
| table | type | possible_keys | key  | key_len | ref   | rows | Extra
|
+---+--+---+--+-+---+--+
-+
| R | ref  | a,b,k | a|   4 | const |2 | where used
|
| L | ref  | a,b,k | k|   4 | const |2 | where used;
Using index |
+---+--+---+--+-+---+--+
-+


The bottom line is that I'd like to know if MySQL has a feature that
makes it use a key even if the optimizer doesn't think it'a good one.

Thanks in advance.

Regards,
Alexander Paperno.

Sir, your SQL statements are generating cartesian products, which 
force MySQL to examine all rows of one or both tables. This makes 
your indices useless, so MySQL doesn't use them.

And now for some nitpicking:
A KEY is not a key. A KEY in MySQL is a non-unique index that allows 
nulls. A key contains unique values and doesn't contain nulls.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
MySQL list magic words: sql query database

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: can not see data or tables in database

2001-05-03 Thread B. van Ouwerkerk


B. Perhaps a problem with rights.. (settings in phpmyadmin not being 
saved?)..
B. Not using phpmyadmin myself.. did read about it.

None of the programs on the web can access the mysql not just
phpmyadmin. It was working fine before yesterday and now it just wont
work. is there anything that I should check on the server or would it be
best to uninstall mysql and reinstall it.

Dunno.. What does the logfile say..

Remember to read the manual and this lists archive about trouble shooting.. 
If it's on windows the you should reboot.. solves almost any windooz problem.
There is a seachable manual at www.mysql.com

Or wait a while to see if any other suggestion comes up..

Bye,


B.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




How can I statup MYSQL???

2001-05-03 Thread Siomara Pantarotto

This is very basic I know but...

When I ran the costumized bugzilla appl. of my company I got this error:

Content-type: text/html
Software error:
Can't connect to database server. at globals.pl line 90.
For help, please send mail to the webmaster ([EMAIL PROTECTED]), giving 
this error message and the time and date of the error.

Since I am the one supposed to be the [EMAIL PROTECTED] send an e-mail 
to myself won't help at all.

I guess the mysql is not on. Can someone orient on how to get it started.

I follwed the manual but did not work.

I am under a linux box and the installation (although not made by me) 
followed the steps in the bugzilla guide.

Thanks in advance

Siomara
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: NULL value in VARCHAR fields

2001-05-03 Thread stefan mojschewitsch

[EMAIL PROTECTED] wrote:
 
 Stefan,
 
 When you insert a row in a table and you do not specify a value
 for a field, mySQL (and any other DBMNS?) will do the following:
 
 1. If field accepts null: it will set the value of that field
 to null
 
 2. If field DOES NOT accept null - no default value set: it will
 set the field's value as per primitive data type of field. If CHAR()
 it will set it to '', if date/datetime to -00-00, if numeric
 to 0. And so on.  And this is why you get the '' in your field
 when you do your insert.
 
 2. If field DOES NOT accept null - default value set:
 it set the field's value to the deafult.
 

i found this behaviour for date/datetime values in the documentation,
but 
nothing with char/varchar.

looks like there is no way to reject rows when forgot to set iuser :-(


your explanation should be pasted to the mysqlDocu

thx

stefan

 Christopher Lambrou,
 CGL Computer Services, Inc.
 Empire State Building,
 PMB 16J Suite 3304
 New York, NY 10118
 Tel: (212) 971-9723
 Fax: (212) 564-1135
 URL: http://www.cglcomputer.com
 Email: [EMAIL PROTECTED]
 
 On 5/03/2001 20:59:48, you said:
 hi list,
[snip]

-- 
st3V13h

nach diktat verreist

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Yahoo! Auto Response

2001-05-03 Thread jitenderjoshi

I recevied your mail

thanx 
Jitender Joshi




Original Message:


X-Track: 15: 40
Received: from web.mysql.com (192.58.197.162)
  by mta112.mail.yahoo.com with SMTP; 03 May 2001 14:28:44 -0700 (PDT)
Received: (qmail 28090 invoked by uid 7797); 3 May 2001 21:02:14 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 28070 invoked from network); 3 May 2001 21:02:12 -
Sender: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Date: Thu, 03 May 2001 23:04:43 +0200
From: stefan mojschewitsch [EMAIL PROTECTED]
Reply-To: mysqllist [EMAIL PROTECTED]
Organization: snafu
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.4 i686)
X-Accept-Language: en
MIME-Version: 1.0
T
_
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: NULL value in VARCHAR fields

2001-05-03 Thread stefan mojschewitsch



If you just reply to this message, and include the entire text of it in
the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. You have written the following:


hi, 

j.urban wrote:
 
 Your statement contradicts itself.  You can't have a constraint that
 forbids a column from accepting NULL values and then insert a default NULL
 value into that column...  Do you want the string 'null' to be inserted as
 the default?
 
iuser   varchar(255) NOT NULL DEFAULT 'NULL',
 
 If you want the column to accept NULLs, then:
 
iuser   varchar(255) DEFAULT NULL,
 
 Perhaps I'm not understanding your question...
i want to have inserts like 
insert into tel set tel='+49 815 4711', service=1;
to be rejected, and 
insert into tel set tel='+49 815 4711', service=1,iuser=USER();
accepted.

ttfn 

stefan

and to make the listFilter happy :-) database,sql,query

 
 On Thu, 3 May 2001, stefan mojschewitsch wrote:
 
  using DEFAULT USER(), would be nice, but only constants are allowed.
  to prevent inserting rows without iuser, i like to have this field
  with NOT NULL restriction and default value NULL.


-- 
st3V13h

nach diktat verreist

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Speed and querys

2001-05-03 Thread Amund Steinsvik

If I do a query in a table that contains 350.000 rows and each row is about
20 bytes (the tables total size is about 2MB) will a query take up a lot of
the processor-speed?

And how will the a query work on a web-page? Fast, or?

All the entrys in the table is int-variables.

-
amund

-
amund steinsvik
never.no - stortingsgt. 30b, 0161 oslo
m. 93 43 71 60 - p. 22 01 66 37 - f. 22 01 66 21
-





Re: Dual Processors and Threads?

2001-05-03 Thread Jeremy Zawodny

On Thu, May 03, 2001 at 12:12:35PM -0700, Bryan Coon wrote:

 Would someone briefly explain to me how MySQL uses threading in a
 multi-processor environment?

Yes.

 Currently I have a Dual 1gHz processor box running RedHat 7.1 with
 the smp kernel.  Does this automatically take care of things?

It does.

 Is mysql parallelized at all, or is this inherent in the threading?

The threads will run in parallel on the 2 CPUs.

 Insofar as optimization, are there any manual things I have to do to
 optimize mysql for a dual processor box?

I don't know of any... but there might be.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951

MySQL 3.23.29: up 120 days, processed 745,822,323 queries (71/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




HELP can not see data or tables in database

2001-05-03 Thread Richard Kurth

mysql running on cobalt raq4
have look through  the archives and looked at the manual

I can not access the databases from the web browser I get empty
databases

When in at telnet erased all the databases including mysql
ran mysql_install_db
logged back in with the web browser and the tables were there
stopped mysql
restarted mysql
logged back in with the web browser databases were there but no tables
I can see the tables if I telnet in and use mysql Command
What is going on have done this about 6 times


B. Perhaps a problem with rights.. (settings in phpmyadmin not being 
saved?)..
B. Not using phpmyadmin myself.. did read about it.

None of the programs on the web can access the mysql not just
phpmyadmin. It was working fine before yesterday and now it just wont
work. is there anything that I should check on the server or would it be
best to uninstall mysql and reinstall it.

B. Dunno.. What does the logfile say..

B. Remember to read the manual and this lists archive about trouble shooting.. 
B. If it's on windows the you should reboot.. solves almost any windooz problem.
B. There is a seachable manual at www.mysql.com

B. Or wait a while to see if any other suggestion comes up..

B. Bye,


B. B.


B. -
B. Before posting, please check:
B.http://www.mysql.com/manual.php   (the manual)
B.http://lists.mysql.com/   (the list archive)

B. To request this thread, e-mail [EMAIL PROTECTED]
B. To unsubscribe, e-mail [EMAIL PROTECTED]
B. Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Auto_increment or manual??

2001-05-03 Thread Patrick Calkins

Hello!
I have a database with about 10 tables in it. In every table I have a
RECORD_ID
field so that I can at least uniquely identify a row if I need to, also its
used in relationships. The question is should I use the AUTO_INCREMENT for
this, or should I manually generate this value, getting the next highest
number, then putting it in there. Is there any known replication problems if
I use AUTO_INCREMENT??? Would I be safer in just doing this manually myself
in my code?? This is going to be a web-based app, so many users will be
using the db at the same time.
Thanks!

Patrick

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Speed and querys

2001-05-03 Thread Jeremy Zawodny

On Thu, May 03, 2001 at 11:48:44PM +0200, Amund Steinsvik wrote:

 If I do a query in a table that contains 350.000 rows and each row
 is about 20 bytes (the tables total size is about 2MB) will a query
 take up a lot of the processor-speed?

Not if the table is indexed properly...
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951

MySQL 3.23.29: up 120 days, processed 746,098,885 queries (71/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: max FULLTEXT index size?

2001-05-03 Thread Vadim P.

Sergei,

I also have the same problem, but in my case the table size exceeds 2Gb,
average record size being around 50Kb. 

I'm running 3.23.37 (i686) on a dual PIII 866/ 1Gb RAM / 36Mb SCSI RAID5 w/
RedHat 7.1 (kernel 2.4). 

As I type this message, MySQL is still [fulltext-] indexing one of the tables,
for the 6th straight day now.

I'm getting desperate. 

What's the completion state of v.4.0?

Will it also improve query performance on big tables?

Thanks,
Vadim.


Sergei Golubchik wrote:
 
 Hi!
 
 On Apr 19, Braxton Robbason wrote:
  Hi all,
 
  I'm creating a fulltext index on a 400MB table, and the creation process
  gets very slow. It's fast for the first 50MB of the index, and then it
  grinds to what seemed like a halt after days.  My question is - is there
  anyone who's created fulltext indexes on this much data who can assure me
  that it's possible?
 
  Merge tables are not an option because you can't query a merge table on a
  fulltext index.
 
  thanks,
  Braxton
 
 
 Yes, FULLTEXT index works ok for 400 MB tables.
 In my tests FULLTEXT index was created (with CREATE INDEX)
 over 400 MB table in 15 minutes with new MySQL-4.0 code (not yet
 available, sorry).
 
 Everything works with 3.23 code too, but index creation
 is 50-100 times slower (and resulting index is ~10% bigger).
 
 Regards,
 Sergei
 
 --
 MySQL Development Team
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
___/
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Database size

2001-05-03 Thread Vadim P.

Erik,

You mentioned 40Gig files on Intel platform -

what OS/DBMS did you use then? How about the performance?

Thanks,
Vadim.

Terry Katz wrote:
 
 Erik,
   If your running Linux on an Intel machine (which I assume it is), then
 you've hit Linux's limit for IA32 and 2.2.x kernels .. If you want to go
 with sizes higher then 2gig you need to upgrade to a 2.4 kernel (and the
 latest GNU Libc) .. I've had (not mysql databases) 40gig files on Intel
 boxes work out fine ...
 
 -Terry
 
 
  Hi,
 
  I have a problem, my database has reached Linux Redhat 7.1
  max file size. (2147483647 Bytes). Does eny one know what i
  can do to make a lager database.  (lager
  filesystem)
 
  Thanks
  Erik Dhiin
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list 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
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Auto_increment or manual??

2001-05-03 Thread lists


Personnaly, i have found autoincrement fields to be rock solid.
I use'em all over the place on a 1 Gb database, web based.
Don't do it manually .  You'll end up doing the same thing 
that mysql gives you for free.   
 
Christopher Lambrou,
CGL Computer Services, Inc.
Empire State Building, 
PMB 16J Suite 3304 
New York, NY 10118
Tel: (212) 971-9723
Fax: (212) 564-1135
URL: http://www.cglcomputer.com
Email: [EMAIL PROTECTED]

On 5/3/2001 15:57:38, you said:
Hello!
I have a database with about 10 tables in it. In every table I have a
RECORD_ID
field so that I can at least uniquely identify a row if I need to, also its
used in relationships. The question is should I use the AUTO_INCREMENT for
this, or should I manually generate this value, getting the next highest
number, then putting it in there. Is there any known replication problems if
I use AUTO_INCREMENT??? Would I be safer in just doing this manually myself
in my code?? This is going to be a web-based app, so many users will be
using the db at the same time.
Thanks!

Patrick

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: Auto_increment or manual??

2001-05-03 Thread Patrick Calkins

This sounds encouraging, but are there any known problems with the MySQL
replication model currently available?? Would the slave servers have the
same auto_inc column attributes? Could this conflict somehow with the master
server??

Thanks for the quick reply!
Patrick

# Personnaly, i have found autoincrement fields to be rock solid.
# I use'em all over the place on a 1 Gb database, web based.
# Don't do it manually .  You'll end up doing the same thing 
# that mysql gives you for free.   
#  
# Christopher Lambrou,
# CGL Computer Services, Inc.
# Empire State Building, 
# PMB 16J Suite 3304 
# New York, NY 10118
# Tel: (212) 971-9723
# Fax: (212) 564-1135
# URL: http://www.cglcomputer.com
# Email: [EMAIL PROTECTED]
# 
# On 5/3/2001 15:57:38, you said:
# Hello!
# I have a database with about 10 tables in it. In every table I have a
# RECORD_ID
# field so that I can at least uniquely identify a row if I 
# need to, also its
# used in relationships. The question is should I use the 
# AUTO_INCREMENT for
# this, or should I manually generate this value, getting the 
# next highest
# number, then putting it in there. Is there any known 
# replication problems if
# I use AUTO_INCREMENT??? Would I be safer in just doing this 
# manually myself
# in my code?? This is going to be a web-based app, so many 
# users will be
# using the db at the same time.
# Thanks!
# 
# Patrick
# 
# -
# Before posting, please check:
#http://www.mysql.com/manual.php   (the manual)
#http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Could sombody please HELP me

2001-05-03 Thread Richard Kurth

I have a major problem could somebody take a seeress look at this

 mysql running on cobalt raq4
 I have looked through the archives and looked at the manual
 can not find anything to explain this
 nothing in the mysql log file
 I can not access the databases from the web browser I get empty
 databases

 Went in at telnet erased all the databases including mysql
 ran mysql_install_db
 logged back in with the web browser and the tables were there
 stopped mysql
 restarted mysql
 logged back in with the web browser databases were there but no tables
 I can see the tables if I telnet in and use mysql Command
 What is going on have done this about 6 times
 I really need to fix this
 Should I reinstall mysql?
 Should I shoot my server?



-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: specifying a delimiter

2001-05-03 Thread admin

Hi Paul,
Thanks for the help.  I was hoping to accomplish this with MySQl, but in the
end a script works just as good and this is just the first of several I am
using.  For what it's worth I ended up using sed.  Here is is if somone else
could use it:
sed s/  /|/g
   ^This is a tab, not spaces..

I am now confronted with another problem.  I need to also provide a CSV
version.
I need to use , seperated and  protected text. I have a copy of phpMyAdmin
that will
export to this format, but I need to use this at the shell.
I haven't yet dug into the script to se if this done with PHP or MySQL. I am
thinking it is probably done with PHP.
I noticed a mention of MySQL being able to set a delim in the docs but alas
they never actually say how.
Finally, I considered using awk for this but I am running into a problem
there as well
since 's are used to protect text.  For instance
awk '{print $1,$2} would print the fields correctly if not for
the  issue.

A shove in the right direction would sure  be appreciated.
Thanks,
-Eric


 -Original Message-
 From: Paul DuBois [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 02, 2001 9:38 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: specifying a delimiter


 At 9:11 PM -0500 5/2/01, Paul DuBois wrote:
 At 10:01 AM -0500 5/2/01, [EMAIL PROTECTED] wrote:
 Hi,
 Being new to MySQL, I am having a problem getting output from it to the
 shell that is formatted the way I need.  I need a table to be
 written to a
 file with a delimiter.
 something like :
 
 #!/bin/sh
 mysql -uroot -ptest database  sql
 
 Then I run that script like this:
 ./script.sh  output.txt
 
 Any delimiter is ok except for tab.  Is this possible?
 Thanks, in advance,
 
 
 Not with mysql by itself.  You can use sed or tr to change
 the tab in mysql's output to something else.  The syntax for
 tr varies among systems, but on one of my systems (RedHat),
 both of these work:
 
 mysql   sql | tr '\t' :
 
 mysql   sql | tr '\011' :
 
 --
 Paul DuBois, [EMAIL PROTECTED]

 Er, I should have been more specific and said both of these work to
 change tabs to colons.  Substitute whatever other character you wish.
 Sorry.

 --
 Paul DuBois, [EMAIL PROTECTED]

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: RE: Auto_increment or manual??

2001-05-03 Thread Chris Lambrou [CGL]


For replication, yes, there will be a problem, but 
this has anything to do with mysql. You'd have the same 
problem with a Sybase identity field replicated to another 
database server. 

A possible solution is this:
1. have a separate table for generating counter fields.

2. make the replicated table's primary key char

3. Identify each replicated server with a character. 
For example, we have a server in NY that's identified 
with an 'N' and one in Miami, that's an 'M'.

4. When inserting a record get the next counter 
value from the counter table, concatenate it with 
the server identifier and voila, a key that's unique 
across replicated servers. NY server ids will look like
N1000, N1001, N1002 and Miami M1000, M1001, M1002 and so on.

The downside: you have a char field to index and that 
ain't as fast as an index on a numeric field.

Christopher Lambrou,
CGL Computer Services, Inc.
Empire State Building, 
PMB 16J Suite 3304 
New York, NY 10118
Tel: (212) 971-9723
Fax: (212) 564-1135
URL: http://www.cglcomputer.com
Email: [EMAIL PROTECTED]

On 5/3/2001 18:03:17, you said:
This sounds encouraging, but are there any known problems with the MySQL
replication model currently available?? Would the slave servers have the
same auto_inc column attributes? Could this conflict somehow with the master
server??

Thanks for the quick reply!
Patrick

# Personnaly, i have found autoincrement fields to be rock solid.
# I use'em all over the place on a 1 Gb database, web based.
# Don't do it manually .  You'll end up doing the same thing 
# that mysql gives you for free.   
#  
# Christopher Lambrou,
# CGL Computer Services, Inc.
# Empire State Building, 
# PMB 16J Suite 3304 
# New York, NY 10118
# Tel: (212) 971-9723
# Fax: (212) 564-1135
# URL: http://www.cglcomputer.com
# Email: [EMAIL PROTECTED]
# 
# On 5/3/2001 15:57:38, you said:
# Hello!
# I have a database with about 10 tables in it. In every table I have a
# RECORD_ID
# field so that I can at least uniquely identify a row if I 
# need to, also its
# used in relationships. The question is should I use the 
# AUTO_INCREMENT for
# this, or should I manually generate this value, getting the 
# next highest
# number, then putting it in there. Is there any known 
# replication problems if
# I use AUTO_INCREMENT??? Would I be safer in just doing this 
# manually myself
# in my code?? This is going to be a web-based app, so many 
# users will be
# using the db at the same time.
# Thanks!
# 
# Patrick
# 
# -
# Before posting, please check:
#http://www.mysql.com/manual.php   (the manual)
#http://lists.mysql.com/   (the list 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




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: specifying a delimiter

2001-05-03 Thread Paul DuBois

Hi Paul,
Thanks for the help.  I was hoping to accomplish this with MySQl, but in the
end a script works just as good and this is just the first of several I am
using.  For what it's worth I ended up using sed.  Here is is if somone else
could use it:
sed s/  /|/g
^This is a tab, not spaces..

I am now confronted with another problem.  I need to also provide a CSV
version.
I need to use , seperated and  protected text. I have a copy of phpMyAdmin
that will
export to this format, but I need to use this at the shell.
I haven't yet dug into the script to se if this done with PHP or MySQL. I am
thinking it is probably done with PHP.
I noticed a mention of MySQL being able to set a delim in the docs but alas
they never actually say how.
Finally, I considered using awk for this but I am running into a problem
there as well
since 's are used to protect text.  For instance
awk '{print $1,$2} would print the fields correctly if not for
the  issue.

A shove in the right direction would sure  be appreciated.
Thanks,
-Eric

I guess in this case, I'd probably use a Perl DBI script and combine
it with a CSV module to do CSV export.  Something like what's shown
below.  You can use it, uh ... let's see, like this:

% mysql_csv_export.pl db_name.tbl_name




#! /usr/bin/perl -w
# mysql_csv_export.pl - generate CSV- or merge-format output from a query

# Usage: mysql_csv_export.pl [ options ]  csv_data_file

# Paul DuBois
# [EMAIL PROTECTED]
# 2000-12-28

#@ SETUP
use strict;
use DBI;
use Text::CSV_XS;
use Getopt::Long;
$Getopt::Long::ignorecase = 0; # options are case sensitive
$Getopt::Long::bundling = 1;   # allow short options to be bundled

# default connection parameters - all missing
my ($host_name, $password, $user_name, $db_name)
= (undef, undef, undef, undef);

my ($query, $tbl_name) = (undef, undef);
my ($merge) = undef;

GetOptions (
# =s means a string argument is required after the option
# :s means a string argument is optional after the option
host|h=s  = \$host_name, # MySQL server host
password|p:s  = \$password,  # MySQL password
user|u=s  = \$user_name, # MySQL user name
execute|e=s   = \$query, # query to execute
table|t=s = \$tbl_name,  # table to export
merge|m   = \$merge  # 
generate merge format
) or exit (1);  # no error message needed; GetOptions() prints its own

$db_name = shift (@ARGV) if @ARGV;

die You must specify a query or a table name\n
if !defined ($query)  !defined ($tbl_name);
die You cannot specify both a query and a table name\n
if defined ($query)  defined ($tbl_name);

# If table name was given, expand it to a query that selects entire table
$query = SELECT * FROM $tbl_name if defined ($tbl_name);

$merge = defined ($merge);
#@ SETUP

# solicit password if option specified without option value
if (defined ($password)  !$password)
{
# turn off echoing but don't interfere with STDIN
open (TTY, /dev/tty) or die Cannot open terminal\n;
system (stty -echo  /dev/tty);
print STDERR Enter password: ;
chomp ($password = TTY);
system (stty echo  /dev/tty);
close (TTY);
print STDERR \n;
}

#@ CONNECT
# Construct data source name and connect to the server.  The database
# name comes from the command line.  Client connection parameters are
# assumed to be found in one of the standard option files.

my $dsn = DBI:mysql:;
$dsn .= ;database=$db_name if $db_name;
$dsn .= ;host=$host_name if $host_name;
# read client parameters from standard option files
$dsn .= ;mysql_read_default_group=client;

my $dbh = DBI-connect ($dsn, $user_name, $password, {RaiseError = 1});
#@ CONNECT

# By specifying the eol character, $csv will add newlines for us automatically
#@ CREATE_CSV
my ($csv) = Text::CSV_XS-new ({ eol = \n });
#@ CREATE_CSV

# Run query to dump all data contained in the table.  The first line of
# output must list the names of the columns.  These are available in the
# array pointed to by $sth-{NAME} after calling execute().

#@ EXECUTE_AND_PRINT_COLUMN_NAMES
my $sth = $dbh-prepare ($query);
$sth-execute ();
if ($merge) # write line of 
column names for merge format
{
$csv-combine (@{$sth-{NAME}}) or die cannot process column names\n;
print $csv-string ();
}
#@ EXECUTE_AND_PRINT_COLUMN_NAMES
#@ EXTRACT
my $count = 0;
while (my @val = $sth-fetchrow_array ())
{
++$count;
$csv-combine (@val)
or die cannot process column values, row $count\n;
print $csv-string ();
}
#@ EXTRACT
$sth-finish ();

$dbh-disconnect ();

exit (0);

-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
  

RE: Auto_increment or manual??

2001-05-03 Thread Chris Bolt

http://www.mysql.com/doc/R/e/Replication_Features.html

Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID, and
TIMESTAMP values.

 This sounds encouraging, but are there any known problems with the MySQL
 replication model currently available?? Would the slave servers have the
 same auto_inc column attributes? Could this conflict somehow with
 the master
 server??


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: MYSQL C API

2001-05-03 Thread Paul DuBois

At 8:13 PM +0100 5/3/01, VVM Ravikumar Sarma Chengalvala wrote:
Hi,
1.
I am using C_API for accessing data from MYSQL.
2.
mysql_query() function returns the following values:
0 if the query is successful
-1 if the query fails.

No.  It returns 0 if the query is successful and NON-ZERO if it
fails.  You cannot count on the non-zero value being -1.

3.
At the same time mysql-C_API documentation specifies
that it returns a non zero number if query is a
failure.Does the function return any other values
other than -1 if the query fails?

Don't test for -1.  Test for non-zero.


4.
If I use the mysql_query() for INSERT or UPDATE
statements I am facing the following problem:
If the database column value I am trying to update is
the same as the the value already existing in the
database,then the mysql_query() returns  0 and the
mysql_affected_rows() returns zero.

It will be good if mysql_query either returns -1  for
this case as the value being updated is same as that
of existing one.

Try setting the CLIENT_FOUND_ROWS option in your mysql_real_connect()
call when you connect to the server and see what happens..


Regards,
Ravi

-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




MS Access to Mysql

2001-05-03 Thread Taing Nguon

Dear Sir/Madam

I just know that there is a tool to convert database from MS Access
to Mysql, But I do not know the URL of this tool. Could you tell me this
URL? Thanks

Regards

Taing Nguon



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Doubt

2001-05-03 Thread Paul DuBois

At 8:33 AM +0530 5/3/01, Sreevatsava Varada wrote:
Hi,

I've recently moved from MS-SQL Server 7.0 to mySQL. In MSSQL I 
used to give the default value 'GetDate()' for a field in the 
database with the datetime datatype. In mySQL I tried using Now(). 
But when I insert a new row the datetime field is taking :00:00 
00:00:00 value. Please let me know what should I give as the default 
value for 'record_date' field (of datetime datatype) so that it 
takes the value returned by Now() function when a new row is 
inserted using php script.

Default values must be constants in MySQL.  When you create a new record,
initialize your date field to NOW() explicitly.


Thanks.


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Install problem

2001-05-03 Thread Dane Knudson

I have installed MySQL by running  mysql_install_db after completing the
installation of RH Linux 7.1 from scratch.  The file seems to indicate
that it installs OK.  When I try to start the server from the command
line it get a message that says Starting mysqld daemon with databases
from /var/lib/mysql, next line gives that date and time and says
mysqld ended.  I then have to hit enter to get a prompt back.

If I try to use the mysqladmin version commend I get the following
error:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket:
'/var/mysql/mysqld.sock' exists!

The file mysql.sock is in the right place but I can't open the file even
as root.  I have also looked for an error log, but haven't found one
yet.

Any help would be appreciated.

The machine does have two NIC's, though one has been disabled.
Dane Knudson
Account Manager - Technical
Freedom Technologies
Level 20, Tower 2
500 Oxford Street
Bondi Junction NSW 2022
Australia
Tel: +61 (0) 2 9386-1777
Fax: +61 (0) 2 9386-1577
Mobile: 0417 252697
E-mail:[EMAIL PROTECTED]
www.freedomtechnologies.com 





Re: How to re-create mysql.sock

2001-05-03 Thread Paul DuBois

At 4:45 AM -0700 5/3/01, Arthur Smith wrote:
Hi,

My mysql.sock file was deleted. How do I, either recreate it myself, or
have mysql do it for me.

Art

Restart the server.  It will recreate the socket for you.

-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




space in column name and table name, standard?.

2001-05-03 Thread Mohamad Ilhami

Hi,

I think mysql support space in column name and table name, using left
tick  `  like

create table `my foo` (`foo column` char(10) primary
key);

But phpmyadmin is broken with this. So, What about the standard?

TIA

-ilham-


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: Auto_increment or manual??

2001-05-03 Thread Patrick Calkins

Thank you Chris with this info! This will greatly help me out, so as I see
it now, there is absolutely no advantage to generating your own unique
numbers manually - just let MySQL do it for you am I correct in this
assumption?

Again, thanks!
Patrick

# http://www.mysql.com/doc/R/e/Replication_Features.html
# 
# Replication will be done correctly with AUTO_INCREMENT, 
# LAST_INSERT_ID, and
# TIMESTAMP values.
# 
#  This sounds encouraging, but are there any known problems 
# with the MySQL
#  replication model currently available?? Would the slave 
# servers have the
#  same auto_inc column attributes? Could this conflict somehow with
#  the master
#  server??
# 
# 
# -
# Before posting, please check:
#http://www.mysql.com/manual.php   (the manual)
#http://lists.mysql.com/   (the list 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
# 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Obtaining warnings

2001-05-03 Thread Paul DuBois

At 9:32 AM -0400 5/3/01, Terry Gliedt wrote:
My apologies for even needing to ask this question, but I've
spend hours combing through the docs and have not figured this
out. :-(

The problem is basically how to obtain warnings and the question
comes in a couple of flavors:

For example if one does update tbl set my_int='21.3 a' where
my_key=4 (where my_int = int(11)) my_int will be set to 21 and a
warning is generated. Try as I might, I cannot see how to get the
mysql client to show these to me.

Issuing the same command in PHP4, I can not see an interface
which will return me an indicator that a warning was generated or
how to fetch the warning message.

Doing an INSERT where data is converted/truncated apparently
generates no warnings (as indicated in the mysql client), but
surely MYSQL will generate a warning when the data is converted.

It doesn't.


Lastly, can I set some flag so that MYSQL is more strict about
this stuff? Seems to me that my_int=21.3 isn't correct in some
cases and I should at least get a warning and even better be able
to force MySQL to reject this as incorrect.

The philosophy is something along the lines of if you try to insert
garbage into your database, MySQL will convert it as well as possible,
but you deserve what you get. :-)

If you want additional strictness, you'll need to check your data
before you try to toss it into your database.


TIA

--
=
Terry Gliedt [EMAIL PROTECTED]   http://www.hps.com/~tpg/
Biostatistics, Univ of Michigan  Personal Email:  [EMAIL PROTECTED]


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Column Privilege Question

2001-05-03 Thread Paul DuBois

At 11:26 AM -0400 5/3/01, David C. Troy wrote:
Hi, List!

I have a table.  The table has columns A, B, and C.

I want User1 to be able to read columns A,B, and C, but I want User2 to
only be able to read column A.

Is this possible using MySQL columns_priv security?

Yes, use the GRANT statement.  Something like this:

GRANT SELECT (A,B,C) ON db_name.tbl_name TO user1@host ...
GRANT SELECT (B) ON db_name.tbl_name TO user2@host ...


Thanks,
Dave

=
David C. Troy   [[EMAIL PROTECTED]]   410-544-6193 Sales
ToadNet - Want to go fast?410-544-1329 FAX
570 Ritchie Highway, Severna Park, MD 21146-2925  www.toad.net


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: problems downloading the Solaris version of the MySQL GUI

2001-05-03 Thread Paul DuBois

At 11:42 AM -0400 5/3/01, John Silva wrote:
Hi,

When I try to download the Solaris version of the mySQL GUI all I get is a
screen full of control characters.

Your browser doesn't recognize that it's s'posed to download the file instead
of displaying it.  Try shift-click or control-click or whatever it is
your browser needs so that it'll show the menu allowing you to select
save link to disk explicitly.


I am attempting this from the following web page:
www.mysql.com/downloads/gui-clients.html

Any help you can give would be appreciated.

John Silva
Senior Engineer
Mesh Networks, Inc.
(407) 659-5323
(407) 659-5301
http://www.MeshNetworks.com


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Apache/PHP/MySQL - processes multiply until about 30, then doom

2001-05-03 Thread Paul DuBois

At 9:35 AM -0700 5/3/01, Scott Baker wrote:
That's very odd...  Technically pconnect should be a lot faster, not 
sure exactly why it's not.  The other thing you might want to look 
at is the MySQL idle timeout (or something like that).  That's how 
long your pconnects stay connected if they don't transfer any 
traffic.  I think it defaults to 30 minutes, which is probably ok. 
Depending on the traffic of your site.

For most databases pconnect() is faster.  But it turns out MySQL is so
fast at making connections that pconnect() doesn't give much advantage,
if any.  So regular connect() can be advantageous in terms of not leaving
as many connections open.


At 09:27 AM 5/4/2001 -0700, Gary Bickford wrote:
Thanks for the reply!, Scott!  I considered changing the number of
allowed connections but I figured this would just defer the problem,
as the root problem was the increasing number of connections.

Last night I went through the entire website looking for code that
used mysql_pconnect() in PHP, which provides 'persistent'
connections.  I had thought before that I had caught all of these but
found another 40 or so files that had either been missed or magically
appeared.  I converted all those to standard mysql_connect() calls
and ran a stress test all night - using wget to fetch 1000 pages as
fast as possible from a neighboring machine, over and over.

On the server I have a loop running like this:

N=1; while [ $N -ge 1 ]; do ps aux|grep mysql |wc; sleep 5; done

which shows the number of mysql processes every five seconds or so.
I had run this test earlier and over two hours' time the number of
connections increased to about 22.  After changing all the
mysql_pconnect() calls to mysql_connect(), and leaving the wget job
running all night (the 'at' job I set up to kill it while I was
sleeping failed), the number of connections was still at 5.  This
involved fetching almost 400,000 pages.

So it appears that the increasing number of connections has to do
with some persistent connections never being closed, although PHP
thought they were.  Determining if this is a PHP, MySQL, Apache or
Redhat problem is beyond my desired effort and code experience level.
At least all parts are open source!!

Interestingly, the rate at which wget could fetch pages almost
doubled while the server's CPU load dropped from 86% to 77%, which
bears out the experience of some others on various PHP lists. Some
users get dramatic improvements using mysql_pconnect(), others don't.

I will now make another pass at a couple of pages that seemed to be
the focus of the errors that users received, to see if I can improve
the error handling (and maybe mail myself a message!).  For now, I'm
calling the bug worked-around.

GB

On Wednesday 02 May 2001 04:43 pm, Scott Baker opined:
  You can look into increasing the number of allowed connections that
  MySQL will accept... are you using connect or pconnect?

  At 04:23 PM 5/3/2001 -0700, Gary Bickford wrote:
  Repost - nobody has any ideas?  I've run some stress tests,
   sending several thousand page requests, and the number of mysql
   processes goes up and down but over time continues to rise.  It's
   up to about 22 now.  When it gets to about 30, every request from
   the web server will be will fail.
  
  Could some of these processes be threads that are orphaned for
   some reason (perhaps Apache continuing to expire its own
   processes?) and hang around, idle?  I speculate that there is
   some maximum number of processes and finally MySQL can't won't
   start another thread/process. GB
  
  On Tuesday 01 May 2001 05:26 pm, Gary E Bickford opined:
I am running MySQL (3.23.27 at this point) with Apache1.3.12
and PHP3 on a PC running Redhat 6.0.  My problem has survived
upgrades of all components from earlier versions.
   
Every PHP page has at least one query to a MySQL database for
 session tracking (home-rolled code, not PHPLib or anything off
the shelf)  There are also on some pages other queries, to a
different database, same server (same mysql).  Most of the
latter are Phorum queries.
   
Periodically the number of mysql instances that show up in 'ps
auxww'1 gets to about 30 and mysql no longer listens to
PHP/Apache. However I can still use the mysql shell with no
problem, so MySQL is still running but can't hear anything from
PHP.
   
The only way to fix it is to run 'apachectl restart' or
equivalent. 'graceful' doesn't do it.  Im not sure if
restarting MySQL instead works.  After Apache is restarted, the
mysql processes are down to 3 and everybody's happy again.
   
I have been trying for months to figure out what is happening
and how to fix it.  I had heard at one point that there was a
problem with Redhat 5.2 kernel that caused a similar problem,
but I upgraded that but no joy.
   
Temporarily I have built a kluge cron job that restarts apache
every so often, which worked as long 

Re: NULL value in VARCHAR fields

2001-05-03 Thread Paul DuBois

At 8:21 PM +0200 5/3/01, stefan mojschewitsch wrote:
hi list,

i have a problem with DEFAULT NULL value in a varchar field.
mysql is version 3.23.33.

i want to have an user field in a row, to see who has created the row.

   create table minidb.tel (
   id  int UNSIGNED NOT NULL AUTO_INCREMENT,
   tel char(16) NOT NULL,
   service char(1) BINARY,
   idate   timestamp(14) NOT NULL,
   iuser   varchar(255) NOT NULL,
   primary key (id, tel, idate)
   ); 

using DEFAULT USER(), would be nice, but only constants are allowed.
to prevent inserting rows without iuser, i like to have this field
with NOT NULL restriction and default value NULL.

That's a contradiction, isn't it?  It doesn't make sense to me.


when inserting a row with
   insert into tel set tel='+49 174 92932000', service=1;

there will be a record with iuser = ''.
i thought the meaning of NOT NULL is to reject inserting rows with
iuser as NULL.

That's right.  But the additional effect, which you may not be aware of,
is that it also changes the default value for the column from NULL
to the empty string.  The practical effect of this for you is that
if you don't name the user in the INSERT statement, the column will
be assigned its default value (as always), but now the default is
the empty string.

If there some reason you're not checking for a missing value yourself?


the line
   iuser   varchar(255) NOT NULL DEFAULT NULL,
will rejected with an errormsg.

thx in advance for your help

stefan

--
st3V13h

nach diktat verreist


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: MS Access to Mysql

2001-05-03 Thread Paul DuBois

At 8:37 AM +0700 5/4/01, Taing Nguon wrote:
Dear Sir/Madam

 I just know that there is a tool to convert database from MS Access
to Mysql, But I do not know the URL of this tool. Could you tell me this
URL? Thanks

Check this page and look in the converters section.  Might be what you
want:

http://www.mysql.com/downloads/contrib.html


Regards

Taing Nguon


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: Install problem

2001-05-03 Thread Rolf Hopkins

These are usually FAQs but your getting both which seems strange. mysqld
ended usually means that mysqld has already started but the other says it's
not.  What does ps -ef | grep mysql give you?  Also check your
permissions.  Log files should be located in /var/lib/mysql

- Original Message -
From: Dane Knudson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 9:59
Subject: Install problem


I have installed MySQL by running  mysql_install_db after completing the
installation of RH Linux 7.1 from scratch.  The file seems to indicate
that it installs OK.  When I try to start the server from the command
line it get a message that says Starting mysqld daemon with databases
from /var/lib/mysql, next line gives that date and time and says
mysqld ended.  I then have to hit enter to get a prompt back.

If I try to use the mysqladmin version commend I get the following
error:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket:
'/var/mysql/mysqld.sock' exists!

The file mysql.sock is in the right place but I can't open the file even
as root.  I have also looked for an error log, but haven't found one
yet.

Any help would be appreciated.

The machine does have two NIC's, though one has been disabled.
Dane Knudson
Account Manager - Technical
Freedom Technologies
Level 20, Tower 2
500 Oxford Street
Bondi Junction NSW 2022
Australia
Tel: +61 (0) 2 9386-1777
Fax: +61 (0) 2 9386-1577
Mobile: 0417 252697
E-mail:[EMAIL PROTECTED]
www.freedomtechnologies.com





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: Auto_increment or manual??

2001-05-03 Thread Chris Bolt

Yes, I know from experience, it's the best way to do it.

And if you need to get the number generated by an auto_increment column in
an insert, you can use last_insert_id() (or mysql_insert_id() with php).

 Thank you Chris with this info! This will greatly help me out, so as I see
 it now, there is absolutely no advantage to generating your own unique
 numbers manually - just let MySQL do it for you am I correct in this
 assumption?


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: space in column name and table name, standard?.

2001-05-03 Thread Rolf Hopkins

While you can use space in column names, it is not a very good idea as some
systems can't handle spaces.  Your just begging for trouble if you do use
space. Better to use underscores instead.

- Original Message -
From: Mohamad Ilhami [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 10:13
Subject: space in column name and table name, standard?.


 Hi,

 I think mysql support space in column name and table name, using left
 tick  `  like

 create table `my foo` (`foo column` char(10) primary
 key);

 But phpmyadmin is broken with this. So, What about the standard?

 TIA

 -ilham-


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list 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


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: Doubt

2001-05-03 Thread Chris Bolt

 I've recently moved from MS-SQL Server 7.0 to mySQL. In MSSQL I 
 used to give the default value 'GetDate()' for a field in the 
 database with the datetime datatype. In mySQL I tried using Now(). 
 But when I insert a new row the datetime field is taking :00:00 
 00:00:00 value. Please let me know what should I give as the default 
 value for 'record_date' field (of datetime datatype) so that it 
 takes the value returned by Now() function when a new row is 
 inserted using php script.
 
 Default values must be constants in MySQL.  When you create a new record,
 initialize your date field to NOW() explicitly.

Or make a TIMESTAMP column and omit it from the field list of your INSERT.

More info can be found at http://www.mysql.com/doc/D/A/DATETIME.html

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




RE: specifying a delimiter

2001-05-03 Thread Don Read


On 04-May-01 [EMAIL PROTECTED] wrote:

random snipage ahead

 Hi Paul,
 
 I am now confronted with another problem.  I need to also provide a CSV
 version.
 I need to use , seperated and  protected text. I have a copy of phpMyAdmin
 that will
 export to this format, but I need to use this at the shell.
 I haven't yet dug into the script to se if this done with PHP or MySQL. I am
 thinking it is probably done with PHP.
 I noticed a mention of MySQL being able to set a delim in the docs but alas
 they never actually say how.
 Finally, I considered using awk for this but I am running into a problem
 there as well
 since 's are used to protect text.  For instance
 awk '{print $1,$2} would print the fields correctly if not for
 the  issue.
 
 A shove in the right direction would sure  be appreciated.

I'm not Paul, but here's my shove:

localhost.dread$ cat csvdmp
#!/bin/sh
if [ $# -eq 2 ]
then
mysqldump -t $1 $2 | grep INSERT | \
 sed 's/^INSERT .* VALUES (//g' | \
 sed 's/);//g'
exit $?
fi

me=`basename $0`
echo usage: $me database table 
exit 2



most import utilities can handle single quotes.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Re: space in column name and table name, standard?.

2001-05-03 Thread Van

Rolf Hopkins wrote:
 
 While you can use space in column names, it is not a very good idea as some
 systems can't handle spaces.  Your just begging for trouble if you do use
 space. Better to use underscores instead.
 
 - Original Message -
 From: Mohamad Ilhami [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 04, 2001 10:13
 Subject: space in column name and table name, standard?.
 
  Hi,
 
  I think mysql support space in column name and table name, using left
  tick  `  like
 
  create table `my foo` (`foo column` char(10) primary
  key);
 
  But phpmyadmin is broken with this. So, What about the standard?
 
  TIA
 
  -ilham-

Think of it this way.  If spoken languages were allowed to use spaces in
individual words, would we be able to process communications as effectively and
quickly?  

Perhaps, if a space is desired in a column name in a table, an underscore would
suffice, i.e.:  My_Column, instead of `My Column`.  Would make the statement: 
Please insert $1MM into My_Account more understandable and efficient to
process.

Spaces, should be avoided in `Column Names` and in File\ Names.

Regards,
Van
-- 
=
Linux rocks!!!   http://www.dedserius.com
=

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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




Question.

2001-05-03 Thread Peter Zaitsev

Hello mysql,

  Any ideas how this may happen:
  Mysql version 3.23.37, auto recovery turned on.

mysql check table layers_st50.g00stat_sitepaths;
+---+---+--++
| Table | Op| Msg_type | Msg_text   |
+---+---+--++
| g00stat_sitepaths | check | warning  | Table is marked as crashed |
| layers_st50.g00stat_sitepaths | check | status   | OK |
+---+---+--++
2 rows in set (24.32 sec)

Also I would report the folowing problem with auto recovery:

If auto recovery fails because of out of disk space problem, the
behavior is not mysql default (to wait until there are some space) but
the table becomes dammaged and is not retried to be recovered even
disk space is freeed.





-- 
Best regards,
 Peter  mailto:[EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list 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