Re: Slow login

2004-05-10 Thread Jiri Matejka
Unfortunatelly it isn't true in my case. I connect to database server in
local network and I use IP address, so there is no DNS usage...

Jiri Matejka

- Original Message - 
From: "gerald_clark" <[EMAIL PROTECTED]>
To: "Jiri Matejka" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 3:36 PM
Subject: Re: Slow login


> Slow connections are ususally a DNS or reverse DNS problem.
>
> Jiri Matejka wrote:
>
> >Hi,
> > I'm using MySQL 3.23.53 on W2000 and I have a following problem: when I
> >restart the database server then the first attempt to connect from any
> >client program last cca 30 seconds (too long!!), each next attempt to
> >connect lasts less than one second. The traffic is usually very small, so
it
> >can't be caused by it. I tried several client applications and all behave
in
> >the same way, so I guess the problem is inside the database. Can anybody
> >help me? Thanks
> >
> >Jiri Matejka, [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]



Re: Multiple Mysqld Stability and maintanability

2004-05-10 Thread Bruce Ferrell
It works.  It works very well.  As Jeremy said, just make sure you are 
very explicit in your configuration and startup

Jeremy Zawodny wrote:
On Tue, May 11, 2004 at 09:26:57AM +0700, Winner H Manurung wrote:

Dear All,

I was an Oracle dba, now my new company want to use Mysql 4.0.18. Does
anybody here has experience of running multiple mysqld (i.e. multiple
instance on one machine). Is it stable and totally independent to each
other?


If you configure it properly, yes.


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


Re: Database design.. Asking again

2004-05-10 Thread Daniel Kasak
Scott Haneda wrote:



If users become day 1000 and each of those users has 70,000 user_contacts,
that would be 70,000 * 1000 total records in one table, as users grow, this
becomes perhaps too many records in one table.  Or at least the potential
for it.
My next option would be to make a new table, user_contact-userid and make
one for each user, would would then mean, rather than one table with a lot
of records in it, there would be many tables with a max of 100,000 records
in it.
Can someone share with me their thoughts and suggestions on this?
 



MySQL has a table type called 'merge' tables for this purpose.
See http://dev.mysql.com/doc/mysql/en/MERGE.html
Basically you create a collection of MyISAM tables, and then define a 
merge table which you can use to refer to all of them at once. You can 
then either query the individual tables, or the merge table to get the 
results you want.

As for whether this is necessary, that would depend on the type of data 
you're storing. How big is each record? If it's just a couple of bits, I 
think one table for everyone would be OK, even at 70,000,000 records. 
However if your records are large ( eg contain text column, blob 
columns, etc ) then merge tables might be the way to go, especially if 
your data hits the 2GB limit.

In your case, with the fields ( ID, FirstName, LastName ), I think you 
could get away with just one table. I haven't tried anything this big 
though, so maybe someone who has can enlighten us both.

If you don't need any features of InnoDB, I suppose it wouldn't be too 
much of a hassle setting up merge tables - just in case.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

mysql-administrator startup error

2004-05-10 Thread Kevin Struckhoff
I just installed the administrator alpha binaries on
my Sun Java Desktop system (SuSe 8 Linux), and I get
the following error at startu:

./mysql-administrator-bin: error while loading shared
libraries: libsigc-1.2.so.5: cannot open shared object
file: No such file or directory

I did a find from root and did not locate any file
closely resembling the name 'libsigc*'. Does this mean
I should download and build the source?

TIA.

=
Thanks.

Kevin

-- Enjoy Life, Drink and Code Java!




__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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



Database design.. Asking again

2004-05-10 Thread Scott Haneda
Sorry for the post again, I hijacked a thread and wanted to get this on the
correct track.

I can not seem to find the section in the manual that talks about the max
number of tables MySql can use, can someone point me please?

I have been asked to build a database which could have some potentially
interesting storage needs.

There will be a users table, there can be x users, if all goes well, x will
be 1000's.

Each user will be able to upload any number of records, with 100,000 being
the most.  Average would be about 10,000 records, but I want to plan this as
if average was 70,000.

The 70,000 records will have the following structure:
Id, first name, last name

So the table will be relatively meager in its storage needs.  Lets call this
table user_contacts.

If users become day 1000 and each of those users has 70,000 user_contacts,
that would be 70,000 * 1000 total records in one table, as users grow, this
becomes perhaps too many records in one table.  Or at least the potential
for it.

My next option would be to make a new table, user_contact-userid and make
one for each user, would would then mean, rather than one table with a lot
of records in it, there would be many tables with a max of 100,000 records
in it.

Can someone share with me their thoughts and suggestions on this?


If anyone thinks I should just allow one table to store all this, with that
table having 70 million records in it, then I can of course go that road as
well.
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]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]



Re: Multiple Mysqld Stability and maintanability

2004-05-10 Thread Jeremy Zawodny
On Tue, May 11, 2004 at 09:26:57AM +0700, Winner H Manurung wrote:
> Dear All,
> 
> I was an Oracle dba, now my new company want to use Mysql 4.0.18. Does
> anybody here has experience of running multiple mysqld (i.e. multiple
> instance on one machine). Is it stable and totally independent to each
> other?

If you configure it properly, yes.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/

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



Database design.. Asking again

2004-05-10 Thread Scott Haneda
I can not seem to find the section in the manual that talks about the max
number of tables MySql can use, can someone point me please?

I have been asked to build a database which could have some potentially
interesting storage needs.

There will be a users table, there can be x users, if all goes well, x will
be 1000's.

Each user will be able to upload any number of records, with 100,000 being
the most.  Average would be about 10,000 records, but I want to plan this as
if average was 70,000.

The 70,000 records will have the following structure:
Id, first name, last name

So the table will be relatively meager in its storage needs.  Lets call this
table user_contacts.

If users become day 1000 and each of those users has 70,000 user_contacts,
that would be 70,000 * 1000 total records in one table, as users grow, this
becomes perhaps too many records in one table.  Or at least the potential
for it.

My next option would be to make a new table, user_contact-userid and make
one for each user, would would then mean, rather than one table with a lot
of records in it, there would be many tables with a max of 100,000 records
in it.

Can someone share with me their thoughts and suggestions on this?


If anyone thinks I should just allow one table to store all this, with that
table having 70 million records in it, then I can of course go that road as
well.
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]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]



Multiple Mysqld Stability and maintanability

2004-05-10 Thread Winner H Manurung
Dear All,

I was an Oracle dba, now my new company want to use Mysql 4.0.18. Does
anybody here has experience of running multiple mysqld (i.e. multiple
instance on one machine). Is it stable and totally independent to each
other?

Thank you for your answer
Winner


Mau dapat hadiah jutaan rupiah, ikuti game dan quiz-nya di http://www.m-stars.net



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



Re: Change Character Set for one user

2004-05-10 Thread Nils Valentin
Hi Mike,

if you refer to MySQL 4.1 then yes you an do that. (I assume you are speaking 
about the server side configuration).

I have made a presentation "Using MySQL in a Japanese environment" on the 
UC-2004 which can be found here:

www.be-known-online.com/mysql

I hope that this helps a bit.

Best regards

Nils Valentin
Tokyo / Japan

On Monday 10 May 2004 23:42, Mike Blezien wrote:
> Hello,
>
> is it possible to change the default character set for one mysql user
> without affecting the global character set setting, via the the user's
> .my.cnf option file ??
>
> thx's
> --
> MikeBlezien
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Thunder Rain Internet Publishing
> Providing Internet Solutions that work!
> http://www.thunder-rain.com
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 
kind regards

Nils Valentin
Tokyo/Japan

http://www.be-known-online.com/mysql/

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



NDB Cluster configuration

2004-05-10 Thread J Brian Ismay
I am trying to setup an NDB Cluster database for testing purposes. I have no
problems getting things to work when all of my DB and API nodes are located
on one machine. I run into trouble when I try to have one machine run the
management server, a db node, and an API node, while the second machine runs
another db node. The db node on the second machine appears to talk to the
management node and seems to start properly, but the mgmtclient never shows
it as actually being a part of the cluster. The same behavior is observed
when trying to start an API node on a second machine. Can anyone help?

J Brian Ismay
[EMAIL PROTECTED]




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



Change Character Set

2004-05-10 Thread Mike Blezien
Hello,

is it possible to change the default character set for one mysql user without 
affecting the mysql global character set setting, via the the user's .my.cnf 
option file ??

thx's
--
MikeBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Change Character Set for one user

2004-05-10 Thread Mike Blezien
Hello,

is it possible to change the default character set for one mysql user without 
affecting the global character set setting, via the the user's .my.cnf option 
file ??

thx's
--
MikeBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Database design

2004-05-10 Thread Scott Haneda
I can not seem to find the section in the manual that talks about the max
number of tables MySql can use, can someone point me please?

I have been asked to build a database which could have some potentially
interesting storage needs.

There will be a users table, there can be x users, if all goes well, x will
be 1000's.

Each user will be able to upload any number of records, with 100,000 being
the most.  Average would be about 10,000 records, but I want to plan this as
if average was 70,000.

The 70,000 records will have the following structure:
Id, first name, last name

So the table will be relatively meager in its storage needs.  Lets call this
table user_contacts.

If users become day 1000 and each of those users has 70,000 user_contacts,
that would be 70,000 * 1000 total records in one table, as users grow, this
becomes perhaps too many records in one table.  Or at least the potential
for it.

My next option would be to make a new table, user_contact-userid and make
one for each user, would would then mean, rather than one table with a lot
of records in it, there would be many tables with a max of 100,000 records
in it.

Can someone share with me their thoughts and suggestions on this?
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com   Fax: 313.557.5052
[EMAIL PROTECTED]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]



Re: replication problems

2004-05-10 Thread Sasha Pachev
Gabriel Ricard wrote:
I'm not sure what's going on with our replication. Everything was 
working fine, then all of a sudden it stopped. I did STOP SLAVE; RESET 
SLAVE; LOAD DATA FROM MASTER and it completed after a few minutes, but 
when I checked SHOW SLAVE STATUS it no longer had any information about 
the master. I look in the log and there are these messages:

040510 12:46:15  Slave I/O thread: connected to master 
'[EMAIL PROTECTED]:3306',  replication started in log 'FIRST' at position 4
040510 12:46:15  Error reading packet from server: Could not open log 
file (server_errno=1236)
040510 12:46:15  Got fatal error 1236: 'Could not open log file' from 
master when reading data from binary log
040510 12:46:15  Slave I/O thread exiting, read up to log 'FIRST', 
position 4

Any ideas what this is all about? I couldn't find any useful help in the 
manual or archives when I searched for those errors.
Gabriel:

Check the master error log to see what binary log it is trying to read, and why 
the read is not successful, eg. ownership/permission problems.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysqldump problem

2004-05-10 Thread Sasha Pachev
Joe Adams wrote:
I have a database setup for replication.  I used mysqldump --opt db > db.dmp
to do the initial backup of the primary database (after doing a flush tables
with read lock in a seperate session).
I checked the dump file, and all drop table create table statements are in
the file.  When I did a restore to the second database with a mysql
--on-database db < db.dmp, it appears that the tables were not dropped and
recreated.  No errors were displayed during this process.  After the
restore, I was able to start replication, and replication ran fine, until it
encountered an object which was not in the secondary database which was in
the primary.
 
The schema looks to be the old schema (pre database restore), and table
drops/creates appear to have been done from the dump file.  Any ideas
why/how this would be?  My dump file is about 14 Gig.
Joe:

Did you make sure to do RESET MASTER/RESET SLAVE trick, or otherwise adjust the 
replication log coordinates for the slave to start at the right place?

--one-database should not be necessary, and having it could possibly be 
triggering some weird bug or a poorly documented feature. mysql db < dump.sql 
should be sufficiet to restore.

P.S. If you are using MyISAM, binary snapshot would work better for this much 
data. For InnoDB, hotbackup utility is a good investment.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: my.cnf setup

2004-05-10 Thread Sasha Pachev
[EMAIL PROTECTED] wrote:
I am running a mysql server off a Dell 2650.
Dual 2.8Ghz Intel Xeon processors
1 Gig of RAM
The MySQL data comes up rather slowly.  Would like some suggestions on my
my.cnf file if you had a minute.
Conner:

The problem is very unlikely your my.cnf, and very likely your application. 
You've done 184 selects and scanned 63575 rows. So your average select scans 345 
rows, and you do have some good ones (66 in Select_range, and probably not all 
84 of Select_scan are scanning large tables). It seems that you also have some 
really bad ones ( 8 in Select_full_join).

Enable log-slow-queries and log-long-format in my.cnf, then police the slow log 
fixing the queries/table schema as you go along. Start with the ones that 
examine most rows.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: my.cnf setup

2004-05-10 Thread Dathan Vance Pattishall


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 2:23 PM
> To: [EMAIL PROTECTED]
> Subject: my.cnf setup
> 
> I am running a mysql server off a Dell 2650.
> Dual 2.8Ghz Intel Xeon processors
> 1 Gig of RAM
> 
> The MySQL data comes up rather slowly.  Would like some suggestions on my
> my.cnf file if you had a minute.
> 
> here is what I have
> | Handler_read_first | 2|
> | Handler_read_key   | 9080 |
> | Handler_read_next  | 35   |
> | Handler_read_prev  | 1764 |
> | Handler_read_rnd   | 723  |
> | Handler_read_rnd_next  | 63575|

You are not indexing your table right. The read random next is to high. Turn
on the slow query log to find out what query is the problem.



> | Handler_rollback   | 0|
> | Handler_update | 0|
> | Handler_write  | 154  |
> | Key_blocks_used| 51   |
> | Key_read_requests  | 13370|
> | Key_reads  | 41   |
> | Key_write_requests | 67   |
> | Key_writes | 0|
> | Max_used_connections   | 4|
> | Not_flushed_key_blocks | 0|
> | Not_flushed_delayed_rows   | 0|
> | Open_tables| 18   |
> | Open_files | 38   |
> | Open_streams   | 0|
> | Opened_tables  | 24   |
> | Questions  | 9971 |
> | Qcache_queries_in_cache| 173  |
> | Qcache_inserts | 173  |
> | Qcache_hits| 9665 |
> | Qcache_lowmem_prunes   | 0|
> | Qcache_not_cached  | 8|
> | Qcache_free_memory | 32908680 |
> | Qcache_free_blocks | 1|
> | Qcache_total_blocks| 365  |
> | Rpl_status | NULL |
> | Select_full_join   | 8|
> | Select_full_range_join | 0|
> | Select_range   | 66   |
> | Select_range_check | 0|
> | Select_scan| 84   |
> | Slave_open_temp_tables | 0|
> | Slave_running  | OFF  |
> | Slow_launch_threads| 0|
> | Slow_queries   | 0|
> | Sort_merge_passes  | 0|
> | Sort_range | 0|
> | Sort_rows  | 723  |
> | Sort_scan  | 16   |
> | Ssl_accepts| 0|
> | Ssl_finished_accepts   | 0|
> | Ssl_finished_connects  | 0|
> | Ssl_accept_renegotiates| 0|
> | Ssl_connect_renegotiates   | 0|
> | Ssl_callback_cache_hits| 0|
> | Ssl_session_cache_hits | 0|
> | Ssl_session_cache_misses   | 0|
> | Ssl_session_cache_timeouts | 0|
> | Ssl_used_session_cache_entries | 0|
> | Ssl_client_connects| 0|
> | Ssl_session_cache_overflows| 0|
> | Ssl_session_cache_size | 0|
> | Ssl_session_cache_mode | NONE |
> | Ssl_sessions_reused| 0|
> | Ssl_ctx_verify_mode| 0|
> | Ssl_ctx_verify_depth   | 0|
> | Ssl_verify_mode| 0|
> | Ssl_verify_depth   | 0|
> | Ssl_version|  |
> | Ssl_cipher |  |
> | Ssl_cipher_list|  |
> | Ssl_default_timeout| 0|
> | Table_locks_immediate  | 239  |
> | Table_locks_waited | 0|
> | Threads_cached | 1|
> | Threads_created| 5|
> | Threads_connected  | 4|
> | Threads_running| 1|
> | Uptime | 1444 |
> ++--+
> 
> 
> my.cnf as follows:
> 
> 
> [client]
> password= password
> port= 3306
> socket  = /tmp/mysql.sock
> 
> # Here follows entries for some specific programs
> 
> [EMAIL PROTECTED] bin]# cat /etc/my.cnf
> 
> [client]
> password= guest
> port= 3306
> socket  = /tmp/mysql.sock
> 
> 
> 
> # The MySQL server
> [mysqld]
> port= 3306
> socket  = /tmp/mysql.sock
> skip-locking
> key_buffer = 384M
> max_allowed_packet = 1M


Raise higher if your replicating blobs.


> table_cache = 512
> sort_buffer_size = 8M
This is too high, you might run out of memory. This is a per thread
allocation. Set it to 2M.

> read_buffer_size = 2M

add read_rnd_buffer_size = 2M

since your indexes are bad.


> myisam_sort_buffer_size = 64M
> thread_cache = 8
> query_cache_size = 32M
> # Tr

Re: Problem running MySQL on MacOS X.3

2004-05-10 Thread Sasha Pachev
Tim Jarman wrote:
I have an iBook G4 running MacOS X.3 on Darwin 7.0. I downloaded and ran the 
binary installer (mysql-standard-4.0.18.pkg and it appeared to work fine; I 
have /usr/local/mysql and so on as per the docs. I also installed 
MySQLStartupItem.

However, I don't actually appear to have a functional installation. If I do:


/usr/local/mysql/bin/mysql


or even


sudo /usr/local/mysql/bin/mysql


I get:

ERROR 2002: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)

although /tmp/mysql.sock does exist, which seems to indicate the server is 
running. But then again ps -a -x doesn't seem to show it, so maybe it isn't; 
if I do ps -A |fgrep "mysql" on my Linux box, where MySQL is running happily, 
I get a hit for mysqld_safe plus ten others for mysqld.

I tried starting the server manually as suggested in the docs:


sudo /Library/StartupItems/MySQL/MySQL start
Starting MySQL database server


but when I try running mysql I get error 2002 as before.

I found mention of this problem on FAQTS and in the MySQL mailing lists 
archive, the latter of which suggested this email address. Any clues would be 
most welcome! Please cc any replies to me as I am not currently subscribed to 
any of the MySQL lists.
Tim:

perror 61 will reveal some details about why exactly the connection on 
/tmp/mysql.sock cannot happen. If that does not make it obvious ( and it is a 
good possibility that it would not), try mysql -h 127.0.0.1 instead to bypass 
the Unix socket and use TCP/IP.

--
Sasha Pachev
Create online surveys at http://www.surveyz.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


my.cnf setup

2004-05-10 Thread rconner
I am running a mysql server off a Dell 2650.
Dual 2.8Ghz Intel Xeon processors
1 Gig of RAM

The MySQL data comes up rather slowly.  Would like some suggestions on my
my.cnf file if you had a minute.

here is what I have

++--+
| Variable_name  | Value|
++--+
| Aborted_clients| 0|
| Aborted_connects   | 0|
| Bytes_received | 1083533  |
| Bytes_sent | 979790   |
| Com_admin_commands | 0|
| Com_alter_table| 0|
| Com_analyze| 0|
| Com_backup_table   | 0|
| Com_begin  | 0|
| Com_change_db  | 40   |
| Com_change_master  | 0|
| Com_check  | 0|
| Com_commit | 14   |
| Com_create_db  | 0|
| Com_create_function| 0|
| Com_create_index   | 0|
| Com_create_table   | 0|
| Com_delete | 0|
| Com_delete_multi   | 0|
| Com_drop_db| 0|
| Com_drop_function  | 0|
| Com_drop_index | 0|
| Com_drop_table | 0|
| Com_flush  | 0|
| Com_grant  | 0|
| Com_ha_close   | 0|
| Com_ha_open| 0|
| Com_ha_read| 0|
| Com_insert | 0|
| Com_insert_select  | 0|
| Com_kill   | 0|
| Com_load   | 0|
| Com_load_master_data   | 0|
| Com_load_master_table  | 0|
| Com_lock_tables| 0|
| Com_optimize   | 0|
| Com_purge  | 0|
| Com_rename_table   | 0|
| Com_repair | 0|
| Com_replace| 0|
| Com_replace_select | 0|
| Com_reset  | 0|
| Com_restore_table  | 0|
| Com_revoke | 0|
| Com_rollback   | 0|
| Com_savepoint  | 0|
| Com_select | 184  |
| Com_set_option | 28   |
| Com_show_binlog_events | 0|
| Com_show_binlogs   | 0|
| Com_show_create| 0|
| Com_show_databases | 0|
| Com_show_fields| 0|
| Com_show_grants| 0|
| Com_show_keys  | 0|
| Com_show_logs  | 0|
| Com_show_master_status | 0|
| Com_show_new_master| 0|
| Com_show_open_tables   | 0|
| Com_show_processlist   | 0|
| Com_show_slave_hosts   | 0|
| Com_show_slave_status  | 0|
| Com_show_status| 1|
| Com_show_innodb_status | 0|
| Com_show_tables| 0|
| Com_show_variables | 0|
| Com_slave_start| 0|
| Com_slave_stop | 0|
| Com_truncate   | 0|
| Com_unlock_tables  | 0|
| Com_update | 0|
| Connections| 43   |
| Created_tmp_disk_tables| 13   |
| Created_tmp_tables | 13   |
| Created_tmp_files  | 0|
| Delayed_insert_threads | 0|
| Delayed_writes | 0|
| Delayed_errors | 0|
| Flush_commands | 1|
| Handler_commit | 0|
| Handler_delete | 0|
| Handler_read_first | 2|
| Handler_read_key   | 9080 |
| Handler_read_next  | 35   |
| Handler_read_prev  | 1764 |
| Handler_read_rnd   | 723  |
| Handler_read_rnd_next  | 63575|
| Handler_rollback   | 0|
| Handler_update | 0|
| Handler_write  | 154  |
| Key_blocks_used| 51   |
| Key_read_requests  | 13370|
| Key_reads  | 41   |
| Key_write_requests | 67   |
| Key_writes | 0|
| Max_used_connections   | 4|
| Not_flushed_key_blocks | 0|
| Not_flushed_delayed_rows   | 0|
| Open_tables| 18   |
| Open_files | 38   |
| Open_streams   | 0   

RE: authentication problem on non-standard port

2004-05-10 Thread Victor Pendleton
Can you do a ps -ef | grep mysql? I would like to see the output.

-Original Message-
From: Daniel Shriver
To: Victor Pendleton
Cc: '[EMAIL PROTECTED] '
Sent: 5/10/04 3:55 PM
Subject: Re: authentication problem on non-standard port

Victor Pendleton wrote:

>Are you specifying either the socket or the host/port combination? What
>types of error messages are you getting 
>

Here is an example of it working and not working (with machine, 
usernames omitted)

$ mysql -h  -u  -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 4.0.18-standard
 


Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 


mysql> exit
Bye
$ mysql -h  -u  -P  -p
Enter password:
ERROR 1045: Access denied for user: '@' (Using 
password: YES)


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



Re: Validation/Linking Table Question

2004-05-10 Thread Lou Olsten
Assuming that your pre 4.1, meaning that you can't use a subquery this
will do it, BUT comp_id must be set to allow NULLS for this to work
otherwise the optimizer will handle it differently
(http://dev.mysql.com/doc/mysql/en/LEFT_JOIN_optimisation.html).  It is
legal to create a primary key on a column that allows nulls, so it's just a
question of whether or not you want to do that.

select * from users left join comp_user_link on (users.user_id =
comp_user_link.user_id)
where comp_user_link.comp_id is null;


- Original Message - 
From: "Bart Nessux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 1:38 PM
Subject: Validation/Linking Table Question


> I have three tables in a MySQL DB... among others:
>
> 1. computers
> 2. users
> 3. comp_user_link
>
> This particular DB is used for inventory and tracking purposes. I think
> the table names are self explanatory. Computers has 'comp_id'... users
> has 'user_id' as their primary indexed keys. These keys are linked
> together in the comp_user_link table. A user may have more than one
> computer (For example, Bob may have a desktop and a laptop at the same
> time), but no computer may be linked to more than one user
> simultaneously (Bob and Tom should never have the same laptop at the
> same time).
>
> Anyway, what I'd like to do is to find all 'user_ids' that aren't linked
> to a computer. Any tips on how to arrange a SELECT statement to do that?
>
> Thanks,
>
> Bart
>
> -- 
> 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]



Problem running MySQL on MacOS X.3

2004-05-10 Thread Tim Jarman
I have an iBook G4 running MacOS X.3 on Darwin 7.0. I downloaded and ran the 
binary installer (mysql-standard-4.0.18.pkg and it appeared to work fine; I 
have /usr/local/mysql and so on as per the docs. I also installed 
MySQLStartupItem.

However, I don't actually appear to have a functional installation. If I do:

>/usr/local/mysql/bin/mysql

or even

>sudo /usr/local/mysql/bin/mysql

I get:

ERROR 2002: Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)

although /tmp/mysql.sock does exist, which seems to indicate the server is 
running. But then again ps -a -x doesn't seem to show it, so maybe it isn't; 
if I do ps -A |fgrep "mysql" on my Linux box, where MySQL is running happily, 
I get a hit for mysqld_safe plus ten others for mysqld.

I tried starting the server manually as suggested in the docs:

>sudo /Library/StartupItems/MySQL/MySQL start
>Starting MySQL database server

but when I try running mysql I get error 2002 as before.

I found mention of this problem on FAQTS and in the MySQL mailing lists 
archive, the latter of which suggested this email address. Any clues would be 
most welcome! Please cc any replies to me as I am not currently subscribed to 
any of the MySQL lists.

Thanks in advance,

Tim Jarman


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



Re: authentication problem on non-standard port

2004-05-10 Thread Daniel Shriver
Victor Pendleton wrote:

Are you specifying either the socket or the host/port combination? What
types of error messages are you getting 

Here is an example of it working and not working (with machine, 
usernames omitted)

$ mysql -h  -u  -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 4.0.18-standard
   

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
   

mysql> exit
Bye
$ mysql -h  -u  -P  -p
Enter password:
ERROR 1045: Access denied for user: '@' (Using 
password: YES)



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


RE: authentication problem on non-standard port

2004-05-10 Thread Victor Pendleton
Are you specifying either the socket or the host/port combination? What
types of error messages are you getting 

-Original Message-
From: Daniel Shriver
To: [EMAIL PROTECTED]
Sent: 5/10/04 3:24 PM
Subject: authentication problem on non-standard port

I am having problems authenticating to a machine where there are two 
database instances running.  The instance which listens on the standard 
port allows me to authenticate correctly whereas the instance listening 
on the non-standard port only works: if I am on the same box as the 
database; or if I use an old user account (which I did not set up and 
cannot find out how it was set up).  I have done repeated grant commands

(and they seem to work for the instance listening to the standard port) 
both 'on *' (with no database specified) and 'on *.*' (both of which 
should give those users global permissions).  Likewise, I redid the 
grant commands after connecting to the database on the nonstandard 
port.  How do I fix this problem?


-- 
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]



authentication problem on non-standard port

2004-05-10 Thread Daniel Shriver
I am having problems authenticating to a machine where there are two 
database instances running.  The instance which listens on the standard 
port allows me to authenticate correctly whereas the instance listening 
on the non-standard port only works: if I am on the same box as the 
database; or if I use an old user account (which I did not set up and 
cannot find out how it was set up).  I have done repeated grant commands 
(and they seem to work for the instance listening to the standard port) 
both 'on *' (with no database specified) and 'on *.*' (both of which 
should give those users global permissions).  Likewise, I redid the 
grant commands after connecting to the database on the nonstandard 
port.  How do I fix this problem?

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


Validation/Linking Table Question

2004-05-10 Thread Bart Nessux
I have three tables in a MySQL DB... among others:

1. computers
2. users
3. comp_user_link
This particular DB is used for inventory and tracking purposes. I think 
the table names are self explanatory. Computers has 'comp_id'... users 
has 'user_id' as their primary indexed keys. These keys are linked 
together in the comp_user_link table. A user may have more than one 
computer (For example, Bob may have a desktop and a laptop at the same 
time), but no computer may be linked to more than one user 
simultaneously (Bob and Tom should never have the same laptop at the 
same time).

Anyway, what I'd like to do is to find all 'user_ids' that aren't linked 
to a computer. Any tips on how to arrange a SELECT statement to do that?

Thanks,

Bart

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


innodb log

2004-05-10 Thread mayuran
When I do a SHOW INNODB STATUS i see a query which is
waiting for a lock to be released, but innodb status
doesnt show the whole query, the end of it got truncated.
it looks something like:
INSERT INTO test(col1, .., col10) VALUES ('9',
and just stops.
is it possible to see the entire query, im having some
lock wait timeout issues and it would help alot if I can
see the entire query.
thanks

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


Inverted Index Query Formulation

2004-05-10 Thread Mike Boone
I have built a custom inverted text index to search my data. I'm not using
MySQL's fulltext index because A) I want more control over the index and
results, and B) I want to learn how this all works, and if it's possible to
do this quickly in MySQL.

I'm trying to formulate fulltext searches using operators like AND and OR,
and also phrases in quotes where the order of the words is important.

I have three tables:

Table A (Content):
content_id, UNSIGNED INT AUTO_INCREMENT PRIMARY
content_text, TEXT

Table B (Words):
word_id, UNSIGNED INT AUTO_INCREMENT PRIMARY
word_text, VARCHAR(30)

Table C (Word Locations):
wl_id, UNSIGNED INT AUTO_INCREMENT PRIMARY
wl_wordid, UNSIGNED INT referring to B.word_id
wl_locationid, UNSIGNED INT pointing to A.content_id
wl_previd, UNSIGNED INT pointing to the wl_id of the previous word (NULL
otherwise)
I have indices on each column in table C as well as a UNIQUE on the
(wl_wordid, wl_locationid, wl_previd).

So far so good. Now I'm trying to intelligently build queries to search this
data.

For example, if I wanted to search for the exact phrase "mysql query" and
assuming the word_id for mysql is 100 and query is 101:

SELECT A.content_id, COUNT(*) AS relevance FROM A, C AS C0, C AS C1 WHERE
A.content_id=C0.wl_locationid AND C0.wl_wordid=100 AND C1.wl_wordid=101 AND
C1.wl_previd=C0.wl_id ORDER BY A.content_id GROUP BY A.content_id ORDER BY
relevance DESC;

That seems to work well enough and quickly. My simple relevance formula is
counting the number of times that phrase occurs in the specific content.

I want to add complexity to my queries, and I'm not sure if I'm forumulating
them properly. If I want to search for ("mysql query" AND php), here's how
I'm currently writing that (assume php's word_id is 102):

SELECT A.content_id, COUNT(*) AS relevance FROM A, C AS C0, C AS C1, C AS C2
WHERE A.content_id=C0.wl_locationid AND C0.wl_wordid=100 AND
C1.wl_wordid=101 AND C1.wl_previd=C0.wl_id AND content_id=C2.wl_locationid
AND C2.wl_wordid=102 ORDER BY A.content_id GROUP BY A.content_id ORDER BY
relevance DESC;

This query works OK, but it's already starting to get slow. Also, the
"relevance" number returns the product of the rows that match "php" and
those that match "mysql query", which means the query is generating a lot of
rows. Adding another search term to the mix will complicate that further.
"OR" searches will pull a lot of rows too.

Is there a better way to build such queries? Should I be using a different
join? I did try to do a UNION of the various search components (one for
"mysql query" and the next for php), but there doesn't seem to be a
convenient way to pull out only the rows that match both criteria. I imagine
stuffing the results of the UNION into a temp table and working with that
would be slow.

I admit I don't know a lot about the right way to do this. It's difficult to
search the web on this topic, perhaps because I don't know the correct
terminology. I usually end up with results regarding the built-in fulltext
features of various databases. Any web links are appreciated. Surely there's
a way to do this efficiently using SQL queries.

Thanks!
Mike Boone
http://boonedocks.net/mike


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



Re: How to export data with no headers?

2004-05-10 Thread Egor Egorov
"Cao, Wenhong" <[EMAIL PROTECTED]> wrote:
> I am trying to export the records from the tables in the mysql database
> into a file. The problem I am having now is that I don't know how to
> export the records into a file without the header information, which is
> the name of columns.
>
> Can someone help?

Use SELECT ... INTO OUTFILE command:
http://dev.mysql.com/doc/mysql/en/SELECT.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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



Re: How to export data with no headers?

2004-05-10 Thread Michael Kruckenberg
Using --skip-column-names with the client or mysqldump suppresses the 
column names.

Cao, Wenhong wrote:

Hi All,

I am trying to export the records from the tables in the mysql database
into a file. The problem I am having now is that I don't know how to
export the records into a file without the header information, which is
the name of columns.
Can someone help?

Thanks,

Wenhong 


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


Re: Date Question 2

2004-05-10 Thread Mihail Manolov
There are different ways to do accomplish this.

You can use either:
SELECT id, datecol, text FROM table WHERE YEAR(datecol) = 2004 AND
MONTH(datecol) =$mySelectedMonth;

or:
SELECT id, datecol, text FROM table WHERE LEFT(datecol,7) =
'2004-$mySelectedMonth';

As of formated date... use the DATE_FORMAT function. "Monday,
10.05.2004" should be something like DATE_FORMAT(datecol, '%W
%d.%c.%Y')

Check out this page:
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html for
more information.


- Original Message - 
From: "H Bartel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 1:56 PM
Subject: Date Question 2


> Hi again,
>
> I got the MONTH() selection thing working now, but it seems like
I'm not
> getting the hang of the concept with the sql date..
>
> With PHP and a UNIX timestamp I would just insert a timestamp, the
> select it and after selection, go ahead and manipulate it to fit
my
> needs, like extracting day names, months etc.
>
> With the sql date it seems that all manipulation with dates has to
be
> done during selection. Which would make sense somehow, since it's
a
> query language.. I'm just wondering, why I should use readable
dates, if
> it's so much harder to get where I need to, instead of sticking to
unix
> timestamps and manipulate these with PHP functions?
>
> What I want to do is:
>
> Select every row from the current month and year with:
>
> SELECT id, datecol, text FROM table WHERE MONTH(datecol)
> =$mySelectedMonth;
>
> then output the different parts of the date like: Monday,
10.05.2004
>
> or do I have to get all this within the query?
>
> Thanks for your patience and time reading this rather long post
and
> maybe offering some enlightening explanation?
>
> Regards,
> Holger
>
> -- 
> 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]



How to export data with no headers?

2004-05-10 Thread Cao, Wenhong
Hi All,

I am trying to export the records from the tables in the mysql database
into a file. The problem I am having now is that I don't know how to
export the records into a file without the header information, which is
the name of columns.

Can someone help?

Thanks,

Wenhong 


Date Question 2

2004-05-10 Thread H Bartel
Hi again,

I got the MONTH() selection thing working now, but it seems like I'm not
getting the hang of the concept with the sql date..

With PHP and a UNIX timestamp I would just insert a timestamp, the
select it and after selection, go ahead and manipulate it to fit my
needs, like extracting day names, months etc.

With the sql date it seems that all manipulation with dates has to be
done during selection. Which would make sense somehow, since it's a
query language.. I'm just wondering, why I should use readable dates, if
it's so much harder to get where I need to, instead of sticking to unix
timestamps and manipulate these with PHP functions?

What I want to do is: 

Select every row from the current month and year with:

SELECT id, datecol, text FROM table WHERE MONTH(datecol)
=$mySelectedMonth;

then output the different parts of the date like: Monday, 10.05.2004

or do I have to get all this within the query?

Thanks for your patience and time reading this rather long post and
maybe offering some enlightening explanation?

Regards,
Holger

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



mysqldump problem

2004-05-10 Thread Joe Adams



I have a database 
setup for replication.  I used mysqldump --opt db > db.dmp to do the 
initial backup of the primary database (after doing a flush tables with read 
lock in a seperate session).
I checked the dump 
file, and all drop table create table statements are in the file.  When I 
did a restore to the second database with a mysql --on-database db < db.dmp, 
it appears that the tables were not dropped and recreated.  No errors were 
displayed during this process.  After the restore, I was able to start 
replication, and replication ran fine, until it encountered an object which was 
not in the secondary database which was in the primary.
 
The schema looks to 
be the old schema (pre database restore), and table drops/creates appear to have 
been done from the dump file.  Any ideas why/how this would be?  My 
dump file is about 14 Gig.
 
 
IMPORTANT NOTICES:
Confidential 
Information.The information contained in or attached to this e-mail 
may be confidential information subject to protection by law or terms of 
applicable confidentiality agreements, and is intended only for the use of the 
individual or entity named above. If the reader of this message is not the 
intended recipient, or the employee or agent responsible to deliver it to the 
intended recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you should destroy this message and notify the 
sender by reply email.



 


smime.p7s
Description: S/MIME cryptographic signature


Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
<< Looks like it's a query cache issue. In this case you get result from the
cache.>>

That was it.

THANKS

- Original Message - 
From: "Victoria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 1:20 PM
Subject: Re: Blocking Selects with LOCK TABLES


> "Lou Olsten" <[EMAIL PROTECTED]> wrote:
> > According to the docs
(http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html)
> > :
> > If a thread obtains a READ lock on a table, that thread (and all other
threads) can only
> > read from the table. If a thread obtains a WRITE lock on a table, only
the thread holding
> > the lock can read from or write to the table. Other threads are blocked.
> >
> > So, I've got two threads going (T1, T2).
> >
> > T1 issues LOCK TABLES transtest WRITE;
> >
> > But when I go to T2, I can still issue: SELECT * FROM transtest; and
retrieve all the
> > data.  I CANNOT update, so I know the command is at least partially
working. As I
> > understand it, I'm supposed to see a message from T2 that says something
about "This
> > table has been locked with the LOCK TABLES command."
> >
> > It is an InnoDB table, if that matters.
>
> Looks like it's a query cache issue. In this case you get result from the
cache.
>
>
> -- 
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
><___/   www.mysql.com
>
>
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>


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



openssl questions

2004-05-10 Thread rconner
I am having some issues getting OpenSSL to work correctly.
I was able to sign and set up the certificates but thats it.  I cannot
seem to do much else.

First of all if I try and update my grants tables I get this error.

If I try and mysql_fix_privilege_tables I get an error that says:

error: Found option without preceding group in config file: /etc/my.cnf at
line: 1

Fatal error in defaults handling. Program aborted
my my.cnf file looks as follows.
---
cnf=""
cnf="$cnf [client]"
cnf="$cnf ssl-ca=$DIR/cacert.pem"
cnf="$cnf ssl-cert=$DIR/client-cert.pem"
cnf="$cnf ssl-key=$DIR/client-key.pem"
cnf="$cnf [mysqld]"
cnf="$cnf ssl-ca=$DIR/cacert.pem"
cnf="$cnf ssl-cert=$DIR/server-cert.pem"
cnf="$cnf ssl-key=$DIR/server-key.pem"
echo $cnf | replace " " '
' > $DIR/my.cnf


So that’s not really working currently.  I was able to manage to get the
certs all signed and setup using MySQL official page.  Here is the problem
though.



The MySQL site says to:
from www.mysql.org-
To test SSL connections, start the server as follows, where $DIR is the
pathname to the directory where the sample `my.cnf' option file is
located:

shell> mysqld --defaults-file=$DIR/my.cnf &

Then invoke a client program using the same option file:

shell> mysql --defaults-file=$DIR/my.cnf
--end from www.mysql.org

If I try to do as it says, it will not let me run

mysqld --defaults-file=$DIR/my.cnf &

says I cannot do this from root which is fine because I would rather not
anyways.  so I modified it a bit and tried:

mysqld_safe --defaults-file=$DIR/my.cnf &

I then get the error

WARNING: Defaults file '/my.cnf' not found!

So even though my.cnf is in $DIR i path it out and run:

mysqld_safe --defaults-file=/usr/local/openssl/my.cnf &

This give me an error of:

[EMAIL PROTECTED] openssl]# /usr/local/mysql/bin/mysqld_safe
--defaults-file=/usr/local/openssl/my.cnf
error: Found option without preceding group in config file:
/usr/local/openssl/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file:
/usr/local/openssl/my.cnf at line: 1
Fatal error in defaults handling. Program aborted

My my.cnf file is as follows, also taken from www.mysql.org


cnf=""
cnf="$cnf [client]"
cnf="$cnf ssl-ca=$DIR/cacert.pem"
cnf="$cnf ssl-cert=$DIR/client-cert.pem"
cnf="$cnf ssl-key=$DIR/client-key.pem"
cnf="$cnf [mysqld]"
cnf="$cnf ssl-ca=$DIR/cacert.pem"
cnf="$cnf ssl-cert=$DIR/server-cert.pem"
cnf="$cnf ssl-key=$DIR/server-key.pem"
echo $cnf | replace " " '
' > $DIR/my.cnf


So, I am not sure what is up with that.  Now just trying to log into the
server,

If I try to log in as root
I am able to log into mysql server now using

/usr/local/mysql/bin/mysql --defaults-file=$DIR/my.cnf -p

it then asks for a Password and I am able to get in fine.
Now root is just set normally requiring no ssl.

I did creat a user called hal that I added REQUIRE SSL; to the privileges
granting command.  Now when I try to log in as hal the same way using:

/usr/local/mysql/bin/mysql --defaults-file=$DIR/my.cnf -p

I get:

[EMAIL PROTECTED] sbin]$ /usr/local/mysql/bin/mysql
--defaults-file=$DIR/my.cnf -p
Enter password:
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

So I am not sure about that.  Does this have to do with the fact that i
was not able to run

/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/openssl/my.cnf

?

What does that above command actually do? I know that mysqld_safe starts
the server so I assume taht the
"--defaults-file=/usr/local/openssl/my.cnf"
Starts the sever so it looks to the my.cnf to auth. ssl users?  Anyways
any help you could give me would REALLY help.  I wanted to give you as
much information as possible...thanks...


Conner

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



Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Robert A. Rosenberg
At 12:40 -0400 on 05/10/2004, Lou Olsten wrote about Blocking Selects 
with LOCK TABLES:

According to the docs 
(http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html) :
If a thread obtains a READ lock on a table, that thread (and all 
other threads) can only read from the table. If a thread obtains a 
WRITE lock on a table, only the thread holding the lock can read 
from or write to the table. Other threads are blocked.

So, I've got two threads going (T1, T2).

T1 issues LOCK TABLES transtest WRITE;

But when I go to T2, I can still issue: SELECT * FROM transtest; and 
retrieve all the data.  I CANNOT update, so I know the command is at 
least partially working. As I understand it, I'm supposed to see a 
message from T2 that says something about "This table has been 
locked with the LOCK TABLES command."
Did T2 issue a LOCK TABLES transtest READ; or did you just try doing 
the read without trying to get a READ Lock? If the latter, then that 
is your problem. Once you start locking a table, EVERYONE needs to 
get locks on that table.



It is an InnoDB table, if that matters.

Thanks,

Lou




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


Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Victoria Reznichenko
"Lou Olsten" <[EMAIL PROTECTED]> wrote:
> According to the docs (http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html)
> :
> If a thread obtains a READ lock on a table, that thread (and all other threads) can 
> only
> read from the table. If a thread obtains a WRITE lock on a table, only the thread 
> holding
> the lock can read from or write to the table. Other threads are blocked. 
> 
> So, I've got two threads going (T1, T2). 
>
> T1 issues LOCK TABLES transtest WRITE;
>
> But when I go to T2, I can still issue: SELECT * FROM transtest; and retrieve all the
> data.  I CANNOT update, so I know the command is at least partially working. As I
> understand it, I'm supposed to see a message from T2 that says something about "This
> table has been locked with the LOCK TABLES command."  
>
> It is an InnoDB table, if that matters.

Looks like it's a query cache issue. In this case you get result from the cache.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





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



replication problems

2004-05-10 Thread Gabriel Ricard
I'm not sure what's going on with our replication. Everything was 
working fine, then all of a sudden it stopped. I did STOP SLAVE; RESET 
SLAVE; LOAD DATA FROM MASTER and it completed after a few minutes, but 
when I checked SHOW SLAVE STATUS it no longer had any information about 
the master. I look in the log and there are these messages:

040510 12:46:15  Slave I/O thread: connected to master 
'[EMAIL PROTECTED]:3306',  replication started in log 'FIRST' at position 4
040510 12:46:15  Error reading packet from server: Could not open log 
file (server_errno=1236)
040510 12:46:15  Got fatal error 1236: 'Could not open log file' from 
master when reading data from binary log
040510 12:46:15  Slave I/O thread exiting, read up to log 'FIRST', 
position 4

Any ideas what this is all about? I couldn't find any useful help in 
the manual or archives when I searched for those errors.

- Gabriel

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


Re: Select month from Date

2004-05-10 Thread Michael Stassen
If you want to retrieve rows with the correct month, regardless of year, 
then you probably want the MONTH() function.  It returns the month part of a 
date as an integer from 1 to 12, so you could do

  SELECT id, datecol, text FROM table
  WHERE MONTH(datecol) = $mySelectedMonth;
Note, however, that passing datecol through a function like this renders any 
index on datecol useless for the purposes of the WHERE clause.

If you want rows from the given month of the given year, use BETWEEN.  For 
example, if you want rows from February of 2004, you would

  SELECT id, datecol, text FROM table
  WHERE datecol BETWEEN '2004-02-01' AND '2004-02-29';
In this case, an index on datecol could be used.

See .

Michael

H Bartel wrote:

Hi,

I am trying to start using the mySQL Date functions instead of the unix
timestamp from PHP. I have read the man page several times now, but
still haven't come up with a solution for this simple query:
SELECT id, datecol, text FROM table WHERE month-in-date-col =
$mySelectedMonth;
This shouldn't be too hard, I guess, but it seems I'm missing something
here? Any help greatly appreciated.
Regards,
Holger


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


Re: Select month from Date

2004-05-10 Thread Mihail Manolov
Is this what you're looking for?

SELECT id, datecol, text FROM table WHERE MONTH(datecol)
=$mySelectedMonth;

- Original Message - 
From: "H Bartel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 11:34 AM
Subject: Select month from Date


> Hi,
>
> I am trying to start using the mySQL Date functions instead of the
unix
> timestamp from PHP. I have read the man page several times now,
but
> still haven't come up with a solution for this simple query:
>
> SELECT id, datecol, text FROM table WHERE month-in-date-col =
> $mySelectedMonth;
>
> This shouldn't be too hard, I guess, but it seems I'm missing
something
> here? Any help greatly appreciated.
>
> Regards,
> Holger



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



Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
According to the docs (http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html) :
If a thread obtains a READ lock on a table, that thread (and all other threads) can 
only read from the table. If a thread obtains a WRITE lock on a table, only the thread 
holding the lock can read from or write to the table. Other threads are blocked. 

So, I've got two threads going (T1, T2). 

T1 issues LOCK TABLES transtest WRITE;

But when I go to T2, I can still issue: SELECT * FROM transtest; and retrieve all the 
data.  I CANNOT update, so I know the command is at least partially working. As I 
understand it, I'm supposed to see a message from T2 that says something about "This 
table has been locked with the LOCK TABLES command."  

It is an InnoDB table, if that matters.

Thanks,

Lou



Re: Transaction question - no rollback needed?

2004-05-10 Thread Lou Olsten
See below
- Original Message - 
From: "Jeremy Smith" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED] Mysql. Com" <[EMAIL PROTECTED]>
Sent: Sunday, May 09, 2004 9:31 PM
Subject: Transaction question - no rollback needed?


> Does it make sense to use a transaction just for the row locking
properties,
> and then not needing to error check?
>
> I have a situation where I have seperate files that are being run very
often
> in realtime by many different users.  One is calling a list of 12 football
> players.  The other is updating specific information about that player at
a
> given time.  When the update takes place, occasionally the call for the 12
> players will only return 11 (presumably it is in the middle of an UPDATE).

I don't understand why this would happen under any circumstance. Either your
query should be blocked or it should read a snapshot of the data as it
exists depending on your isolation level.  I can't imagine a scenario where
this would be good (desired) behavior by any RDBMS and it sounds like a
problem.

> So if I set autocommit = 0, begin work, perform the update, and then
commit
> will I in effect guarantee that the other read will wait until the update
is
> done before trying to find its 12 players?

Yes and No.  Using InnoDB, writers do not block readers, so they will still
be able to read committed data, but they won't be able to update or delete
it until your transaction commits.

Lou

>
> I hope I didn't make that too confusing, and I appreciate any help that
can
> be offered.
>
> Thanks,
> Jeremy
>
>
> -- 
> 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]



Select month from Date

2004-05-10 Thread H Bartel
Hi,

I am trying to start using the mySQL Date functions instead of the unix
timestamp from PHP. I have read the man page several times now, but
still haven't come up with a solution for this simple query:

SELECT id, datecol, text FROM table WHERE month-in-date-col =
$mySelectedMonth;

This shouldn't be too hard, I guess, but it seems I'm missing something
here? Any help greatly appreciated.

Regards,
Holger

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



Re: Can I borrow a working model (database/PHP system)?

2004-05-10 Thread Jonathan Pilborough
Try looking at www.firepages.com.au - you can download a zipped 
pre-configured windows mysql installation with a working mysql database
and loads of mySQL sample pages. 
Regards
Jonathan Pilborough


=

-- 
Please fill in my Business Questionnaire at http://www.businessq.tk

-- 
Pupil at Haybridge High School http://www.haybridge.worcs.sch.uk 











Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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



Re: Primary Key

2004-05-10 Thread Roger Baklund
* Ronan Lucio
> Is the Primary Key Column mandatory?
>
> Supposing:
> If I have two tables: Clients and Cars, and a third table Clients_R_Cars,
> that is a relationship between Clients and Cars.
>
> I only need to know what cars the clients have.
> So, I just need to two columns "CliCar_ClientsID" and "CliCar_CarsID",
> the will be my index keys.
>
> Even thus do I need to create a Primary Key Column "CliCar_ID"?

No, you don't need to do that. You can create a primary key based on the two
columns, (CliCar_ClientsID, CliCar_CarsID) or (CliCar_CarsID,
CliCar_ClientsID). Sometimes it is usefull to define both of these compound
indexes, then of course only one of them can be PRIMARY, the other is
defined as an UNIQUE index. You would get the same effect by defining both
as UNIQUE, but having a distinct primary key is 'cleaner'.

--
Roger


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



Re: Primary Key

2004-05-10 Thread Josh Trutwin
On Mon, 10 May 2004 11:15:25 -0300
"Ronan Lucio" <[EMAIL PROTECTED]> wrote:

> Is the Primary Key Column mandatory?
> 
> Supposing:
> If I have two tables: Clients and Cars, and a third table
> Clients_R_Cars, that is a relationship between Clients and Cars.
> 
> I only need to know what cars the clients have.
> So, I just need to two columns "CliCar_ClientsID" and
> "CliCar_CarsID", the will be my index keys.
> 
> Even thus do I need to create a Primary Key Column "CliCar_ID"?

It is not "mandatory" to have a primary key, but you will have to handle duplicate 
rows in your front end program.  Having primary keys is generally a good idea.  In the 
situation that you are talking about, you can have a composite primary key (a primary 
key with more than one colunm) in your Clients_R_Cars table that is (Client_ID, 
Car_ID).  This says that in your Clients_R_Cars table no two rows can have the same 
Client_Id AND Car_ID.  Not sure if this is what you want or not.  

CREATE TABLE Clients_R_Cars (
   Client_ID INT NOT NULL,
   Car_ID INT NOT NULL,
   PRIMARY KEY (Client_ID, Car_ID)
);

If you really wanted to do this the relational way you would use InnoDB (or BDB) and 
use foreign keys as well.

CREATE TABLE Clients_R_Cars (
   Client_ID INT NOT NULL,
   Car_ID INT NOT NULL,
   INDEX client_id_ind (Client_ID),
   INDEX car_id_ind (Car_ID),
   FOREIGN KEY (Client_Id) REFERENCES Client(Client_Id) ON DELETE CASCADE ON UPDATE 
CASCADE,
   FOREIGN KEY (Car_Id) REFERENCES Car(Car_Id) ON DELETE CASCADE ON UPDATE CASCADE,
   PRIMARY KEY (Client_ID, Car_ID)
) TYPE=InnoDB;

Josh

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



Re: Slow login

2004-05-10 Thread gerald_clark
Slow connections are ususally a DNS or reverse DNS problem.

Jiri Matejka wrote:

Hi,
I'm using MySQL 3.23.53 on W2000 and I have a following problem: when I
restart the database server then the first attempt to connect from any
client program last cca 30 seconds (too long!!), each next attempt to
connect lasts less than one second. The traffic is usually very small, so it
can't be caused by it. I tried several client applications and all behave in
the same way, so I guess the problem is inside the database. Can anybody
help me? Thanks
Jiri Matejka, [EMAIL PROTECTED]



 



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


Primary Key

2004-05-10 Thread Ronan Lucio
Hi,

Is the Primary Key Column mandatory?

Supposing:
If I have two tables: Clients and Cars, and a third table Clients_R_Cars,
that is a relationship between Clients and Cars.

I only need to know what cars the clients have.
So, I just need to two columns "CliCar_ClientsID" and "CliCar_CarsID",
the will be my index keys.

Even thus do I need to create a Primary Key Column "CliCar_ID"?

Thanks,
Ronan



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



Re: Innodb + full text searching

2004-05-10 Thread Ronan Lucio
> Hi there, I am aware this isnt possible. I would like the power of Innodb,
> but one of my applications also requires the boolean search within blocks
of
> text, how can i do this efficiently ?

I know it isn´t so efficient, but you can use:

SELECT *
FROM yourtable
WHERE text_column LIKE '%word%'

Ronan



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



Foreign Key Renaming Problem

2004-05-10 Thread Deepak Vishwanathan
Hi,

 

I have a table named t1 with a column x1 which is the primary key for
that table. There are some other tables that reference this table t1 on
x1 with foreign key constraints.

 

I wanted to rename the column x1 for some reason, so, I went ahead and
renamed the column x1 to y1. I was able to change it successfully. Then,
I wanted to rename the foreign key's column name from x1 to y1 in all
referencing tables and I got the error ERROR 1025: Error on rename of
'./Test/t1' to './Test/#sql2-3c90-4bd' (errno: 121).

 

So, then, I tried dropping the foreign key constraints on the
referencing tables with alter table command with the foreign key value
that I got from show create table command for those referencing
tables...But, the system won't allow me to do that.

 

I understand this problem is because of the foreign key
constraintsDoes that mean, I should have dropped the foreign key
constraint in referencing tables before I renamed the column x1 to y1 in
the base table t1???

 

Is there a way that I can solve the problem without dropping those
tables and creating them again??

 

Thanks

Deepak



Re: Speed Problem

2004-05-10 Thread gerald_clark


Mustafa Yalcin Acikyildiz wrote:

hello.
i have a speed problem ;).
table:
title_id bigint(50),title char(200), cdate datetime
query:
select title, max(cdate) as mdt, count(title_id) as num
from entry
where (date_format(cdate, '%Y-%m-%d %H:%i:%s')

The function in whre clause forces a full table scan.
try
where  ( date between 2004050701 and 20040508235959 ) and ...
between '2004-05-07 00:00:01' AND '2004-05-08 23:59:59')
and
(on = 'Y')
group by title
order by mdt desc
limit 0,25
(have 40+ records in table, server result:  3.0547 second)

 



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


RE: problems with foreign keys revisited

2004-05-10 Thread Victor Pendleton
You need to set the Foreign Key on complaint_threads if you want a cascading
delete and not on the complaints table. You will get a Foreign key error
when you run your two DDL statements as is without turning off Foreign key
checks.

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 5/7/04 2:17 AM
Subject: problems with foreign keys revisited

Hi there, I am having some issues between two tables and foreign keys.

Here is the two tables I have setup.

| complaints |CREATE TABLE `complaints` (
  `complaintID` int(11) NOT NULL auto_increment,
  `ticket_number` varchar(20) NOT NULL default '',
  `complainant_name` varchar(100) NOT NULL default '',
  `program` varchar(100) NOT NULL default '',
  `date_added` datetime NOT NULL default '-00-00 00:00:00',
  `date_received` date NOT NULL default '-00-00',
  `date_response_due` date NOT NULL default '-00-00',
  `date_response_sent` date NOT NULL default '-00-00',
  `breach_complaint` tinyint(1) NOT NULL default '0',
  `nuisance_complaint` tinyint(1) NOT NULL default '0',
  `complaint_typeID` int(11) NOT NULL default '0',
  `refererID` int(11) NOT NULL default '0',
  `centreID` tinyint(4) NOT NULL default '0',
  `divisionID` tinyint(4) NOT NULL default '0',
  `complaint_statusID` tinyint(4) NOT NULL default '0',
  `userID` int(11) NOT NULL default '0',
  PRIMARY KEY  (`complaintID`),
  UNIQUE KEY `complaintID` (`complaintID`),
  FOREIGN KEY (`complaintID`) REFERENCES `complaint_threads`
(`complaintID`) ON DELETE CASCADE
) TYPE=InnoDB |


| complaint_threads | CREATE TABLE `complaint_threads` (
  `threadID` int(11) NOT NULL auto_increment,
  `message` text NOT NULL,
  `complaintID` int(11) NOT NULL default '0',
  `date_added` datetime NOT NULL default '-00-00 00:00:00',
  `userID` int(11) NOT NULL default '0',
  `parent_threadID` int(11) NOT NULL default '0',
  PRIMARY KEY  (`threadID`),
  KEY `complaintID` (`complaintID`)
) TYPE=InnoDB |


The complaints  table I want to join to the complaint_threads table
using
complaintID. I dont know if I have set this up right, but i'm getting
foreign key constraint errors :\

How can i set this up properly, so when I delete an entry in complaints
it
will cascade delete in complaint_threads . Please let me know.

Dan



-- 
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: Searching in several tabels

2004-05-10 Thread Egor Egorov
"Naim" <[EMAIL PROTECTED]> wrote:
> I have a database with several tabels. Example:
>
> Database articles:
>
> Table1:
> id 
> name
> title
> tekst
>
> Table2
> id
> name
> title
> tekst
>
> Table3
> id 
> name
> title
> tekst
>
> Now I want to search for a specifik title within all the database and then print the
> result - how do I do that.
>
> I have tried with:
>
>   $tilWhile = mysql_query("SELECT * FROM table1='$_GET[id]' OR
> table2='$_GET[id]' table3='$_GET[id]' ");
>  $resultater = mysql_num_rows($tilWhile);
>  while ($row = mysql_fetch_array($tilWhile)){
>   print "$row[tekst]"; #// Give me the tekst from the article which 
> has that
>  title (the title contained in $_GET[id].
>  }
> mysql_close();
>  ?>
>
> I know this is partly a PHP question but the problem lies within the SELECT. I get
> "Supplied argument is not a valid MySQL"
> Try not to look to hard at my PHP because it might be better to do it in a different 
> way.
> I am using MySQL 4.

Use mysql_error() function to get error message.
Your SELECT statement is incorrect. Seems you need UNION, look at:
http://dev.mysql.com/doc/mysql/en/UNION.html

Syntax of SELECT statement is described at:
http://dev.mysql.com/doc/mysql/en/SELECT.html   



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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



RE: Error creating table in MySQL 5.0

2004-05-10 Thread Victor Pendleton
Have you verified the syntax from the MySQL command line?

-Original Message-
From: Marvin Cummings
To: [EMAIL PROTECTED]
Sent: 5/9/04 7:26 PM
Subject: Error creating table in MySQL 5.0

Wondering if anyone can give me some help with this error I'm getting
when trying to create this table:

 

ERROR 1064 (42000): 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 '$sql

 = "CREATE TABLE $subdivtable (

$subdivcolumn[subdiv_title] varchar(50),

$su' at line 1

 

The syntax I'm using to create this table: 

 

...\bin\Mysql> $sql = "CREATE TABLE $subdivtable ( 
$subdivcolumn[subdiv_title] varchar(50), 
$subdivcolumn[subdiv_id] int(4) DEFAULT '0' NOT NULL
auto_increment, 
$subdivcolumn[country_id] int(4) NOT NULL, 
PRIMARY KEY(subdiv_id))"; 

 

I'm running mysql 5.0 on a w2k3 server. 


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



Re: Importing at command line from text file

2004-05-10 Thread Michael Kruckenberg
Robert Ameeti wrote:
I'm a newbie trying to follow a tutorial. The tutorial says to type:

mysql employees The employee.dat file doesn't have to be in any specific location, as 
long as you can read it.

To run the command above, cd into the directory with the employee.dat 
file (maybe your home directory?) and issue the statement. You can also 
use an absolute path, ie:

mysql employees < /home//employee.dat

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


Searching in several tabels

2004-05-10 Thread Naim
Hi All

I have a database with several tabels. Example:

Database articles:

Table1:
id 
name
title
tekst

Table2
id
name
title
tekst

Table3
id 
name
title
tekst

Now I want to search for a specifik title within all the database and then print the 
result - how do I do that.

I have tried with:



I know this is partly a PHP question but the problem lies within the SELECT. I get 
"Supplied argument is not a valid MySQL"

Try not to look to hard at my PHP because it might be better to do it in a different 
way. I am using MySQL 4.

Thanks

Naim

Re: Problems compiling NDB-Cluster mysql-4.1.2

2004-05-10 Thread Anders Karlsson
You have to have zlib installed. This seems to be a bug, which I have 
just reported. The fix is
simple: install zlib.
You can check with a simple C-program like this:

#include 
#include 
int main(int argc, char *argv[])
  {
  printf("Hello, World\n");
  return 0;
  }
If this refuses to compile (missing includefile) you are
missing zlib includes at least. You might want to link with -lz to check
that the library is there too, or even call one one the functions in 
zlib (compress
for example).
Install zlib and make sure this little program compiles, if it does, you
should be OK.

/Karlsson
[EMAIL PROTECTED] wrote:
Hello all,

i want to compile the development tree source from
bk://mysql.bkbits.net/mysql-4.1 on SuSE 8.2 Linux. The compiling of the
mysql-4.1 without the ndb-cluster works fine.
When set the configuration-option --with-ndbcluster, the compilation
fails with the error:
ha_ndbcluster.o(.text+0x3b5c): In function `packfrm(void const*,
unsigned, void const**, unsigned*)':
: undefined reference to `my_compress'
ha_ndbcluster.o(.text+0x3c34): In function `unpackfrm(void const**,
unsigned*, void const*)':
: undefined reference to `my_uncompress'
collect2: ld returned 1 exit status
make[4]: *** [mysqld] Error 1
make[4]: Leaving directory `/home/Steffen/mysql-4.1/sql'
I've tried to set the CXX and/or CC environment-variable to gcc, but the
compilation fails with the same error.
Installed Software Versions:
Kernel: 2.4.22-33
gcc/cpp : 3.3-23
bison: 1.875
autoconf: 2.53
automake: 1.5
libtool: 1.5
Thanks
Steffen
 

--
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Anders Karlsson ([EMAIL PROTECTED])
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/  /_/\_, /___/\___\_\___/ Stockholm
   <___/   www.mysql.com Cellphone: +46 708 608121
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Two problems with prepared statements in ver 5.0.0

2004-05-10 Thread Kevin Cowley
The documentation is wrong. The API for 5 hasn't been implemented yet - it
still uses the 4.1.1/4.1.2 API.

See my other posts on performance etc (should be on both the bugs and Mysql
lists). I suggest you download the latest 4.1.2 snapshot and work with that.

Kevin Cowley
R&D
 
Tel: 0118 902 9099 (direct line)
Email: [EMAIL PROTECTED]
Web: http://www.alchemetrics.co.uk

-Original Message-
From: Ken Paradox [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2004 18:13
To: [EMAIL PROTECTED]
Subject: Two problems with prepared statements in ver 5.0.0

Hello,

I have been working with the C API in version 4.1.1.  I encountered a
problem which I thought might be resolved in version 5.0.0, so I have loaded
the RPMs for version 5.0.0 onto my development RedHat Linux system.
-
Problem 1 - can't link:
According to documentation, many of the names of prepared statement
functions have changed in version 5.0.0.  I changed my C code to use the new
names, but when I try to link, all of the new names are not found in the
libraries.  Here are some sample error message:

sql.o: In function `MYSQL_ADD_PREP':
sql.o(.text+0x1ac3): undefined reference to `mysql_stmt_init'
sql.o(.text+0x1b2e): undefined reference to `mysql_stmt_prepare'
sql.o(.text+0x1b7a): undefined reference to `mysql_stmt_result_metadata'
sql.o(.text+0x1db6): undefined reference to `mysql_stmt_init'
sql.o(.text+0x1e22): undefined reference to `mysql_stmt_prepare'
sql.o(.text+0x1e6e): undefined reference to `mysql_stmt_param_count'
sql.o(.text+0x2127): undefined reference to `mysql_stmt_bind_param'

I had all of this working with version 4.1.1, except that I had a problem
trying to use two different prepared statements alternately.
-
Problem 2 - mysql_stmt_result_metadata() returns int.
According to documentation, this function should return a pointer to
MYSQL_RES.  In version 4.1.1, the previous function - named
mysql_get_metadata - did work that way.  But now I get a warning when I
compile saying:

coresql.c:183: warning: assignment makes pointer from integer without a cast
-

Is there something I am missing, or is this version not well tested for
these features?  Is anyone using this?

Thanks,  Ken



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


**
ALCHEMETRICS LIMITED (ALCHEMETRICS)
Mulberry Park, Fishponds Road, Wokingham, Berkshire, RG41 2GX
Tel:  +44 (0) 118 902 9000Fax:  +44 (0) 118 902 9001
This e-mail is confidential and is intended for the use of the addressee only.
If you are not the intended recipient, you are hereby notified that you must 
not use, copy, disclose, otherwise disseminate or take any action based on 
this e-mail or any information herein.
If you receive this transmission in error, please notify the sender
immediately by reply e-mail or by using the contact details above and then
delete this e-mail.
Please note that e-mail may be susceptible to data corruption, interception 
and unauthorised amendment.  Alchemetrics does not accept any liability for 
any such corruption, interception, amendment or the consequences thereof.
**


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



SHOW PROCESSLIST displays incorrect slave latency in MySQL 3.23

2004-05-10 Thread mysql-support
>Description:
   When I do 'SHOW PROCESSLIST' on my server currently, the line for 'system user' is 
as follows:
++-+--+-+-++---+--+
| Id | User| Host | db  | Command | Time   | State 
| Info |
++-+--+-+-++---+--+
| 495801 | system user | none | NULL| Connect | 4294967211 | Reading 
master update | NULL |

A few minutes before, and for a number of days, it had been displaying very low ( < 
100s) numbers.
Subtracting the number from 2 ** 32 gives what looks like a sensible figure, so this 
may be 
a signed/unsigned bug.
>How-To-Repeat:
Hard to say; MySQL has been up for approaching 64 days - not sure if that's 
significant. Doing SLAVE STOP; SLAVE START; has no effect.

>Fix:
Unknown (except to work around it as shown above).
>Submitter-Id:  
>Originator:root
>Organization:
NewsNow Publishing Limited
>MySQL support: none
>Synopsis:  SHOW PROCESSLIST displays incorrect slave latency in MySQL 3.23
>Severity:  non-critical
>Priority:  medium
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.49 (Source distribution) (actually debian 'woody' stable 
>distribution package)

>Environment:
Machine: Dell PowerEdge 2650 2xPIV Xeon 2.6 GHz w. PERC 3/Di RAID controller
OS: Debian GNU/Linux 'woody/stable' distribution, with custom-compiled kernel 2.4.24.

System: Linux craven 2.4.24dell-poweredge-2650 #1 SMP Tue Jan 6 13:09:17 GMT 2004 i686 
unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Apr 24  2003 /lib/libc.so.6 -> libc-2.2.5.so
-rwxr-xr-x1 root root  1153784 Apr  8  2003 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2391002 Apr  8  2003 /usr/lib/libc.a
-rw-r--r--1 root root  178 Apr  8  2003 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr --exec-prefix=/usr 
--libexecdir=/usr/sbin --datadir=/usr/share --sysconfdir=/etc/mysql 
--localstatedir=/var/lib/mysql --includedir=/usr/include --infodir=/usr/share/info 
--mandir=/usr/share/man --enable-shared --with-libwrap --enable-assembler 
--with-berkeley-db --with-innodb --enable-static --enable-shared --enable-local-infile 
--with-raid --enable-thread-safe-client --without-readline 
--with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-mysqld-user=mysql 
--without-bench --with-client-ldflags=-lstdc++ --with-extra-charsets=all

Output from 'mysqladmin extended-status':

+--++
| Variable_name| Value  |
+--++
| Aborted_clients  | 1451   |
| Aborted_connects | 83 |
| Bytes_received   | 2448140052 |
| Bytes_sent   | 2623702023 |
| Com_admin_commands   | 0  |
| Com_alter_table  | 14 |
| Com_analyze  | 0  |
| Com_backup_table | 0  |
| Com_begin| 0  |
| Com_change_db| 3  |
| Com_change_master| 1  |
| Com_check| 0  |
| Com_commit   | 0  |
| Com_create_db| 1  |
| Com_create_function  | 3  |
| Com_create_index | 0  |
| Com_create_table | 2  |
| Com_delete   | 822956 |
| Com_drop_db  | 0  |
| Com_drop_function| 0  |
| Com_drop_index   | 0  |
| Com_drop_table   | 0  |
| Com_flush| 2  |
| Com_grant| 2  |
| Com_insert   | 444024318  |
| Com_insert_select| 21493  |
| Com_kill | 0  |
| Com_load | 0  |
| Com_load_master_table| 0  |
| Com_lock_tables  | 0  |
| Com_optimize | 0  |
| Com_purge| 0  |
| Com_rename_table | 2  |
| Com_repair   | 0  |
| Com_replace  | 7483359|
| Com_replace_select   | 0  |
| Com_reset| 0  |
| Com_restore_table| 0  |
| Com_revoke   | 0  |
| Com_rollback | 0  |
| Com_select   | 256096442  |
| Com_set_option   | 6  |
| Com_show_binlogs | 0  |
| Com_show_create  | 0  |
| Com_show_databases   | 28 |
| Com_show_fields  | 2306   |
| Com_show_grants  | 0  |
| Com_

Re: Disconnect odbc from localhost

2004-05-10 Thread Egor Egorov
"Marvin Cummings" <[EMAIL PROTECTED]> wrote:
> Can someone please advise me on how to prevent the [EMAIL PROTECTED]
> connection? This is preventing me from accessing any of my databases in
> phpMyAdmin.

ODBC is default username on Windows. You should specify username when you connect to 
the MySQL server.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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



Re: This thing called MOD

2004-05-10 Thread Anders Karlsson
MOD returns the remainder of the division, assuming we use integer
arithmetic. I.e.:
234 / 10 = 23
Then 4 remains (234 - (10 * 23))
Or:
23 / 6: (23 - (6 * 3))  = 5
Best ragards
Anders Karlsson
Thomas Nyman wrote:
Hi All

I'm a bit perplexed..perhaps its a language thing,,but

the MYSQL reference manual says that

MOD
..Returns the remainder of N divided by M...
and gives an example SELECT MOD(234,10)
 --> 4
This I do not understand. remainder of N divided by M - isn't that 
simply division?

I mean 234 divided by 10 does not equal 4

On my own machine..if I do SELECT MOD(23,6) I would expect 3,8333 as 
the result and not 5.

SInce MOD is returning something other than I expect there must be 
something I am missingin other words...what is MOD returning??

Thomas


--
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Anders Karlsson ([EMAIL PROTECTED])
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/  /_/\_, /___/\___\_\___/ Stockholm
   <___/   www.mysql.com Cellphone: +46 708 608121
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]