Re: Converting password to old format.

2006-03-24 Thread Ady Wicaksono

AFAIK,

PASSWORD() or OLD_PASSWORD() is one way function, it means in math if 
you do f(x) = y, you never know x, all you now is the result of f(x) ~ y


Moreover, do you have a problem with new password format?


Eugene Kosov wrote:


Hi, everyone!

I have transfer user's database and grants from one mysql server 
(4.1.15) to an older one (4.0.26). I don't know user's password and 
have only it's hash. How can I convert hashed password stored in 
mysql.user.password field to the 4.0 format? Is there something 
similar to OLD_PASSWORD(), but with 4.1's hashed password as a parameter?


Any links, man references, etc. are welcome!

Thanks in advance!

--
Regards,
Eugene Kosov.





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



Re: Converting password to old format.

2006-03-24 Thread Eugene Kosov
Yes I know restoring plain password from it's hash is impossible (at 
least in theory ;)) but I don't need password itself.


I thought if we know f1(x) (PASSWORD) and f2(x) (OLD_PASSWORD) we 
possibly can get such f(x) that  will make expression f2(x) = f(f1(x)) 
truth for every x.


I haven't any problem with new password format, I just have to move some 
databases from one server to another.




Ady Wicaksono wrote:

AFAIK,

PASSWORD() or OLD_PASSWORD() is one way function, it means in math if 
you do f(x) = y, you never know x, all you now is the result of f(x) ~ y


Moreover, do you have a problem with new password format?


Eugene Kosov wrote:


Hi, everyone!

I have transfer user's database and grants from one mysql server 
(4.1.15) to an older one (4.0.26). I don't know user's password and 
have only it's hash. How can I convert hashed password stored in 
mysql.user.password field to the 4.0 format? Is there something 
similar to OLD_PASSWORD(), but with 4.1's hashed password as a parameter?


Any links, man references, etc. are welcome!

Thanks in advance!

--
Regards,
Eugene Kosov.







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



Re: Converting password to old format.

2006-03-24 Thread Ady Wicaksono

Sorry,

I have no idea about that :)

Eugene Kosov wrote:

Yes I know restoring plain password from it's hash is impossible (at 
least in theory ;)) but I don't need password itself.


I thought if we know f1(x) (PASSWORD) and f2(x) (OLD_PASSWORD) we 
possibly can get such f(x) that  will make expression f2(x) = f(f1(x)) 
truth for every x.


I haven't any problem with new password format, I just have to move 
some databases from one server to another.




Ady Wicaksono wrote:


AFAIK,

PASSWORD() or OLD_PASSWORD() is one way function, it means in math if 
you do f(x) = y, you never know x, all you now is the result of f(x) ~ y


Moreover, do you have a problem with new password format?


Eugene Kosov wrote:


Hi, everyone!

I have transfer user's database and grants from one mysql server 
(4.1.15) to an older one (4.0.26). I don't know user's password and 
have only it's hash. How can I convert hashed password stored in 
mysql.user.password field to the 4.0 format? Is there something 
similar to OLD_PASSWORD(), but with 4.1's hashed password as a 
parameter?


Any links, man references, etc. are welcome!

Thanks in advance!

--
Regards,
Eugene Kosov.












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



Re: mysqld_safe and timezone settings

2006-03-24 Thread Dominik Klein
or what I although could do to 
start my Server in another than the SYSTEM timezone?
I use the MySQL 5.0.18 Server on a Suse Linux 10.0 


From:
http://dev.mysql.com/doc/refman/5.0/en/timezone-problems.html

You can set the time zone for the server with the 
--timezone=timezone_name  option to mysqld_safe. You can also set it by 
setting the TZ environment variable before you start mysqld.


So try inserting
export TZ=America/Argentina/Mendoza
to the beginning of your mysql-(rc)startscript.

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



Information schema for pages ?

2006-03-24 Thread Barbara Deaton
All,

I've searched the help and even found this very useful link 
http://www.xcdsql.org/Misc/MySQL_INFORMATION_SCHEMA.html regarding all the 
Information schemas.

What I can find is information regarding some way to retrieve the number of 
pages used to store an index.  Perhaps this is because this type of information 
doesn't make sense for MySQL like it does MS SQL Server?

Can someone comment?

Thanks!
Barbara

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



Foreign keys

2006-03-24 Thread João Cândido de Souza Neto
Hello everybody.

I'm using php 4.4 and mysql 5.0 and i'm having the bellow issue:

I've a group table and a system table, bellow this i have a group_system
table that has a foreign key to group table and to system table. When a
tried to delete one register in the group_system table, it gives me the
bellow error:

Cannot add or update a child row: a foreign key constraint fails
(`buffets/group_system`, CONSTRAINT `fk_group_group_sistema` FOREIGN KEY
(`idgrp`) REFERENCES `group` (`idgrp`) ON DELETE CASCADE ON

Anyone knows to tell me wath's happening here?

Thanks for all tips.



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



How to take dump of a query instead of table / database

2006-03-24 Thread abhishek jain
Dear Friends,
I need to take the backup of a query, is it possible.
If yes how.
--
Regards
Abhishek jain
www.smsengine.co.uk


Re: How to take dump of a query instead of table / database

2006-03-24 Thread Dominik Klein

I need to take the backup of a query, is it possible.
If yes how.


man mysqldump:
-w|--where=
dump only selected records; QUOTES mandatory!

Regards,
Dominik

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



Re: How to take dump of a query instead of table / database

2006-03-24 Thread Pure Web Solution

you can manipulate mysqldump using the where clause (check the man)

You might find the following usefull, but would not be so good for restoring.

from the command line
 
mysql --database=db_name --execute=select * from users -u username
-ppassword  output.file

Pure Web Solution
http://www.purewebsolution.co.uk
PHP, MYSQL, Web Design  Web Services



abhishek jain [EMAIL PROTECTED] wrote:

 Dear Friends,
 I need to take the backup of a query, is it possible.
 If yes how.
 --
 Regards
 Abhishek jain
 www.smsengine.co.uk
 

Pure Web Solution
http://www.purewebsolution.co.uk
PHP, MYSQL, Web Design  Web Services



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



Is there anyway to return an array?

2006-03-24 Thread David Godsey
This is not a typically thing that anyone would expect Mysql to do,
however with the application I am writing it would be helpful.  Here goes:

The application stores raw data from a satellite, along with a
configuration of how to read the data.  So of the data types are Int
Arrays and Float arrays.  Each can have conversion parameters to apply to
the data.  So I have to loop through this raw data, converting to the
correct type, and applying some convertion parameter (say multiply by .26
for a float).

So I will pass a function (a UDF function) a binary string, perform some
conversion, then I would like to return it as an array.

I know, I know, sounds like something that should be done in the
presentation layer, howerver if possible, I would like to provide common
data presentation to multiple presentation layers (written in different
languages).

So is there anyway to return an array in mysql?

Accomplishing the impossible means only that the boss will add it to your
regular duties.

David Godsey


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



Re: Foreign keys

2006-03-24 Thread Olusola Fadero
I had that problem as well and a quick search revealed this:

A) Whole databases are not handled by InnoDB. The individual tables are.
Check the results of SHOW CREATE TABLE table_name_here for each table
you are linking from and linking to. You should see ENGINE = InnoDB after
the last ) but before the final ; in each definition. If not, you need to
change your tables to use that engine.

B) Each column participating in either end of a FOREIGN KEY must be of the
same data type and size and signedness (everything about the columns must
match except the names and comments)

C) Each column participating in either end of a FOREIGN KEY must be the
leftmost column of an index. Simply declaring a FOREIGN KEY constraint
will not automatically create an index on the child table if one is
missing.

D) When all else fails, read the detailed error message returned by InnoDB
by using the SHOW INNODB STATUS; command

Basically ensure that your foriegn key is an index  in the group_system
table.

Regards,
Olusola


On 24/03/06, João Cândido de Souza Neto [EMAIL PROTECTED] wrote:

 Hello everybody.

 I'm using php 4.4 and mysql 5.0 and i'm having the bellow issue:

 I've a group table and a system table, bellow this i have a group_system
 table that has a foreign key to group table and to system table. When a
 tried to delete one register in the group_system table, it gives me the
 bellow error:

 Cannot add or update a child row: a foreign key constraint fails
 (`buffets/group_system`, CONSTRAINT `fk_group_group_sistema` FOREIGN KEY
 (`idgrp`) REFERENCES `group` (`idgrp`) ON DELETE CASCADE ON

 Anyone knows to tell me wath's happening here?

 Thanks for all tips.



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




Stored procedures and views

2006-03-24 Thread Chris Carrier
Howdy folks,

I'm trying to create a flatfile dump from our database which requires some
functionality that's not possible with raw sql.  Up to now we've been using
PHP tied to mySql to do all the work and get the data in the correct format.
We would like to switch this functionality over to stored procedures in
mySql.  My question is this: Is it possible to hook a series of stored
procedures to a view so that the data is live and current?  We could set it
up to run our procedures on some regular interval and dump the result into a
temporary table but having up-to-date data would be ideal.

Thanks,

Chris Carrier

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 


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



Re: Stored procedures and views

2006-03-24 Thread Martijn Tonies
Chriss,

 I'm trying to create a flatfile dump from our database which requires some
 functionality that's not possible with raw sql.  Up to now we've been
using
 PHP tied to mySql to do all the work and get the data in the correct
format.
 We would like to switch this functionality over to stored procedures in
 mySql.  My question is this: Is it possible to hook a series of stored
 procedures to a view so that the data is live and current?

What do you mean by that?

A view is always current.

Can you explain it a bit better?

We could set it
 up to run our procedures on some regular interval and dump the result into
a
 temporary table but having up-to-date data would be ideal.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com



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



InnDB disabbled on 5.1.7

2006-03-24 Thread Gordon
We are running 2.6.15-gentoo Linux and downloaded the max binaries for
5.1.7. With the following my.cnf I thought we should have InnoDB. All of the
InnoDB files got created but show variables like 'have%'; displays 
have_innodb  DISABLED. Exactly the same my.cnf {except the skip bdb is not
commented out} has InnoDB enabled.

Any ideas on what we have to do to enable InnoDB.

my.cnf

# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the --help option.
 
# The following options will be passed to all MySQL clients
[client]
#password   = your_password
port    = 3306
socket  = /tmp/mysql.sock
 
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
port    = 3306
socket  = /tmp/mysql.sock
max_connections = 100
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 256K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
thread_cache_size = 8
query_cache_size= 2M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
 
 
 
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
 
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1
 
 
 
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
 
skip-bdb
 
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/var/
innodb_data_file_path = ibd1:2000M;ibd2:2000M;ibd3:2000;ibd4:10M:autoextend
#innodb_log_group_home_dir = /usr/local/var/
#innodb_log_arch_dir = /usr/local/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 512M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 0
innodb_lock_wait_timeout = 50
 
[mysqldump]
quick
max_allowed_packet = 16M
 
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
 

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
 
[mysqlhotcopy]
interactive-timeout

mysql select version();
++
| version()  |
++
| 5.1.7-beta-max-log |
++
1 row in set (1.73 sec)

Linux zeus 2.6.15-gentoo-r1 #10 SMP PREEMPT Tue Mar 7 15:36:28 MST 2006 i686
Intel(R) Xeon(TM) CPU 3.80GHz GenuineIntel GNU/Linux

mysql show variables like 'have%';
++--+
| Variable_name  | Value|
++--+
| have_archive   | YES  |
| have_bdb   | DISABLED |
| have_blackhole_engine  | YES  |
| have_compress  | YES  |
| have_crypt | YES  |
| have_csv   | YES  |
| have_example_engine| NO   |
| have_federated_engine  | YES  |
| have_geometry  | YES  |
| have_innodb| DISABLED |
| have_ndbcluster| DISABLED |
| have_openssl   | NO   |
| have_partitioning  | YES  |
| have_query_cache   | YES  |
| have_row_based_replication | YES  |
| have_rtree_keys| YES  |
| have_symlink   | YES  |
++--+
17 rows in set (0.10 sec)

mysql show variables like 'inno%';
+-+-
+
| Variable_name   | Value
|
+-+-
+
| innodb_additional_mem_pool_size | 20971520
|
| innodb_autoextend_increment | 8
|
| innodb_buffer_pool_awe_mem_mb   | 0
|
| innodb_buffer_pool_size | 536870912
|
| innodb_checksums| ON
|
| innodb_commit_concurrency   | 0
|
| innodb_concurrency_tickets  | 500
|
| innodb_data_file_path   |
ibd1:2000M;ibd2:2000M;ibd3:2000;ibd4:10M:autoextend |
| innodb_data_home_dir|
|
| innodb_doublewrite  | ON
|
| innodb_fast_shutdown| 1
|
| innodb_file_io_threads  | 4
|
| innodb_file_per_table   | OFF
|
| innodb_flush_log_at_trx_commit  | 0
|
| innodb_flush_method |
|
| innodb_force_recovery   | 0
|
| innodb_lock_wait_timeout| 50
|
| innodb_locks_unsafe_for_binlog  | OFF
|
| innodb_log_arch_dir |
|
| 

RE: Stored procedures and views

2006-03-24 Thread Chris Carrier
I just mean is it possible to hook a set of stored procedures to a view as
opposed to a temporary table that we'd have to explicitly update?

Chris

-Original Message-
From: Martijn Tonies [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 24, 2006 10:26 AM
To: mysql@lists.mysql.com
Subject: Re: Stored procedures and views

Chriss,

 I'm trying to create a flatfile dump from our database which requires some
 functionality that's not possible with raw sql.  Up to now we've been
using
 PHP tied to mySql to do all the work and get the data in the correct
format.
 We would like to switch this functionality over to stored procedures in
 mySql.  My question is this: Is it possible to hook a series of stored
 procedures to a view so that the data is live and current?

What do you mean by that?

A view is always current.

Can you explain it a bit better?

We could set it
 up to run our procedures on some regular interval and dump the result into
a
 temporary table but having up-to-date data would be ideal.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com



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


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 


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



4.1 x 5.0 INSERT Performance issues

2006-03-24 Thread Edilson Vasconcelos de Melo Junior
Hi,

 

My software use to run with mySQL 4.1, but now i have to use some of the new
features of mySQL 5.0 i did dump all databases, uninistalled mysql4.1,
installed the mysql5.0 and start loading the .sql file. This operation use
to take about 4 hours but know it is taking 1day!!! Did anything happen with
INSERT on InnoDB tables? What's wrong?

 

Thanks,

Dirso



Re: Stored procedures and views

2006-03-24 Thread Martijn Tonies


 I just mean is it possible to hook a set of stored procedures to a view as
 opposed to a temporary table that we'd have to explicitly update?

hook?

If you mean: using the views in select statements inside a procedure:
sure it. Did you try?

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

 Chris

 -Original Message-
 From: Martijn Tonies [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 24, 2006 10:26 AM
 To: mysql@lists.mysql.com
 Subject: Re: Stored procedures and views

 Chriss,

  I'm trying to create a flatfile dump from our database which requires
some
  functionality that's not possible with raw sql.  Up to now we've been
 using
  PHP tied to mySql to do all the work and get the data in the correct
 format.
  We would like to switch this functionality over to stored procedures in
  mySql.  My question is this: Is it possible to hook a series of stored
  procedures to a view so that the data is live and current?

 What do you mean by that?

 A view is always current.

 Can you explain it a bit better?

 We could set it
  up to run our procedures on some regular interval and dump the result
into
 a
  temporary table but having up-to-date data would be ideal.

 Martijn Tonies
 Database Workbench - development tool for MySQL, and more!
 Upscene Productions
 http://www.upscene.com
 My thoughts:
 http://blog.upscene.com/martijn/
 Database development questions? Check the forum!
 http://www.databasedevelopmentforum.com



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


 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006


 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006



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


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



RE: Stored procedures and views

2006-03-24 Thread Gordon


If the features available in stored procedures {i.e. looping etc.} are
required, have you tried having the procedure 1st write/edit the data in a
temporary table and at the end select the values you want from that table. 

I think I might write 2 procedures. One that does the data manipulation and
the other that selects the result. 
something like this  

DELIMITER //
DROP PROCEDURE IF EXITS manipulate//

CREATE PROCEDURE manipulate(
CREATE TEMPORARY TABLE data_result

...
...
END// 

DROP PROCEDURE IF EXITS result//

CREATE PROCEDURE result(
...
  CALL manipulate (
...
  SELECT ... FROM data_result
END//

DELIMITER ;
 -Original Message-
 From: Martijn Tonies [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 24, 2006 1:04 PM
 To: Chris Carrier; mysql@lists.mysql.com
 Subject: Re: Stored procedures and views
 
 
 
  I just mean is it possible to hook a set of stored procedures to a view
 as
  opposed to a temporary table that we'd have to explicitly update?
 
 hook?
 
 If you mean: using the views in select statements inside a procedure:
 sure it. Did you try?
 
 Martijn Tonies
 Database Workbench - development tool for MySQL, and more!
 Upscene Productions
 http://www.upscene.com
 My thoughts:
 http://blog.upscene.com/martijn/
 Database development questions? Check the forum!
 http://www.databasedevelopmentforum.com
 
  Chris
 
  -Original Message-
  From: Martijn Tonies [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 24, 2006 10:26 AM
  To: mysql@lists.mysql.com
  Subject: Re: Stored procedures and views
 
  Chriss,
 
   I'm trying to create a flatfile dump from our database which requires
 some
   functionality that's not possible with raw sql.  Up to now we've been
  using
   PHP tied to mySql to do all the work and get the data in the correct
  format.
   We would like to switch this functionality over to stored procedures
 in
   mySql.  My question is this: Is it possible to hook a series of stored
   procedures to a view so that the data is live and current?
 
  What do you mean by that?
 
  A view is always current.
 
  Can you explain it a bit better?
 
  We could set it
   up to run our procedures on some regular interval and dump the result
 into
  a
   temporary table but having up-to-date data would be ideal.
 
  Martijn Tonies
  Database Workbench - development tool for MySQL, and more!
  Upscene Productions
  http://www.upscene.com
  My thoughts:
  http://blog.upscene.com/martijn/
  Database development questions? Check the forum!
  http://www.databasedevelopmentforum.com
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
 
  --
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 
 
  --
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


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



/var/log/mysql.000001 Not Found?

2006-03-24 Thread David P. Donahue
I just tried upgrading from MySQL 4.0 to 5.0 on my Slackware Linux 
system, but whenever I try to start the new service it immediately exits 
and the only error it logs is:


/usr/libexec/mysqld: File '/var/log/mysql.01' not found (Errcode: 13)
[ERROR] Could not use /var/log/mysql for loggins (error 13).  Turning 
logging off for the whole duration of the MySQL server process.

[ERROR] Aborting

If I touch the file, the error is for mysql.02, then mysql.03. 
What would be causing this, and how should I go about fixing it?  Any 
help would be much appreciated, thanks.



Regards,
David P. Donahue
[EMAIL PROTECTED]
http://www.cyber0ne.com

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



Host denied errors

2006-03-24 Thread Scott Haneda
Little confused, can not seem to locate the docs on this.  Trying to set up
mysql to allow a remote webserver to talk to it, using a user/pass/host
setting with host set to allow anything, of course works.

If the IP I am connecting from has a valid PTR, I can use the hostname as
well, and that works.

In this one case, I do not have the ability to get the client to get a PTR
set up on the IP I want to connect from.  I tried putting in the IP address,
and it still blocks it, can someone tell me how mysql authenticates this
data?
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Novato, CA U.S.A.



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



Comparing x.x.x.x strings

2006-03-24 Thread Lucas Vendramin
Hi all.
I have a problem:
When I compare two strings in mask (x.x.x.x) the comparation is not true (for 
my question :D)... look:
 select '3.2.0.13'  '3.2.0.2'- FALSE
I want this command return TRUE, but it is returning FALSE.
But, if I put a space first into the smaller string the camparation will 
returns what I want:
 select '3.2.0.13'  ' 3.2.0.2'- TRUE

How can I check it? There is a way to correct my problem? The string is like a 
IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2, but it is not a 
IPADDRESS column, it is a Version of file (version 3.2.0, version 3.2.1, etc...)

Thanks for all.

Re: Comparing x.x.x.x strings

2006-03-24 Thread Rhino
I don't know the answer to your question but I know that this issue has been 
discussed in this mailing list before. Look in the MySQL archives and I'm 
sure you will find an answer on the best way to compare IP addresses.


--
Rhino

- Original Message - 
From: Lucas Vendramin [EMAIL PROTECTED]

To: mysql@lists.mysql.com
Sent: Friday, March 24, 2006 3:44 PM
Subject: Comparing x.x.x.x strings


Hi all.
I have a problem:
When I compare two strings in mask (x.x.x.x) the comparation is not true 
(for my question :D)... look:

select '3.2.0.13'  '3.2.0.2'- FALSE
I want this command return TRUE, but it is returning FALSE.
But, if I put a space first into the smaller string the camparation will 
returns what I want:

select '3.2.0.13'  ' 3.2.0.2'- TRUE

How can I check it? There is a way to correct my problem? The string is like 
a IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2, but it is not a 
IPADDRESS column, it is a Version of file (version 3.2.0, version 3.2.1, 
etc...)


Thanks for all.





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 24/03/2006



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 24/03/2006


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



RE: Host denied errors

2006-03-24 Thread Stanton, Brian
IP should work just fine.  However, if the source webserver is behind a
firewall or otherwise NAT'd, your mysql server may see them coming from an
in between IP instead of the actual webserver.  The quickest way to figure
it out is to have the webserver host try to connect and send you the error
message.  Typically it will read something like: Access denied for user:
'[EMAIL PROTECTED]' (Using password: YES).

That host in the error message should match with your settings in the
database.

Brian Stanton
DBA, Belo
214-977-4087

-Original Message-
From: Scott Haneda [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 24, 2006 2:34 PM
To: mysql@lists.mysql.com
Subject: Host denied errors

Little confused, can not seem to locate the docs on this.  Trying to set up
mysql to allow a remote webserver to talk to it, using a user/pass/host
setting with host set to allow anything, of course works.

If the IP I am connecting from has a valid PTR, I can use the hostname as
well, and that works.

In this one case, I do not have the ability to get the client to get a PTR
set up on the IP I want to connect from.  I tried putting in the IP address,
and it still blocks it, can someone tell me how mysql authenticates this
data?
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Novato, CA U.S.A.



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

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



Re: Comparing x.x.x.x strings

2006-03-24 Thread Jay Paulson
Take a look at the MySQL function INET_ATON and it's counterpart (I don't
remember what it's counterpart is but it should be easy to find once you
find INET_ATON).

I know in PHP there is a function that will convert x.x.x.x to an int and
then you just put that int into a field in your database and then use the
INET_ATON function in MySQL to select the ips you want.

SELECT INET_ATON('3.2.0.13')  INET_ATON('3.2.0.2')

That should return TRUE. :)

Hope that helps.


On 3/24/06 2:44 PM, Lucas Vendramin [EMAIL PROTECTED] wrote:

 Hi all.
 I have a problem:
 When I compare two strings in mask (x.x.x.x) the comparation is not true (for
 my question :D)... look:
  select '3.2.0.13'  '3.2.0.2'- FALSE
 I want this command return TRUE, but it is returning FALSE.
 But, if I put a space first into the smaller string the camparation will
 returns what I want:
  select '3.2.0.13'  ' 3.2.0.2'- TRUE
 
 How can I check it? There is a way to correct my problem? The string is like a
 IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2, but it is not a
 IPADDRESS column, it is a Version of file (version 3.2.0, version 3.2.1,
 etc...)
 
 Thanks for all.

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



Re: Comparing x.x.x.x strings

2006-03-24 Thread Dan Nelson
In the last episode (Mar 24), Lucas Vendramin said:
 Hi all.
 I have a problem:
 When I compare two strings in mask (x.x.x.x) the comparation is not
 true (for my question :D)... look:
  select '3.2.0.13'  '3.2.0.2'- FALSE
 I want this command return TRUE, but it is returning FALSE. But, if I
 put a space first into the smaller string the camparation will
 returns what I want:
  select '3.2.0.13'  ' 3.2.0.2'- TRUE

Well, that's just because '3' has a higher ascii value than ' '.
 
 How can I check it? There is a way to correct my problem? The string
 is like a IP-ADDRESS where 192.168.0.13 is better than 192.168.0.2,
 but it is not a IPADDRESS column, it is a Version of file (version
 3.2.0, version 3.2.1, etc...)

You will need to write a stored procedure that splits the strings on
'.'s and compares the numbers separately, or write a C UDF that calls
one of the many C version-comparison functions available (
http://sourcefrog.net/projects/natsort/ ,
http://gcc.gnu.org/svn/gcc/trunk/libiberty/strverscmp.c ).

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Re: Is there anyway to return an array?

2006-03-24 Thread SGreen
David Godsey [EMAIL PROTECTED] wrote on 03/24/2006 12:55:29 PM:

 This is not a typically thing that anyone would expect Mysql to do,
 however with the application I am writing it would be helpful.  Here 
goes:
 
 The application stores raw data from a satellite, along with a
 configuration of how to read the data.  So of the data types are Int
 Arrays and Float arrays.  Each can have conversion parameters to apply 
to
 the data.  So I have to loop through this raw data, converting to the
 correct type, and applying some convertion parameter (say multiply by 
.26
 for a float).
 
 So I will pass a function (a UDF function) a binary string, perform some
 conversion, then I would like to return it as an array.
 
 I know, I know, sounds like something that should be done in the
 presentation layer, howerver if possible, I would like to provide common
 data presentation to multiple presentation layers (written in different
 languages).
 
 So is there anyway to return an array in mysql?
 
 Accomplishing the impossible means only that the boss will add it to 
your
 regular duties.
 
 David Godsey
 

Depending on your version of MySQL, you could return the results of a 
query created within a stored procedure. Or you could set up a view or 
 

Anyway, since array data types are not one of the data types supported by 
MySQL I think the closest you can get is either to return the data as a 
table or as the results of a query or as the content presented by a view. 
If you think about it, a recordset is very similar to a two-dimensional 
array.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

problem with encoding utf8 in text field

2006-03-24 Thread Grzegorz Smith
Hi all. In my apps I use two languages: english and my national polish.
Translates i keep in MySQL 5.0 in text field (MyISAM engine) with utf8
encodings. I don't know why but i can get polish translates from databes
properly, my national character are seen from webb like sign ?. I connect
to database with URI like 
host://[EMAIL PROTECTED]:database?read_default_file=mysql configuration file
e.g. c:/windows/my.ini
in configuration file i have:
[client]
port=3306
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
port=3306
default-character-set=utf8
Does anyone can tell mi what I'm doing wrong?


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



DBD::mysql::st execute failed: MySQL server has gone away

2006-03-24 Thread Luke Vanderfluit

Hi.

I'm getting the following error running apache2 with modperl, mysql 
4.1.18 and RT 3.4.5
*error:*  	DBD::mysql::st execute failed: MySQL server has gone away at 
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm 
line 70.

*context:*  
*...*   
*66:*   if ($self-{lock}) {
*67:*   local $self-{dbh}-{RaiseError} = 1;
*68:*   
*69:*  	my $sth = $self-{dbh}-prepare_cached(q{SELECT 
RELEASE_LOCK(?)}, {}, 1);

*70:*   $sth-execute($self-{lockid});
*71:*   
*72:*   $self-{lock} = 0;
*73:*   }
*74:*   }
*...*   

*code stack:*  
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:70

/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:81
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/Apache/Session/Lock/MySQL.pm:87
/usr/local/stow/perl-5.8.7/lib/site_perl/5.8.7/HTML/Mason/Request.pm:1249


If anyone can help, I'd appreciate it.
Kind regards.

--
Luke



Re: Comparing x.x.x.x strings

2006-03-24 Thread Peter Brawley
When I compare two strings in mask (x.x.x.x) the comparation is not 
true (for my question :D)... look:

select '3.2.0.13'  '3.2.0.2'- FALSE
I want this command return TRUE, but it is returning FALSE.

select inet_aton('3.2.0.13')  inet_aton('3.2.0.2');
+--+
| inet_aton('3.2.0.13')  inet_aton('3.2.0.2') |
+--+
|1 |
+--+

PB




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