Re: where is the mistake in this SQL statement?

2005-11-15 Thread Peter Matulis

--- Joerg Bruehe [EMAIL PROTECTED] wrote:

 Sujay Koduri wrote:
  You havent specified the datatype for the column 'id'.
 
 Right, this should be fatal.
 But I also take issue with other parts:
 

  
  CREATE TABLE users (
id PRIMARY KEY,
priority integer NOT NULL DEFAULT '7',
policy_id  integer unsigned NOT NULL DEFAULT '1',
 
 Even though this may work, it is wrong IMNSHO:
 You set character strings as default values for numeric columns!
 Your strings consist of digits only, so they can (and will) be
 converted 
 to numbers, but IMO you should not make use of that.

I don't understand.  I have integer there.  Where is character strings?






__ 
Find your next car at http://autos.yahoo.ca

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



frustration building

2005-11-15 Thread Peter Matulis
I am still trying to create a schema.  I do not get errors when I do
so but in phpmyadmin I get these types of warning for five tables:

table 1:
UNIQUE and INDEX keys should not both be set for column `email`

table 2:
More than one INDEX key was created for column `mail_id`
More than one INDEX key was created for column `rid`

table 3:
More than one INDEX key was created for column `sid`

table 4:
More than one INDEX key was created for column `preference`

table 5:
UNIQUE and INDEX keys should not both be set for column `email`


Should I be worried about this?






__ 
Find your next car at http://autos.yahoo.ca

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



Re: frustration building

2005-11-15 Thread Peter Matulis

--- [EMAIL PROTECTED] wrote:

 Peter Matulis [EMAIL PROTECTED] wrote on 11/15/2005 02:47:56
 PM:

  but in phpmyadmin I get these types of warning for five
 tables:
  
  table 1:
  UNIQUE and INDEX keys should not both be set for column `email`
  
  table 2:
  More than one INDEX key was created for column `mail_id`
  More than one INDEX key was created for column `rid`
  
  table 3:
  More than one INDEX key was created for column `sid`
  
  table 4:
  More than one INDEX key was created for column `preference`
  
  table 5:
  UNIQUE and INDEX keys should not both be set for column `email`
  
  
  Should I be worried about this?
  
  
 
 Only if you care about the speed of your INSERTs and how much
 space your 
 data+indexes take on your hard drives. If you don't care about
 either of 
 those performance factors, then no, you don't need to worry about
 those 
 warnings.

But what are the advantages?  If none, why is such a schema proposed?






__ 
Find your next car at http://autos.yahoo.ca

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



where is the mistake in this SQL statement?

2005-11-14 Thread Peter Matulis
{ this is a resend, forgot subject in original posting }

Hello, I am using MySQL 4.0.24 on OpenBSD 3.8.

I am having difficulty creating a SQL schema.  My attempts contain
lines like:

CREATE TABLE users (
  id PRIMARY KEY,
  priority integer NOT NULL DEFAULT '7',
  policy_id  integer unsigned NOT NULL DEFAULT '1',
  email varchar(255) NOT NULL,
  fullname varchar(255) DEFAULT NULL,
  local char(1),
  KEY email (email)
);

Resulting in this error:

ERROR 1064 at line 1: You have an error in your SQL syntax.  Check
the manual that corresponds to your MySQL server version for the
right syntax to use near 'PRIMARY KEY,  
  priority   integer  NOT NULL DEFAULT '7', 

I think there is an incompatibility between my server version and
this statement but I can't figure out what it is.  What should be
changed near PRIMARY KEY?  This is for Spamassassin and amavisd-new.






__ 
Find your next car at http://autos.yahoo.ca

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



Re: MYSQL Startup Help!

2002-07-03 Thread Peter Matulis

How did you install MySQL?  Package, source, binary?

*** REPLY SEPARATOR  ***

On 7/3/2002 at 3:06 PM Rahadul Kabir wrote:

hi
 im getting the  message :
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)
 when i try to connect to mysql

Then I tried to run daemon

[root /root]# /usr/sbin/mysqld
Fatal error: Please read Security section of the manual to find out
how to run
 mysqld as root!
020702 13:25:41  Aborting
020702 13:25:41  /usr/sbin/mysqld: Shutdown Complete

[root /root]# /usr/sbin/mysqld start
/usr/sbin/mysqld: Too many parameters
/usr/sbin/mysqld  Ver 3.23.51 for pc-linux-gnu on i686
Use '--help' or '--no-defaults --help' for a list of available options


can someone please help me out. I have just installed mysql 3.23.51 on
my RaQ System. Thanks

rahad




-
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: mysql error!!!

2002-07-03 Thread Peter Matulis

start the server before connecting to it.

*** REPLY SEPARATOR  ***

On 7/3/2002 at 3:24 PM Rahadul Kabir wrote:

[root /root]# mysqladmin -u root password '30waverly'
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/lib/mysql/mysql.sock' ex
ists!
[root /root]#

I can't connect to mysql. does anyone know whats te problem. 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




Odd problem issueing commands at the console

2001-06-26 Thread Peter Matulis

Just installed 3.23.37 on Red Hat 7.0 from source.  I've done this a few
times but this time I encountered a mysterious problem.

a) server is started and runs under my designated user (mysqladm:mysqlgrp)
b) /usr/local/mysql/bin is in PATH of both root and mysqladm
c) using either of these users, when I issue a mysql command (here
mysqlshow):

mysqlshow: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111)

d) when I cd to /usr/local/mysql/bin and issue the command as shown it
succeeds:

$ ./mysqlshow 
+-+
|  Databases  |
+-+
| mysql   |
| test  |
+--+

What's going on here?

Peter Matulis

-
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