InnoDB problem.

2013-07-22 Thread Luis H. Forchesatto
Greetings.

I've restored an MySQL backup from our MySQL server into another server.
The backup includes InnoDB tables. After the import, MySQL recognized the
innodb tables fine but when I try to do a check table ir returns that the
table doesn't exists.

Permission and owner of the table files (.frm files) are ok, since it
recognizes MyISAM tables (they have the same permission). Innodb engine is
enabled..

Which can cause the tables to appears as "non existent", as far as they do
really exist?

-- 
Att.*
***
Luis H. Forchesatto
http://br.linkedin.com/pub/luis-henrique-forchesatto/73/684/a67


MySQL crashing.

2013-07-15 Thread Luis H. Forchesatto
Greetings.

I'm receiving the following error log often on my MySQL database server:

130715  8:40:18InnoDB: Assertion failure in thread 2974165904 in file
btr0cur.c line 160
InnoDB: Failing assertion: page_is_comp(get_page) == page_is_comp(page)
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
130715  8:40:18 - mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail.

key_buffer_size=327155712
read_buffer_size=131072
max_used_connections=19
max_connections=1
threads_connected=6
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections =
3450801 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xb1460fc8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x81f22d3
0x839fb8a
0x83a0b0f
0x83ab815
0x837208e
0x8372855
0x8373948
0x835690a
0x83b6cfc
0x83397cf
0xb7f644fb
0xb7d78e5e
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and
follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

As it said it seems to be something related to InnoDB databases, but I got
no idea on where to start looking for the error.

Can someone post a troubleshoot for me to follow or contribute with
speculations?

-- 
Att.*
***
Luis H. Forchesatto
http://br.linkedin.com/pub/luis-henrique-forchesatto/73/684/a67


Re: store transaction rollback information

2013-01-21 Thread Luis Motta Campos
On 26 Jul 2012, at 21:43, James Devine wrote:

> I have a large series of mysql changes(inserts/deletes/updates) taking
> place in a transaction.  After committing there may be some times where I
> need to roll those changes back later on.  Is there an easy way of
> determining what was changed in a transaction in a way I can store it and
> rollback later?


James, 

The way you describe it sounds like you have a modeling issue with your system. 

Committed transactions are not supposed to be rolled back.

Your System Architect has to arrange things in such a way that all the 
information required to decide if a change to the database can be made 
permanent is available to the application *before* COMMIT-time. Until then, 
you're supposed to hold your transaction (and all locks resulting from it) open 
and uncommitted.

In other words: once a transaction is committed, the changes are permanent. 
Rolling it back may still be possible, but it will be complicated and extremely 
expensive, computationally speaking. I strongly recommend you to review your 
design choices.

I hope this helps.
Kind regards,
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


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



How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...;

2012-09-23 Thread Luis Daniel Lucio Quiroz
Helo,

Just wondering if is possible to block SELECT queries that doesnt have
a WHERE statement within.


LD

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



RE: large temp files created by mysql

2012-05-24 Thread Luis Daniel Lucio Quiroz
For my propouses aprox is fine. I guess for others it doesnt
El may 24, 2012 9:59 a.m., "Rick James"  escribió:

> Maybe.
>
> 1. The "Rows" is approximate, so you could over-shoot or under-shoot the
> end of the table.
>
> 2. OFFSET (limit $r,1) still has to scan $r rows.
>
> 3. SELECT * with an OFFSET will read the entire rows.  SELECT `foo`, where
> `foo` is indexed, but not the InnoDB PRIMARY KEY, will scan only the
> INDEX(foo).  This is likely to be much faster.  But you are unlikely to do
> that unless foo is UNIQUE.
>
> A slight improvement (addressing both issues) is to decide which end to
> approach from.  But scanning from the end needs an ORDER BY, preferably on
> the PRIMARY KEY.
>
> etc.
>
>
> > -Original Message-
> > From: Luis Daniel Lucio Quiroz [mailto:luis.daniel.lu...@gmail.com]
> > Sent: Thursday, May 24, 2012 12:00 AM
> > To: Jan Steinman
> > Cc: mysql@lists.mysql.com
> > Subject: Re: large temp files created by mysql
> >
> > I got a solution maybe
> >
> > step 1:
> > mysql> explain select * from users;
> > ++-+---+--+---+--+-+---
> > ---+--+---+
> > | id | select_type | table | type | possible_keys | key  | key_len |
> > ref  | rows | Extra |
> > ++-+---+--+---+--+-+---
> > ---+--+---+
> > |  1 | SIMPLE  | users | ALL  | NULL  | NULL | NULL|
> > NULL | 32883093 |   |
> > ++-+---+--+---+--+-+---
> > ---+--+---+
> > 1 row in set (0.00 sec)
> >
> > so you get the "rows" field
> >
> > Step2:
> > select * from users, limit $r,1
> >
> >
> > What do you think? Is the only way i found what delays seconds not
> > minuts. USERS is a 19GB Table for me.
> >
> > LD
> >
> > 2011/10/30 Jan Steinman :
> > > Actually, having tried that, you still need the ORDER BY RAND() in
> > there. Otherwise, I keep getting the same record over and over. But it
> > surely cuts way down on the number of rows that need to be sorted.
> > >
> > > So if your table size is fairly stable, and you pick a good number
> > for the WHERE constant, you can make this quite speedy.
> > >
> > > Still, it seems there should be a better way...
> > >
> > > On 30 Oct 11, at 18:51, Jan Steinman wrote:
> > >
> > >>> From: mos 
> > >>>
> > >>>
> > >>> At 10:34 AM 10/24/2011, you wrote:
> > >>>> select id from table order by rand() limit 1; is doing as example
> > a
> > >>>> dumb temporary table with the full size
> > >>>
> > >>> Because it has to sort the entire table, then it returns the one
> > >>> row. This of course is extremely inefficient. :)
> > >>
> > >> That is absolutely incredible and counter-intuitive, and (as you
> > say) extremely inefficient!
> > >>
> > >> This is used everywhere. Perhaps it is one of the biggest "anti-
> > patterns" in SQL. I just checked two different SQL "cookbook" sites,
> > and they both recommend ORDER BY RAND().
> > >>
> > >> I just googled around a bit, and found that putting RAND() in the
> > WHERE clause is very efficient:
> > >>
> > >> SELECT id FROM table WHERE RAND() < 0.01 LIMIT 1
> > >>
> > >> The comparison constant can be optimized for the number of rows you
> > have. The above returns the first record of 1% of the table. If you
> > have a million rows, you might want to bump that to something like 100
> > parts per million or so.
> > >>
> > >> But really, folks, this is something so ubiquitous and so
> > >> recommended, why can't the query optimizer look out for ORDER BY
> > >> RAND() and simply skip the table sort and just grab some record?
> > >> (Hopefully using something better than Knuth's LCRNG...)
> > >>
> > >> 
> > >> Learning to think wholistically requires an overriding, or reversal,
> > >> of much of the cultural heritage of the last few hundred years. --
> > >> David Holmgren
> > >>  Jan Steinman, EcoReality Co-op 
> > >>
> > >
> > > 
> > > Within a few human generations, the low-energy patterns observable in
> > > natural landscapes will again form the basis of human system design
> > > after the richest deposits of fossil fuels and minerals are
> > exhausted.
> > > -- David Holmgren
> > >  Jan Steinman, EcoReality Co-op 
> > >
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql To unsubscribe:
> > > http://lists.mysql.com/mysql?unsub=luis.daniel.lu...@gmail.com
> > >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/mysql
>
>


Re: large temp files created by mysql

2012-05-24 Thread Luis Daniel Lucio Quiroz
I got a solution maybe

step 1:
mysql> explain select * from users;
++-+---+--+---+--+-+--+--+---+
| id | select_type | table | type | possible_keys | key  | key_len |
ref  | rows | Extra |
++-+---+--+---+--+-+--+--+---+
|  1 | SIMPLE  | users | ALL  | NULL  | NULL | NULL|
NULL | 32883093 |   |
++-+---+--+---+--+-+--+--+---+
1 row in set (0.00 sec)

so you get the "rows" field

Step2:
select * from users, limit $r,1


What do you think? Is the only way i found what delays seconds not
minuts. USERS is a 19GB Table for me.

LD

2011/10/30 Jan Steinman :
> Actually, having tried that, you still need the ORDER BY RAND() in there. 
> Otherwise, I keep getting the same record over and over. But it surely cuts 
> way down on the number of rows that need to be sorted.
>
> So if your table size is fairly stable, and you pick a good number for the 
> WHERE constant, you can make this quite speedy.
>
> Still, it seems there should be a better way...
>
> On 30 Oct 11, at 18:51, Jan Steinman wrote:
>
>>> From: mos 
>>>
>>>
>>> At 10:34 AM 10/24/2011, you wrote:
 select id from table order by rand() limit 1;
 is doing as example a dumb temporary table with the full size
>>>
>>> Because it has to sort the entire table, then it returns the one row. This 
>>> of course is extremely inefficient. :)
>>
>> That is absolutely incredible and counter-intuitive, and (as you say) 
>> extremely inefficient!
>>
>> This is used everywhere. Perhaps it is one of the biggest "anti-patterns" in 
>> SQL. I just checked two different SQL "cookbook" sites, and they both 
>> recommend ORDER BY RAND().
>>
>> I just googled around a bit, and found that putting RAND() in the WHERE 
>> clause is very efficient:
>>
>> SELECT id FROM table WHERE RAND() < 0.01 LIMIT 1
>>
>> The comparison constant can be optimized for the number of rows you have. 
>> The above returns the first record of 1% of the table. If you have a million 
>> rows, you might want to bump that to something like 100 parts per million or 
>> so.
>>
>> But really, folks, this is something so ubiquitous and so recommended, why 
>> can't the query optimizer look out for ORDER BY RAND() and simply skip the 
>> table sort and just grab some record? (Hopefully using something better than 
>> Knuth's LCRNG...)
>>
>> 
>> Learning to think wholistically requires an overriding, or reversal, of much 
>> of the cultural heritage of the last few hundred years. -- David Holmgren
>>  Jan Steinman, EcoReality Co-op 
>>
>
> 
> Within a few human generations, the low-energy patterns observable in natural 
> landscapes will again form the basis of human system design after the richest 
> deposits of fossil fuels and minerals are exhausted. -- David Holmgren
>  Jan Steinman, EcoReality Co-op 
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=luis.daniel.lu...@gmail.com
>

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



Re: Commit commands with SELECT

2012-04-13 Thread Luis Motta Campos
Hello 

COMMIT statements may or may not force the database to call fflush() to flush 
your double-write to disk. This may or may not affect your performance, 
depending on your scale, traffic, and how much you're trying to squeeze your 
hardware. If you're working on the borderline like I am, benchmark, benchmark, 
benchmark.

My 0.02€.

Kind regards,
--
Luis Motta Campos
is a DBA, Foodie, and Photographer

On 9 Apr 2012, at 20:47, Karen Abgarian wrote:

> I vote 1) yes 2) no
> 
> It could be result of the app developer's convenience to just wrap anything 
> they submit to the database in a transaction.   Selects are not transaction 
> but autocommit/commit do no harm.   That might be the thinking. 
> 
> 
> On 09.04.2012, at 11:38, Rozeboom, Kay [DAS] wrote:
> 
>> We have an application with blocks of code that begin with setting 
>> autocommit off, and end with a commit.  The code in between does only 
>> selects, no updating.
>> 
>> 1)  Am I correct in thinking that the autocommit and commit statements 
>> don't really accomplish anything useful?
>> 
>> 2)  If the autocommit and commit statements are unneeded, do they add 
>> enough additional overhead that I should be concerned about them?
>> 
>> Kay Rozeboom
>> Information Technology Enterprise
>> Iowa Department of Administrative Services
>> Telephone: 515.281.6139   Fax: 515.281.6137
>> Email:  kay.rozeb...@iowa.gov
>> 
>> 
>> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
> 



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



Re: Tuning mysql

2012-02-08 Thread Luis Motta Campos
On 7 Feb 2012, at 00:55, Grant wrote:

> I'm running mysql on Gentoo with 4GB RAM and I'm wondering if I should
> change any settings.  I'm using mysql with a website on the same
> server so I have skip-networking, and I increased key_buffer and
> innodb_buffer_pool_size from 16M to 256M.  Everything else is default.
> Should I consider changing these or any other settings?

Grant, 

What I usually recommend about database tuning:

1. Visibility.
   There's no way you can see if your changes are good or bad for performance 
if you don't have a waterline and visibility. I recommend you to pick your 
favourite performance graphing tool and ensure we have good graphs available 
for all the most important key performance indicators that you can think of. 
The more graphs, the easier it gets to spot bottlenecks and understand 
root-causes of performance issues.

2. Monogamy
   Tuning MySQL databases that mix MyISAM and InnoDB storage engines is hard 
and tricky. If you have the chance, I strongly recommend you choosing one 
storage engine and sticking to it above everything else. This might sound like 
a hard choice to make in the beginning but it will pay you back with good 
dividends later on, both in improved performance and lower resource consumption 
than the equivalent databases with hybrid storage engine options.

3. Control
   Before you start making changes to your configuration, I strongly recommend 
you to version-control it. I used to use and recommend RCS for this, but Git is 
a more modern, yet flexible and powerful version control to which I've feel in 
love. Version controlling your changes gives you control over your 
configuration and helps determining what changes happened in which order and 
when. This helps you pin-pointing results of your changes on your graphs and 
correlating what you do with how the server reacts. 

4. Logs
   Make sure you enable all the information you can about your slow-query log, 
this is an essential part of detecting query and schema related bottlenecks. 
Here at the office we use Percona Patched MySQL databases, and I usually enable 
all the Percona-provided extensions to the slow query log.

5. Work Holistically
   Database Tuning isn't an isolated process. You should start from a "best 
guess" configuration and work in cycles towards a configuration that satisfies 
your needs without compromising more resources than you have available. 
Remember, there's no point in adjusting a couple of database variables without 
understanding what it means for the application and for the queries / schema. 
Make sure you include your developers (if you're not one of them) and take into 
consideration all the information you have at hand.

I hope this helps with getting started. 

Good luck, and kind regards.
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


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



help needed restoring crashed mysql

2011-11-29 Thread Luis Pugoy
Hello. I have the following problem.

I was importing a large database to mysql using mysqldump. Unfortunately
this filled up the whole disk, and mysqldump exited with an error that the
table it is currently writing to is full. Checking df -h it shows that the
disk usage is at 100%. I decided to drop the database I was importing, but
rechecking df -h shows that it is still at 100%. I then looked for the
cause of this and found a very large file under /var/lib/mysql. I think it
is ibdata1. I deleted it and rechecked df -h, but it is stll at 100%. I
then stopped mysql and finally the output of df -h was correct. However,
when I try to restart mysql it outputs the following errors in the error
log; it is in the attached file.

Thanks for anyone that could help.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
29 12:51:23  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Page directory corruption: infimum not pointed to
29 12:51:23  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex (LOTS OF ZEROES...) ;InnoDB: End of page dump
29 12:56:28  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form 
checksum 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
29 12:56:28InnoDB: Error: trying to access a stray pointer 0x33987ff8
InnoDB: buf pool start is at 0xb3978000, end at 0xb4178000
InnoDB: Probable reason is database corruption or memory
InnoDB: corruption. If this happens in an InnoDB database recovery, see
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: how to force recovery.
29 12:56:28  InnoDB: Assertion failure in thread 3067451088 in file 
../../../storage/innobase/include/buf0buf.ic line 264
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
29 12:56:28 - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 345919 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x3
/usr/sbin/mysqld(my_print_stacktrace+0x2d) [0xb763ecbd]
/usr/sbin/mysqld(handle_segfault+0x494) [0xb730a854]
[0xb7085400]
/lib/tls/i686/nosegneg/libc.so.6(abort+0x182) [0xb6d88d42]
/usr/sbin/mysqld(page_cur_search_with_match+0x9e3) [0xb755cdb3]
/usr/sbin/mysqld(btr_cur_search_to_nth_level+0x5ae) [0xb74f2c8e]
/usr/sbin/mysqld(btr_pcur_open_on_user_rec+0x73) [0xb75be6c3]
/usr/sbin/mysqld(+0x46fc55) [0xb7512c55]
/usr/sbin/mysqld(dict_load_sys_table+0x75) [0xb75195c5]
/usr/sbin/mysqld(dict_boot+0xd27) [0xb75bf927]
/usr/sbin/mysqld(innobase_start_or_create_for_mysql+0x1299) [0xb7595459]
/usr/sbin/mysqld(+0x43e7e6) [0xb74e17e6]
/usr/sbin/mysqld(ha_initialize_handlerton(st_plugin_int*)+0x3f) [0xb741611f]
/usr/sbin/mysqld(+0x411f2a) [0xb74b4f2a]
/usr/sbin/mysqld(plugin_init(int*, char**, int)+0x8a7) [0xb74b8827]
/usr/sbin/mysqld(+0x2698d2) [0xb730c8d2]
/usr/sbin/mysqld(main+0x1fa) [0xb730ff9a]
/lib/tls/i686/nosegneg/libc.so.6(__libc_start_main+0xe6) [0xb6d71bd6]
/usr/sbin/mysqld(+0x182d81) [0xb7225d81]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.


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

Re: add index to slave but not master

2011-10-31 Thread Luis Motta Campos
On 31 Oct 2011, at 08:46, Jeff Pang wrote:
> Hello,
> 
> I have a question that, if I add the index to the table in slave, but
> don't do it in master, will it make problems?


Jeff,

I manage some big data here and this is my preferred strategy - shard the 
workload in different mysql pools (behind a load balancer) and give each 
different pool a different, custom-tailored index set optimized for the 
workload expected.

Be warned that if you promote a new master without ensuring index-compatibility 
with the master workload you will (obviously) observe performance variations.

Good luck.
Cheers!
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: importing mysql structures only or restore ignoring non-existing tables and columns?

2011-10-31 Thread Luis Motta Campos
On 29 Oct 2011, at 22:59, luci spam wrote:

> I have 2 servers (1 for development, 1 for service)
> 
> I keep ADD/DELETE columns and CREATE/DELETE Indexes on my development
> server, so these 2 server have similar but different mysql data structures.
> 
> I know there's an option to expert structures only. (like –no-data)
> 
> Is there a way (except 3rd party software like mysqldiff.org) to import
> structure only to an existing data?

> Alternativley, is there a way to import only data ignoring non-existing
> tables and colums? (I thought this may do the trick if I back-up data ->
> import structure -> restore the data.)


You can use SELECT...INTO DUMPFILE and LOAD DATA INFILE... to achieve what I 
believe you're asking here, save the eventual misunderstanding. ;-)

Cheers
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: how to understand seconds_behind_master

2011-10-28 Thread Luis Motta Campos
On 28 Oct 2011, at 10:03, 王科选 wrote:
> According to ,
> 
> seconds_behinds_master is inaccurate, so I just skipped how it works...
> If you want to measure slave lag, follow that book's suggestion:
> One good solution is a heartbeat record,which is a timestamp that you update 
> once persecond on the master.To calculate the lag,you can simply subtract the 
> heartbeat from the current timestamp on the slave.


This assumes updates and inserts happen at the same speed on the master and 
slave. If your assumption is not true (e.g., slaves with SSD disks; or with 
different indexes than the master; or with locked tables because of 
long-running-queries), this will be as precise as seconds-behind-master, no 
more than a lousy estimate.

Cheers.
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: 5.1.51 Database Replica Slows Down Suddenly, Lags For Days, and Recovers Without Intervention

2011-10-23 Thread Luis Motta Campos
Thank you for sharing your experience, Howard. 

As those are replica servers, I don't care much about losing a second worth of 
data in case of power failure. I believe the data centre has double independent 
power sources, and my hardware man assured me if the power goes down at the 
data centre we'll have bigger issues to worry about. As a result, I can run 
with innodb_flush_log_at_trx_commit = 2 without worrying too much about it. 

The most interesting thing that came out of all this conversation is that 
everybody seems to agree this is some sort of lock contention on a lock that 
only get hot under certain conditions, and that doesn't seems part of the usual 
set of locks monitored by Cacti. 

I shall start paying beers to the MySQL developers I know again...

Thank you very much once more for sharing your experiences. This is invaluable 
and I hope I can do the same for you in the future. 

Kind regards,
--
Luis Motta Campos

Re: 5.1.51 Database Replica Slows Down Suddenly, Lags For Days, and Recovers Without Intervention

2011-10-23 Thread Luis Motta Campos
Claudio, 

Thank you for your interest. 
I will wait for the issue to happen again and will see what kind of information 
I can get back with strace. This is indeed something I didn't think of trying 
yet. 

I'll keep you people posted on this. 
Much appreciated on the new approaches and fresh ideas. 
Kind regards,
--
Luis Motta Campos

On 23 Oct 2011, at 23:27, Claudio Nanni  wrote:

> Luis,
> 
> Very hard to tackle.
> In my experience, excluding external(to mysql) bottlenecks, like hardware,
> o.s. etc, 'suspects' are the shared resources 'guarded' by unique mutexes,
> like on the query cache or key cache.
> Since you do not use MySQL it cannot be the key cache. Since you use percona
> the query cache is disabled by default.
> You should go a bit lower level and catch the system calls with one of the
> tools you surely know to see if there are waits on the semaphores.
> 
> I also would like to tell that the 'seconds behind master' reported by the
> slave is not reliable.
> 
> Good luck!
> 
> Claudio
> 
> 2011/10/23 Tyler Poland 
> 
>> Luis,
>> 
>> How large is your database?  Have you checked for an increase in write
>> activity on the master leading up to this? Are you running a backup against
>> the replica?
>> 
>> Thank you,
>> Tyler
>> 
>> Sent from my Droid Bionic
>> On Oct 23, 2011 5:40 AM, "Luis Motta Campos" 
>> wrote:
>> 
>>> Fellow DBAs and MySQL Users
>>> 
>>> [apologies for eventual duplicates - I've posted this to
>>> percona-discuss...@googlegroups.com also]
>>> 
>>> I've been hunting an issue with my database cluster for several months
>> now
>>> without much success. Maybe I'm overlooking something here.
>>> 
>>> I've been observing the database slowing down and lagging behind for
>>> thousands of seconds (sometimes over the course of several days) even
>>> without any query load besides replication itself.
>>> 
>>> I am running Percona MySQL 5.1.51 (InnoDB plug-in version 1.12) on Dell
>>> R710 (6 x 3.5 inch 15K RPM disks in RAID10; 24GB RAM; 2x Quad-core Intel
>>> processors) running Debian Lenny. MySQL data, binary logs, relay logs,
>>> innodb log files are on separated partitions from each other, on a RAID
>>> system separated from the operating system disks.
>>> 
>>> Default Storage Engine is InnoDB, and the usual InnoDB memory structures
>>> are stable and look healthy.
>>> 
>>> I have about 500 (read) queries per second on average, and about 10% of
>>> this as writes on the master.
>>> 
>>> I've been observing something that looks like between 6 and 10 pending
>>> reads per second uniformly on my cacti graphs.
>>> 
>>> The issue is characterized by the server suddenly slowing down writes
>>> without any previous warning or change, and lagging behind for several
>>> thousand seconds (triggering all sorts of alerts on my monitoring
>> system). I
>>> don't observe extra CPU activity, just a reduced disk access ratio (from
>>> about 5-6MB/s to 500KB/s) and replication lagging. I could correlate it
>>> neither InnoDB hashing activity, nor with long-running-queries, nor with
>>> background read/write thread activities.
>>> 
>>> I don't have any clues of what is causing this behavior, and I'm unable
>> to
>>> reproduce it under controlled conditions. I've observed the issue both on
>>> severs with and without workload (apart from the usual replication load).
>> I
>>> am sure no changes were applied to the server or to the cluster.
>>> 
>>> I'm looking forward for suggestions and theories on the issue - all ideas
>>> are welcome.
>>> Thank you for your time and attention,
>>> Kind regards,
>>> --
>>> Luis Motta Campos
>>> is a DBA, Foodie, and Photographer
>>> 
>>> 
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/mysql?unsub=tpol...@engineyard.com
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Claudio


Re: 5.1.51 Database Replica Slows Down Suddenly, Lags For Days, and Recovers Without Intervention

2011-10-23 Thread Luis Motta Campos
The data size is about 200 GB. I would have noticed increase on writes. No 
backup activity is running (actually I don't do conventional backups). 

Any theories?
Thank you for your interest. 
Kind regards,
--
Luis Motta Campos

On 23 Oct 2011, at 14:06, Tyler Poland  wrote:

> Luis,
> 
> How large is your database?  Have you checked for an increase in write
> activity on the master leading up to this? Are you running a backup against
> the replica?
> 
> Thank you,
> Tyler
> 
> Sent from my Droid Bionic
> On Oct 23, 2011 5:40 AM, "Luis Motta Campos" 
> wrote:
> 
>> Fellow DBAs and MySQL Users
>> 
>> [apologies for eventual duplicates - I've posted this to
>> percona-discuss...@googlegroups.com also]
>> 
>> I've been hunting an issue with my database cluster for several months now
>> without much success. Maybe I'm overlooking something here.
>> 
>> I've been observing the database slowing down and lagging behind for
>> thousands of seconds (sometimes over the course of several days) even
>> without any query load besides replication itself.
>> 
>> I am running Percona MySQL 5.1.51 (InnoDB plug-in version 1.12) on Dell
>> R710 (6 x 3.5 inch 15K RPM disks in RAID10; 24GB RAM; 2x Quad-core Intel
>> processors) running Debian Lenny. MySQL data, binary logs, relay logs,
>> innodb log files are on separated partitions from each other, on a RAID
>> system separated from the operating system disks.
>> 
>> Default Storage Engine is InnoDB, and the usual InnoDB memory structures
>> are stable and look healthy.
>> 
>> I have about 500 (read) queries per second on average, and about 10% of
>> this as writes on the master.
>> 
>> I've been observing something that looks like between 6 and 10 pending
>> reads per second uniformly on my cacti graphs.
>> 
>> The issue is characterized by the server suddenly slowing down writes
>> without any previous warning or change, and lagging behind for several
>> thousand seconds (triggering all sorts of alerts on my monitoring system). I
>> don't observe extra CPU activity, just a reduced disk access ratio (from
>> about 5-6MB/s to 500KB/s) and replication lagging. I could correlate it
>> neither InnoDB hashing activity, nor with long-running-queries, nor with
>> background read/write thread activities.
>> 
>> I don't have any clues of what is causing this behavior, and I'm unable to
>> reproduce it under controlled conditions. I've observed the issue both on
>> severs with and without workload (apart from the usual replication load). I
>> am sure no changes were applied to the server or to the cluster.
>> 
>> I'm looking forward for suggestions and theories on the issue - all ideas
>> are welcome.
>> Thank you for your time and attention,
>> Kind regards,
>> --
>> Luis Motta Campos
>> is a DBA, Foodie, and Photographer
>> 
>> 
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>> http://lists.mysql.com/mysql?unsub=tpol...@engineyard.com
>> 
>> 


5.1.51 Database Replica Slows Down Suddenly, Lags For Days, and Recovers Without Intervention

2011-10-23 Thread Luis Motta Campos
Fellow DBAs and MySQL Users

[apologies for eventual duplicates - I've posted this to 
percona-discuss...@googlegroups.com also]

I've been hunting an issue with my database cluster for several months now 
without much success. Maybe I'm overlooking something here.

I've been observing the database slowing down and lagging behind for thousands 
of seconds (sometimes over the course of several days) even without any query 
load besides replication itself.

I am running Percona MySQL 5.1.51 (InnoDB plug-in version 1.12) on Dell R710 (6 
x 3.5 inch 15K RPM disks in RAID10; 24GB RAM; 2x Quad-core Intel processors) 
running Debian Lenny. MySQL data, binary logs, relay logs, innodb log files are 
on separated partitions from each other, on a RAID system separated from the 
operating system disks.

Default Storage Engine is InnoDB, and the usual InnoDB memory structures are 
stable and look healthy.

I have about 500 (read) queries per second on average, and about 10% of this as 
writes on the master.

I've been observing something that looks like between 6 and 10 pending reads 
per second uniformly on my cacti graphs.

The issue is characterized by the server suddenly slowing down writes without 
any previous warning or change, and lagging behind for several thousand seconds 
(triggering all sorts of alerts on my monitoring system). I don't observe extra 
CPU activity, just a reduced disk access ratio (from about 5-6MB/s to 500KB/s) 
and replication lagging. I could correlate it neither InnoDB hashing activity, 
nor with long-running-queries, nor with background read/write thread activities.

I don't have any clues of what is causing this behavior, and I'm unable to 
reproduce it under controlled conditions. I've observed the issue both on 
severs with and without workload (apart from the usual replication load). I am 
sure no changes were applied to the server or to the cluster.

I'm looking forward for suggestions and theories on the issue - all ideas are 
welcome. 
Thank you for your time and attention,
Kind regards,
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Triggers - Accessing all NEW data

2011-09-12 Thread Luis Motta Campos
On 8 Sep 2011, at 16:23, Chris Tate-Davies wrote:

> Hello. I want to know if there is a special way I can access all the data in 
> the NEW/OLD data?
> 
> I realise I can access it by referencing NEW.fieldname but I want to 
> serialise the NEW object so I can save as a string. Is this possible or do I 
> need to write a function?


Hi, 

You'll have to write your own function for that. 

Cheers
--
Luis Motta Campos
is a DBA, Foodie, and Photographer


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



shall i jump from 5.1 to 5.5

2011-08-16 Thread Luis Daniel Lucio Quiroz
as far as my readings, they claim that 5.5 is the best

my question is, shall i jump from 5.1 to 5.5.

right now i have a performance problem, would 5.5 help me in that?

Regards,

LD


Transfer database to MySQL.Huge effort?

2010-09-18 Thread Luis Suzuki

I want to transfer a database(not MySQL) to MySQL(only the tables,not stored 
procedures,views etc.).Using SQLWays I gotseveral problems(It needs some 
expertise).Now using SQLMaestro DataWizard I exported some tables to csv format 
forimporting with mysqlimport,I previously created the database with CREATE 
DATABASE (database in simpliest form).Now,when I use mysqlimport to import the 
csv formatted tables it tells that I do not have the table xyz.I thought 
themysqlimport command could automatically read the imported file and create 
the table with adequate structure and name according to the read/imported 
file.The number of tables to import are almost two hundred and previously 
creating in MySQL almost two hundred tableswith structure compatible to the 
imported database tables is a huge effort.Are there any easier method to 
follow?I am a relatively new user of database software.
 
Thanks.
  

RE: Recover accidentally deleted MySQL database files

2010-05-21 Thread Jose Luis Marin Perez
thanks for your answer, it seems these files were deleted when running fsck.

In the /Lost+found directory files are referenced to Mysql for example:

#114470: MySQL table definition file Version 9
#114471: MySQL MISAM compressed data file Version 1
#114472: DBase 3 data file (256 records)
#114473: MySQL table definition file Version 9
#114474: MySQL MISAM compressed data file Version 1
#114475: DBase 3 data file (258 records)
#114476: MySQL table definition file Version 9
#114477: MySQL MISAM compressed data file Version 1
#114478: DBase 3 data file (33489404 records)
#114479: MySQL table definition file Version 9
#114480: MySQL MISAM compressed data file Version 1
#114482: MySQL table definition file Version 9
#114483: MySQL MISAM compressed data file Version 1
#114484: DBase 3 data file (256 records)
#114485: MySQL table definition file Version 9
#114486: MySQL MISAM compressed data file Version 1
#114487: DBase 3 data file (8960 records)
#114488: MySQL table definition file Version 9
#114489: MySQL MISAM compressed data file Version 1
#114490: DBase 3 data file (256 records)

There any way to recover these files in its original location?

Thanks

Jose Luis

-Mensaje original-
De: mos [mailto:mo...@fastmail.fm] 
Enviado el: Viernes, 21 de Mayo de 2010 11:24 a.m.
Para: mysql@lists.mysql.com
Asunto: Re: Recover accidentally deleted MySQL database files

At 10:42 AM 5/21/2010, you wrote:
>Dear sirs,
>
>
>
>Accidentally files in a database have been deleted (/ var/lib/mysql
>/"database") when entering the mysql console shows that the database is
>created but does not show any table, there is some method to recever the
>information in this database?
>
>

You need to restore your database data directory from backup. You could try 
to undelete the files in the data directory but that may not recover all of 
the data since the tables may have been open when the files were erased.

Before restoring the files from your backup, make sure you either flush the 
tables or shutdown the mysql server.

Mike


>Centos 4.6
>
>mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
>4.3
>
>
>
>Thanks
>
>
>
>Jose Luis


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=jma...@isp.qnet.com.pe



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Recover accidentally deleted MySQL database files

2010-05-21 Thread Jose Luis Marin Perez
Dear sirs,

 

Accidentally files in a database have been deleted (/ var/lib/mysql
/"database") when entering the mysql console shows that the database is
created but does not show any table, there is some method to recever the
information in this database?

 

Centos 4.6

mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
4.3

 

Thanks

 

Jose Luis



Re: How much memory can mysql 5.1 take advantage of?

2009-02-05 Thread Luis Motta Campos
Jake Maul wrote:
> Didn't want this to go unanswered, although I don't have any great
> info for you.
> 
> As long as you're running a 64-bit OS and a 64-bit version of MySQL, 
> there's no technical reason it would be limited to less than the 
> addressable space (that I know of). The main gain would be the
> ability to set larger buffers and handle more connections
> simultaneously. Of course, this is assuming your queries and schema
> are good and you don't suffer from excessive locking problems.
> 
> That is to say... yes, it'll work, and yes, as far as I know MySQL 
> will be able to allocate as much RAM as you can stuff in the box. 
> Whether it can use it *effectively* is something I don't have any 
> experience with beyond ~8GB. I suspect it would work just fine, 
> though.

I have a personal experience in this. At the office we run a High
Availability Replicated Cluster with MySQL, and I can effectively use up
(but surely not limited) to 15GB (out of 16GB available) RAM, mainly for
buffers and connections.

My current implementation bottleneck is processor cycles and the
outrageous amount of bugs and half-implemented standards that plague
5.0.45 (the latest pre-compiled stable version available for CentOS 64
bits).

Please feel free to address me if you need more information about that,
either here or at the FreeNode's #mysql IRC channel (my nick there is
LuisMottaCampos).

Cheers
-- 
Luis Motta Campos is a software engineer,
Perl Programmer, foodie and photographer.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Database Migration Path / Activity List?

2008-01-02 Thread Luis Motta Campos
Baron Schwartz wrote:
> On Jan 2, 2008 10:04 AM, Luis Motta Campos wrote:
>> Baron Schwartz wrote:
>>> What are the biggest changes you anticipate? I'd say they will be
>>>  the version upgrade, converting to InnoDB, and using 
>>> replication. It looks like you have planned well for all but 
>>> using replication.
>> That's interesting. What kind of activities (besides configuration,
>>  maybe?) are interesting to add?
> 
> Lots of experimentation!
> 
> Let me ask it another way: how are you planning to use replication? 
> -- for load balancing/scaling reads, backups, a hot standby machine?

OK, I guess a bit more of information can help. I have a very sensitive
database at the company, almost unprotected at the moment. It's big
hardware, lots of hot-replaceable parts, and a quite big energy
generator attached, but nothing guarantees our data between the last
backup and the present moment case the building burns down to the ground.

The database I/O activity obey the 80-20 rule: 80% reads and 20% writes.
I have an average of 80,000 read-queries per second (that's average - I
got 'nice' peaks sometimes, with 4 times more activity). We have 20,000
write-queries per second in the same database.

As we're addressing the risk of major disasters (like the building
burning down to ashes), the plan is spreading this database through the
two data centers we hire: one data center would hold the master
database, and a spare reading slave, and the other data center would
hold "the" reading slave and a spare master database.

Don't worry about connectivity issues: I have plenty of bandwidth
between those two sites, and I can ask for more. I just need to know in
advance how much to ask for, and I will surely get it.

The master/spare and slave/spare machines would be connected through
heartbeat and will keep the database in a DRDB filesystem. This will
guarantee that, in case of failure, the other machine can raise the same
IP address in it's own interface and continue operations after a short
delay.

Now, about the existing database: it runs Debian Stable, and a
pre-compiled mysql server. As I said before, it's a big machine, but
it's getting old (more than 2 years already), and must be replaced.

The system running on it is quite old, more than 10 years old. This
means that the design and implementation aren't nice. And the
maintenance added new improvements where needed (as InnoDB tables).

The basic idea is to completely re-design and re-implement the database
as soon as the new server is in place (being stability and failure
resistance the priorities fixed by management for the first stage).

>> Isn't predicting that the replication is one of the three biggest
>> changes I have in my database a bit of an exaggeration?
> 
> Definitely not.  It is a huge change.  From one server to a 
> two-server replication setup is a quantum leap.  You'll have all 
> kinds of new things to think about, such as data consistency, dealing
>  with replication lag, performance changes on the master due to 
> binary logging, etc.
> 
> It depends a lot on WHY you're using replication (see my earlier 
> question).

Well, I guess I don't need to worry about multi-master replication for
now, the application must be re-designed and re-implemented before we
can start thinking about this. It's currently quite hard to maintain,
and we don't know a lot of important things about it. There is a team
working on this already.

About data consistency, I would like to have some pointers: is this an
issue, provided that I stick to single-master architectures?

About binary logging, I must first read more about this. Thanks for the
warning, though.

Replication lag is another thing that worries me a lot - is there a
mathematical model I can use in order to forecast the expected average
replication lag?

The application can handle quite big replication lags at the moment.
It's not web-based, and there is no users directly interacting with it
at the present moment, what makes everything much simpler - you can have
a program waiting for 5 minutes to "see" a change without a lot of fuss
about it.

Sorry, I guess this email is a bit bigger than I was expecting... :(
I hope this gives you a general idea about my current problem.
Please feel free to ask more about it if you feel that this details
aren't enough.

Kind regards.
-- 
Luis Motta Campos (a.k.a. Monsieur Champs) is a software engineer,
Perl fanatic evangelist, and amateur {cook, photographer}


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



Re: Database Migration Path / Activity List?

2008-01-02 Thread Luis Motta Campos
Baron Schwartz wrote:
> What are the biggest changes you anticipate? I'd say they will be the
>  version upgrade, converting to InnoDB, and using replication.  It 
> looks like you have planned well for all but using replication.

That's interesting. What kind of activities (besides configuration,
maybe?) are interesting to add?

> Unless you are familiar with it, that is likely to be a bigger change
>  than the version upgrade and switch to InnoDB.

That's alarming. I was expecting replication to be a lesser change, not
something this big. Isn't predicting that the replication is one of the
three biggest changes I have in my database a bit of an exaggeration?

> There's a lot to learn about replication if you haven't used it
> before. I'd suggest that you read the manual chapters about
> replication and binary logging, and definitely experiment with
> replication.

Thanks for the advice. I will start reading right away.

I would like to read more comments from the members of this list.

Thank you all for your patience and help.
Cheers!
-- 
Luis Motta Campos (a.k.a. Monsieur Champs) is a software engineer,
Perl fanatic evangelist, and amateur {cook, photographer}


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



Database Migration Path / Activity List?

2008-01-02 Thread Luis Motta Campos
Hey there

I have a not-so-big (50GB, including indexes) database (MySQL 4.0.24,
mixed MyISAM and InnoDB tables) that I need to migrate to a MySQL 5.1
Master + Slave Replication server, with InnoDB tables only, over a new
hardware.

Unfortunately, this is the first time I play a role as MySQL DBA, and
don't have a complete migration plan (yet).

Can someone here please review my migration plan and help me
adding/prunning missing/exceeding bits?

My current plan is more or less like below. I removed task descriptions
removed, guess the task name is descriptive enough. Indenting marks
sub-tasks, as expected.

Many thanks in advance.
Cheers!

- BEGIN TASK LIST -
Database Migration Project
Current Database Procedures Mapping
Plan Database Test Procedure
Determine Current Database Backup Procedures
Determine Current Database Restore Procedures
Obtain Copies of the Current Database Backup Scripts
Obtain Copies of the Current Database Restore Scripts
Determine Current Database Stored Procedures / Triggers
Database Statistics Collection
Determine Current Database Size
Determine Current Database Grow Ratio
Determine Current Database Schema
Operating System Installation and Configuration Plan
Determine Hardware Requirements
Determine Operating System Requirements
Determine Required Operating System Configuration
Plan Operating System Installation
Plan Operating System Configuration
Document Changes on Operating System
Database Software Installation and Configuration Plan
Study Need for Database Build
Plan Database Build
Plan Database Installation
Plan Database Configuration
Database Performance Tunning
Determine Current Database Queries
Determine Current Database Performance Indicators
Plan Measurement Procedure for the Performance Indicators
Measure Current Database Performance
Database Schema Refactoring
Obtain Current Database Schema Definition
Review Database Schema
Review Database Stored Procedures and Triggers
Suggest Changes for Database Schema
Study Desired Database Backward Compatibility Level
Design Views to Allow Database Backward Compatibility
Redesign Database
Write SQL for Changes
Staging System Deployment and Testing
Install Operating System in the Staging Environment
Configure Operating System in the Staging Envinronment
Build Database Software in Staging Environment
Install Database Software in Staging Environment
Configure Database Software in Staging Environment
Obtain Current Copy of the Database Backup from Production
Restore Database Using the Restore Procedure
Fix or Improve Restore Procedure
Test Database in Staging Environment
Measure Staging Database Performance Indicators
Compare Performance Figures for the Staging Database
Production Database Deployment
Plan Database Maintenance Stop
Advertise Database Maintenance Stop
Install Operating System in the Production Environment
Configure Operating System in the Production Envinronment
Build Database Software in Production Environment
Install Database Software in Production Environment
Configure Database Software in Production Environment
Stop Production Database
Obtain Current Copy of the Database Backup from Production
Restore Database Using the Restore Procedure
Test Database in Production Environment
Start Database in Production Environment
Database Monitoring
Follow Up Database Behavior and Performance
- END  TASK  LIST -

-- 
Luis Motta Campos (a.k.a. Monsieur Champs) is a software engineer,
Perl fanatic evangelist, and amateur {cook, photographer}


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



Cluster/replication different table names

2007-05-17 Thread Ezequiel Luis Pellettieri

Hi guys, I wonder if there is any chance to set up replication/cluster with
different tables names on the servers (maybe using aliases for tables)

eg..

box1:

db name: base1
table name: users

box2:

db name: base1
table name: users_new



Any ideas?


Thanks in advance
--

Regards,
Ezequiel L. Pellettieri


Compiling mysql on Solaris 10

2007-02-08 Thread Luis Jeremias
Hi all,

I'm having trouble compiling MySql on a Sun Sparc machine with Solaris 10.

MySql is 5.0.27
Solaris is sparc.sun.solaris2.10 (64 bits)
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

I've installed zlib-1.2.3, but got no better luck.

I'm using to compile:
CC=gcc CFLAGS="-O3 -m64" \
CXX=gcc CXXFLAGS="-O3 -m64 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory 

Amid all the output that this gives, some suspicious errors appear:

grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
configure: WARNING: term.h: present but cannot be compiled
configure: WARNING: term.h: check for missing prerequisite headers?
configure: WARNING: term.h: see the Autoconf documentation
configure: WARNING: term.h: section "Present But Cannot Be Compiled"
configure: WARNING: term.h: proceeding with the preprocessor's result
configure: WARNING: term.h: in the future, the compiler will take precedence
configure: WARNING: ## -- ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING: ## -- ##
configure: WARNING: sys/ptem.h: present but cannot be compiled
configure: WARNING: sys/ptem.h: check for missing prerequisite headers?
configure: WARNING: sys/ptem.h: see the Autoconf documentation
configure: WARNING: sys/ptem.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/ptem.h: proceeding with the preprocessor's result
configure: WARNING: sys/ptem.h: in the future, the compiler will take
precedence
configure: WARNING: ## -- ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING: ## -- ##
configure: WARNING: extra-tools disabled because --enable-thread-safe-client
wasn't used

But, it goes on.

Then, "make" stops with these lines:
...
/bin/bash ../libtool --preserve-dup-deps --tag=CC --mode=link gcc
-DDBUG_OFF -O3 -m64   -DHAVE_RWLOCK_T-o libz.la -rpath
/usr/local/mysql/lib/mysql -version-info 3:3:2 adler32.lo compress.lo
crc32.lo deflate.lo  gzio.lo infback.lo inffast.lo inflate.lo inftrees.lo
trees.lo  uncompr.lo zutil.lo  -lpthread -lthread -lposix4 -lgen -lsocket
-lnsl -lm  -lpthread -lthread
gcc -shared -Wl,-h -Wl,libz.so.1 -o .libs/libz.so.1.2.3  .libs/adler32.o
.libs/compress.o .libs/crc32.o .libs/deflate.o .libs/gzio.o .libs/infback.o
.libs/inffast.o .libs/inflate.o .libs/inftrees.o .libs/trees.o
.libs/uncompr.o .libs/zutil.o  -lpthread -lthread -lposix4 -lgen -lsocket
-lnsl -lm -lpthread -lthread -lc  -m64
(cd .libs && rm -f libz.so.1 && ln -s libz.so.1.2.3 libz.so.1)
(cd .libs && rm -f libz.so && ln -s libz.so.1.2.3 libz.so)
false cru .libs/libz.a  adler32.o compress.o crc32.o deflate.o gzio.o
infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
*** Error code 1
make: Fatal error: Command failed for target `libz.la'
Current working directory /export/home/jerry/installs/mysql-5.0.27/zlib
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='. include Docs zlib   cmd-line-utils sql-common  pstack  strings mysys
dbug extra regex innobase myisam myisammrg heap vio sql  libmysql  client
scripts man tests  netware   sql-bench mysql-test support-files
server-tools'; for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
  else \
local_target="$target"; \
  fi; \
  (cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/jerry/installs/mysql-5.0.27
*** Error code 1
make: Fatal error: Command failed for target `all'

Does anyone have a hint for what may be missing here ?

Thank you,

---
Luis Jeremias
[EMAIL PROTECTED]

TV CABO PORTUGAL
Direcção de Desenvolvimento de Infraestruturas
Rua Dr. Eduardo Neves, nº9
Edifício Pinta, 2° Piso, Sala 7
1069-203 Lisboa - PORTUGAL
TM: 961360663, Tel: 217943522, Fax: 217824895


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



Re: automated character set conversions for tables

2007-02-06 Thread Luis Filipe Lobo
Hi

You can 'attack' the problem from another perspective :-P

I found out a tool (Linux) to convert all characters in a latin1 file to
utf8.
The command name is 'iconv' and in Debian it is shipped with the libc6
package.
So basically dump you DB and convert the file then import it.

See the article here:

http://gentoo-wiki.com/TIP_Convert_latin1_to_UTF-8_in_MySQL

Hope it helps.


[EMAIL PROTECTED] wrote:
> Hello Jerry,
>
> Thanks for the reply. You are right. Thats why it finally took me
> 10-12 work hours to convert a single DB (split over two work days) to
> a UTF-8 compliant version.
>
> While it wasnt necessarily difficult to do (once you figured it out),
> it can put extra pressure on your eyes if you have to concentrate on
> the screen all the time ;-).
>
> If somebody knows of a "smart" tool that is doing the hart work feel
> free to speak ;-)
>
> Best regards
>
> Nils Valentin
>
>
>
> Quoting Jerry Schwartz <[EMAIL PROTECTED]>:
>
>> Columns can have character set definitions, also. In this case, I
>> hope not.
>>
>> Regards,
>>
>> Jerry Schwartz
>> Global Information Incorporated
>> 195 Farmington Ave.
>> Farmington, CT 06032
>>
>> 860.674.8796 / FAX: 860.674.8341
>>
>>
>>> -Original Message-
>>> From: Chris White [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, January 10, 2007 10:59 AM
>>> To: [EMAIL PROTECTED]
>>> Cc: mysql@lists.mysql.com
>>> Subject: Re: automated character set conversions for tables
>>>
>>>
>>> > I did a DB conversion before that with "ALTER DATABASE db_name
>>> > CHARACTER SET utf8"
>>> > That worked wonderfully, except not as expected. ;-)
>>> > It basically converted only the database itself. so I had to do a
>>> > separate "ALTER TABLE ..." for each table.
>>>
>>> The database encoding more establishes the default to use
>>> when creating
>>> new tables.  As far as adjusting every single table,  you can
>>> work with
>>> your Favorite Scripting Program (tm) and run the query:
>>>
>>> `SHOW TABLES`
>>>
>>> to get a list of all tables for that database (the column you want is
>>> called Tables_in_[database name here]), which you can get the exact
>>> column by running it in console or your Favorite SQL Program
>>> (tm).  Then
>>> simply loop over the result set and run the alter table
>>> command on each
>>> table.
>>>
>>> -- 
>>> 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]



Update not working in a script, but going fine running with MySQL Browser

2006-04-27 Thread luis perez

Hi guys.
Got a problem when adding records to an existing table, as part of a sql 
script.
There are  a couple of fields that don't get added as they should 
(respaccstopframe and acstpradiusid).

This is the update command:

insert into temp_s1 (accsesid, respaccstopframe, acstpradiusid, sgsnip, 
sgsnip_subnet, sgsnip_last, ggsnip, subip, startime, stoptime)
select r1.radius_acct_session_id, t.frame_number, r1.radius_id, 
r1.radius_XXX_Address, substring_index(r1.radius_XXX_Address,".",3),
substring_index(r1.radius_XXX_Address,".",-1),r1.radius_NAS_IP_Address, 
r1.radius_Framed_IP_Address, f.frame_time, r1.frame_time

from radius r1, temp_respaccstopframe t, frame f
where r1.frame_number = t.r1_fn and f.frame_number= t.syntstart_number and 
t.noacstart=1 and t.started_in >=0;


I didn't received any error, but fields were not added. I added an update 
command for those two fields just right after in the script.


# no preguntes por que lo hago dos veces...los duendes del sw...
update temp_s1 s1, temp_respaccstopframe t
set s1.respaccstopframe= t.frame_number, s1.acstpradiusid=t.radius_id
where s1.accsesid=t.radius_acct_session_id and 
s1.ggsnip=t.radius_NAS_IP_Address and t.noacstart=1 and t.started_in >=0;


Same result.
Then I run the update from MyQSL Browser and then worked fine...!!?

I've run same script and update command thru Browser with same table in both 
MySQLv4.1 and v5.0. No change.


I know it sounds crazy, but can anyone add some light on this?

TIA.
Luis.

_
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en 
MSN Motor. http://motor.msn.es/researchcentre/



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



MySql Query Browser 1.1.15 BUG????

2005-10-06 Thread Angelo Luis
I download MySql Query Browser 1.1.15 and he is leaving me nervous...

This is the problem:

1. I have 2 tabsheet result set.
2. I the first i make a query , like select * from table1.
3. In the second i am in the middle of a query, like select * from table1
where id = (What's is the id ??? Fuck, i forgot. Let me see the first
tabsheet!!!)
4. I turn tho the first tabsheet e and i see that the id is 13, so, let me
come back the the second tab sheet and finish the query...
5. WHAT??? where is my query???


DO you understand the problem???

OBS:
- Sorry for my bad english
- I deserve one IPod??


Re: I forgot the admin password

2005-09-21 Thread Luis Garay
Thanks to all. This was a Linux machine and im also learning how to interact
with this so iwill try to do all you said. Thanks.

lgaray


On 9/21/05, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Martijn,
>
> sorry if I sounded perhaps unfriendly. That was not against you.
>
> Imagine that many people read the list (+20.000), some which read this
> which might take your word for granted and just do as you told ;-).
>
> I just wanted to clear that before it becomes practice. I understand that
> in an Microsoft environment it is usual practice to reinstall software
> when the original cause cant be find. Unfortunately that is poor practice.
>
> If feasable, it is important to understand what the original cause is and
> how to stop it, rather than fixing around it.
>
> Reinstalling an
>
> This time its perhaps not REAL data but when disaster strikes, often there
> is not much time to "learn" how it should have been done - mostly that
> means it is already to late. Its important to learn how to do it proberly
> with test data BEFORE disaster strikes.
>
> O.K I believe you got my points. Again, didnt mean to hurt anybody. Peace
> ;-)
>
>
> Best regards
>
> Nils Valentin
> Tokyo / Japan
> http://www.be-known-online.com
>
>
> >>> > > Uninstall, reinstall.
> >>> >
> >>> > That will not work !! MySQL doesnt delete an existing database. No
> >>> > offense, but you should have known better as professional.
> >>> >
> >>> > "--skip-grant-tables" is what the original user wanted to know.
> >>>
> >>> Well, given that the OP only said " I installed it a few weeks ago
> >>> and now I want to start practicing ", it doesn't really matter...
> >>>
> >>> Just reinstall it and you're fresh to go, right?
> >>
> >>NO! depending on how the Luis installed MySQL in the first place (which
> > method was used), the "uninstaller" may not remove or >overwrite the
> > mysql.user table rendering this exercise fruitless as well as being
> > overkill. I understand you work with many >databases other than MySQL
> and
> > for some of them the only way to recover from a lost admin password
> would
> > be
> > to >remove/replace/restore. However, in this case Valentin was correct.
> >
> > Right -- perhaps I should have mentioned: uninstall and delete
> everything
> > :-)
> > Done that a couple of times myself...
> >
> > I understand that Valentin is correct for the "normal" approach,
> > especially
> > when you have a running server and/or databases.
> >
> > I kinda figured, the fastest way (without having to search for an e-mail
> > list), would be just to reinstall the thing. MySQL - on Windows - has a
> > very nice install these days, kudos for that.
> >
> > With regards,
> >
> > Martijn Tonies
> > Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS
> SQL
> > Server
> > Upscene Productions
> > http://www.upscene.com
> > Database development questions? Check the forum!
> > http://www.databasedevelopmentforum.com
> >
> >
>
>


I forgot the admin password

2005-09-21 Thread Luis Garay
hi
im pretty newbie in mysql. i installed this in my computer few weeks ago and
today i want to begin practicing and i cant log in . i suppose i forget the
rigth password, how can a blank this??

thank you
lgaray


Question about replication

2005-04-12 Thread Luis Calero
  Hello, I've been discussing with a coworker if it's possible to
setup the following replication scenario: We've got two boxes, machine
A that has machine B as his master, and machine B that has machine A
as his master (A->B B->A), both boxes are masters and slaves. Over
this two boxes there's an Alteon sending all the traffic to machine A
and it gets replicated in B. If A dies, then the alteon starts sending
the traffic to B, and when A comes up again, because B is replicated
in A, A starts to catch up with the updates needed.

  Can this be done this way or it is necessary that only one of them
is the master and the other one the slave and change from master to
slave manually?

  Thanks!

-- 
  Luis

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



MySQL SNMP OIDs

2005-03-18 Thread Luis R. Rodriguez

[ This is my second e-mail, the first I forgot to CC me. 
  Please CC me, I am not subscribed ]

Are there SNMP OIDs avialble to get MySQL qps, inserts ps, etc?

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgppLI1O5jxLy.pgp
Description: PGP signature


MySQL SNMP OIDs

2005-03-18 Thread Luis R. Rodriguez

Are there SNMP OIDs available I can use to query MySQL qps, inserts ps, etc?

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgp7JOjsc3R2E.pgp
Description: PGP signature


Eventual connection looses

2004-09-20 Thread Luis Mediero
Hi,

I have a web application with servlets and jsp's. I use a connection pool to
optimize connections to database.
Usualy all works fine but sometimes, after a period of inactivity (30-50
minutes), connections are lossed. This only occurs if mysql and web server
are in different machines.
In MySql Control Center I can see connections but my application seems not
to see them.

Every time the application needs a connection, the system ask for one to the
pool.
The pool searchs for a free connection and checks it with a kind of ping
"select curdate()" before assigning it to the application. This prevents the
use of "timeouted" connections.
The problem is that sometimes, this ping doesnt't responde for a long time,
until 13'.
I've tried to adjust the connectTimeout of jdbc driver but nothing changes.
If I adjust the jdbd driver parameter socketTimeout to 2 seconds, after 2
seconds the ping returns fail and I try to create a new connection with
success.
This is working fine but this parameter affects to all operations against
db, that's to say, if the user ask for a long query, after 2 seconds the
system cuts the connection.

Any ideas to prevent this looses without cutting long queries?

Thanks in advance

Begoña Villamor


Environment: Apache 2.0.46, Tomcat 4.1.30, mod_jk 1.2.5, MySql 4.0.20, mysql
jdbc driver 3.0.7 , jdk 1.4.2_05
Driver properties are:
autoReconnect: false  (No difference with this property true)
maxReconnects: 3, initialTimeout: 2
socketTimeout: 2000, interactiveClient: false
useCompression: false,  connectTimeout: 0 (No difference with this property
2000)
Server variables:
'connect_timeout','5', 'delayed_insert_limit','100',
'delayed_insert_timeout','300'
'delayed_queue_size','1000', 'interactive_timeout','28800',
'long_query_time','10'
'max_connect_errors','10', 'max_connections','100',
'max_delayed_threads','20'
'max_insert_delayed_threads','20', 'max_user_connections','0',
'net_read_timeout','30'
'net_retry_count','10', 'net_write_timeout','60', 'skip_networking','OFF'
'slave_net_timeout','3600', 'wait_timeout','28800'


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



Script to purge

2004-07-07 Thread Luis Mediero
Hi,

I would like write a script to purge every nigth the master log with a cron
process. I need do it every nigth after load a lot of data into the master.
I know if i do 'show master status' i can see the file_name of the last log
file and then do -purge master logs to 'file_name'-. Is possible put the
file name into a variable and then do - purge master logs to '$variable' -,
into a script?. Someone have a example?.

I can't use 'PURGE MASTER LOGS BEFORE ' because I use the 4.0.20
version. :-(


TIA
   
 Luis


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



Purge master logs

2004-07-02 Thread Luis Mediero
Hi,


I'm looking for an automatic method to purge the master logs. I know I can
do it with "PURGE MASTER LOGS TO 'mysql-bin.010';", but I need know the last
log file to automate it.

Somebody know the way.


TIA
   
 Luis Mediero


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



Where are BLOBs / TEXTs stored?

2004-06-16 Thread Luis R. Rodriguez

[ Please CC me ]

Hi,

http://dev.mysql.com/doc/mysql/en/Storage_requirements.html

Page says:
---
"The maximum size of a row in a MyISAM table is 65,534 bytes. Each BLOB
and TEXT column accounts for only five to nine bytes toward this size."
---

Question: So where are BLOBs and TEXTs entries stored?

    Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

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



Re: BLOB's - General Guidance

2004-05-22 Thread Luis R. Rodriguez
On Fri, May 21, 2004 at 08:01:31PM -0400, [EMAIL PROTECTED] wrote:
> Luis - you're quite polite so I'll assume that you are ignorant rather than 
> prejudiced.

I'm polite since I wanted to be respectful but honest at the same time.

> You have a university email so I'll also assume you're a student who wants to learn.

I graduated about 1 year ago, on the field since then.

> So here's your lesson for today: Don't judge people by their cover, or by their 
> color, or by their name, or by their service provider. Don't assume all AOL users 
> are technical lightweights, just like you don't want people to assume that all 
> people Named Rodriguez are illegal aliens.

That was an uncessary and unwanted lesson. Re-read my e-mail. I was
polite since I was just trying to be honest, without making my post seem
like a troll or me just being rude.

> AOL may be a favorite with internet newbies but in many parts of the country it also 
> offers the best service. Never make assumptions about people based on what ISP they 
> use.

Unnecessary information. I already know who uses AOL. You have obviously
been insulted. I'm sorry. 

PS. Please don't send uncessary e-mail to our server. Specially at
[EMAIL PROTECTED] since:

1. It doesn't exist. It's not a windows box, for god's sake.
2. You're better off just sending those e-mails to me.
3. You're giving AOL technical users a bad name

> In a message dated 5/20/2004 8:48:01 PM Eastern Daylight Time, [EMAIL PROTECTED] 
> writes:
> 
> > 
> > On Thu, May 20, 2004 at 05:45:58PM -0400, [EMAIL PROTECTED] wrote:
> > > Another perspective on the subject of BLOB vs. Links.
> > >
> > > Links are easier to implement and may be an OK way to start. However, a file 
> > > system is really a crude database, and I emphasize "crude". It's not very good 
> > > at handling high transaction rates, access from multiple machines, or volume.
> > >
> > > If your application grows quickly and before you know it you have hundreds of 
> > > folders with thousands of files in each - your file system will slow to a crawl. 
> > > All the performance, security, and consistancy features developers have worked 
> > > so hard to put into database engines don't or barely exist in file systems.
> > >
> > > So - if you go the link approach - you'll be fine for a while, but when you see 
> > > the directory structure starting to buckle - it might be time to give BLOBs 
> > > another look.
> > 
> > I'm going to be honest, sorry. Your argument seems to make sense and
> > this information is really relevant for me -- thanks. I, however, just
> > get this fuzzy feeling inside that tells me not to trust anything
> > technical any AOL user may say. Sorry again, but this time for making it
> > seem like a troll. It's not, seriously, I'm just being honest.
> > 
> > Can anyone non-AOL-lite back up Udikarni's argument? 8)
> > 
> > Luis
> > --
> > GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 
> > 4937 E20A 525E
> > 
> > 
> >

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgphg1j4g6IMq.pgp
Description: PGP signature


Re: BLOB's - General Guidance

2004-05-20 Thread Luis R. Rodriguez
On Thu, May 20, 2004 at 05:45:58PM -0400, [EMAIL PROTECTED] wrote:
> Another perspective on the subject of BLOB vs. Links.
> 
> Links are easier to implement and may be an OK way to start. However, a file system 
> is really a crude database, and I emphasize "crude". It's not very good at handling 
> high transaction rates, access from multiple machines, or volume.
> 
> If your application grows quickly and before you know it you have hundreds of 
> folders with thousands of files in each - your file system will slow to a crawl. All 
> the performance, security, and consistancy features developers have worked so hard 
> to put into database engines don't or barely exist in file systems.
> 
> So - if you go the link approach - you'll be fine for a while, but when you see the 
> directory structure starting to buckle - it might be time to give BLOBs another look.

I'm going to be honest, sorry. Your argument seems to make sense and
this information is really relevant for me -- thanks. I, however, just
get this fuzzy feeling inside that tells me not to trust anything
technical any AOL user may say. Sorry again, but this time for making it
seem like a troll. It's not, seriously, I'm just being honest.

Can anyone non-AOL-lite back up Udikarni's argument? 8)

Luis
-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgpyK2Pw5sOiK.pgp
Description: PGP signature


Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Luis R. Rodriguez
On Mon, May 17, 2004 at 04:07:53PM -0400, [EMAIL PROTECTED] wrote:
> 
> SORRY
> 
> My typo--- it is NOT ready for any kind of testing. At least I have not
> heard of anything

Heh :)

But do you know if anyone is already working on it? 

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgpp8bVdfchDs.pgp
Description: PGP signature


Re: 1-Way or 2-Way Replication?

2004-05-17 Thread Luis R. Rodriguez
On Mon, May 17, 2004 at 02:11:49PM -0400, [EMAIL PROTECTED] wrote:
> MySQL does not support distributed locking (yet). 

<-- Snip -->

> MySQL will have it in a future release but it's ready for an
> initial alpha test, yet.

It is available in alpha releases? Someone is working on this already?
What release? Who is working on it?

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgpt1ZTrSTEDW.pgp
Description: PGP signature


Re: Using a hardware load balancer in from of MySQL

2004-05-13 Thread Luis R. Rodriguez
On Thu, May 13, 2004 at 06:49:01AM -0400, PARTHA DUTTA, BLOOMBERG/ 499 PARK wrote:
> Hello all, I would like to find out if anyone has implemented an architecture 
> where a hardware load balancer is placed in front of some MySQL servers in a 
> Multi-master replication scheme.  I want to use the load balancer more for high 
> availability, than for load balancing.  All connections to the database server 
> would go the mysql server 1. If server1 fails, the load balancer should send all
>  connections to server 2, etc. Thanks for any insight on any implementation 
> gotchas.

Have you considered the Linux High Availability project:

http://linux-ha.org/

We use it for failover at work. It does a good job.

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

-- 
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-09 Thread Luis R. Rodriguez

Check on sourceforge.net, there's tons of open php/mysql projects. :)

    Luis

On Fri, May 07, 2004 at 11:29:19AM -0700, David Blomstrom wrote:
> Is it possible to copy a working MySQL database and a
> page driven by that database to another website? If
> so, it would a great learning resource - a working
> model.
> 
> I jumped into the world of PHP and MySQL a few weeks
> ago. I'm now working with PHP includes, but I've
> barely scratched the surface of MySQL. I have made
> MySQL databases, but I haven't yet learned how to use
> them to manipulate pages, nor have I navigated the
> username/password maze and got a database online.
> 
> Rather than ask a zillion questions on forums, I'd
> like to get my hands on a working model, which would
> probably fill in many of the blanks. Could I give
> someone my temporary password and ask them to copy a
> simple database and matching page to one of my
> websites, or is that even feasible? The second option
> would be to solicit the code for a webpage driven by a
> database, recreate it and publish it online, then get
> some specs regarding the database, create it, and
> publish it online.
> 
> Below is a brief synopsis of the project I'm working
> on.
> 
> * * * * * * * * * *
> 
> I'm working on a series of websites focusing on the
> world's nations and the 50 states. I'm using PHP
> includes to designate the name and linking code for
> every jurisdiction. Thus, $myname = 'Alaska'
> transforms the title element to "Alaska" on a
> particular page, and identifies it as a member of the
> United States and North America, with linking codes us
> and na.
> 
> This forms a "bread crumbs" type link sequence at the
> top of each page:
> 
> Home > World > North America > U.S. > Alaska
> 
> I also use nation and state codes to identify css
> elements. For example, the page's title might be:
> 
> "> myname>
> 
> Thus, the div's id translates into id="titleak" for
> Alaska, with the word "Alaska" replacing echo myname.
> 
> Many people have told me to use a database, but it's
> so complex. Rather than spend another two weeks
> figuring it out, I'd like to get my hands on a working
> model so I can understand some of the concepts
> discussed in MySQL's tutorials.
> 
> Thanks!
> 
> 
>   
>   
> __
> 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]

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

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



Re: Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez
On Wed, May 05, 2004 at 04:22:12PM -0700, Jeremy Zawodny wrote:
> On Wed, May 05, 2004 at 03:44:00PM -0400, Luis R. Rodriguez wrote:
> > On Wed, May 05, 2004 at 12:01:27PM -0700, Jeremy Zawodny wrote:
> > > On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote:
> > > > 
> > > > Hello,
> > > > 
> > > > I am wondering if anyone is currently working on a two way replication
> > > > lock protocol. If so, what's the status. I understand there's little
> > > > gain in having two way replication but -- I am just curious. 
> > > 
> > > What exactly do you mean by two-way replication?
> > 
> > Well I guess it would be a lock protocol for replication among master
> > servers, not just two :).
> 
> What's the locking for?

Scenario:

A <--> B

A is master to B,
B is master to A.

Problem: Update goes to A, and another one goes to B. You have the
typical race condition if no lock is in place. 

One way to go about this is that if an update goes to be B, first go and try to lock 
A; if
successful, go ahead and writ eto B and A. Then unlock.

That is the type of locking I am talking about.

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

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



Re: Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez
On Wed, May 05, 2004 at 12:01:27PM -0700, Jeremy Zawodny wrote:
> On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote:
> > 
> > Hello,
> > 
> > I am wondering if anyone is currently working on a two way replication
> > lock protocol. If so, what's the status. I understand there's little
> > gain in having two way replication but -- I am just curious. 
> 
> What exactly do you mean by two-way replication?

Well I guess it would be a lock protocol for replication among master
servers, not just two :).

Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E

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



Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez

Hello,

I am wondering if anyone is currently working on a two way replication
lock protocol. If so, what's the status. I understand there's little
gain in having two way replication but -- I am just curious. 

If no one is working on it, I may poke at it.

    Luis

-- 
GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84  A34A 6ADD 4937 E20A 525E


pgp0.pgp
Description: PGP signature


Embeded MySQL for Java ???

2004-02-29 Thread Luis Duran
Can anyboby tell me wheter exists an embeded MySQL server JDBC
implementation ???

Thanks

-- 
Luis Duran


signature.asc
Description: This is a digitally signed message part


Joined tables still not working

2004-02-03 Thread Luis Lebron
I am having a problem with a query that joins the following tables. I want
to create a query that would tell me how many Manhours have been alloted for
a particular
project (32) by category and how many hours (from the Tasks table) have
actually been used for this project and category.

The data tables look like this:

Manhours
 mid| ProjectId |ChargeNum  | Catid | Hours | EmployeeId

  1 | 32|11 | 19| 80|200020 
  2 | 32|11 | 19| 24
|23 


Tasks
TaskID  |ChargeNum  |Catid  |EmployeeId |Hours  
1   |11 |19 |200020 |8 
2   |11 |19 |200020 |8 
5   |11 |19 |23 |12 


By looking at the Manhours table I can tell that for ProjectId 32 I have 104
(80+24) hours alloted for Catid 19
By looking at the Tasks table I can tell that 36 hours (8 + 8 + 8 + 12) have
been used on this project (same ChargeNum as Manhours table)
and Catid 19


I would like to creat a query that would give me the following results

Catid   |allotedhours   |usedHours  
19  |104|28 


I have tried joining the tables in a variety of ways but I am still not
getting the correct results. I seem to have some problems with the hours
alloted calculating correctly.


thanks,

Luis


RE: Problem with joins and query

2004-02-03 Thread Luis Lebron
What I want to retrieve is how many hours have been assigned to a project
and category (which is in the Manhours table) and how much time has been
actually used (which is is the Tasks table)

So if I look at the data I can see that ChargeNum 11, catid 19 has a
total of 104 hours assigned in the Manhours table (80 for EmployeeId=200020
and 24 for EmployeeId=23)

Then if I look at the Tasks table I see that ChargeNum 111, Catid 19 has
a total of 36 hours (this are the hours that have been actually used)

What I would like as a final result is something like this 

Catid   Hours Used  Hours Alloted
19  | 36|104

-Original Message-
From: Jigal van Hemert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 9:05 AM
To: Mysql (E-mail)
Subject: Re: Problem with joins and query


- Original Message - 
From: "Luis Lebron" <[EMAIL PROTECTED]>
> Select M.Catid, sum(M.Hours) as allotedhours, sum(T.Hours) as usedHours
> >From Manhours as M, Tasks as T
> Where M.ProjectId=32
> AND T.ChargeNum=M.ChargeNum
> AND T.EmployeeID=M.EmployeeID
> AND T.Catid=M.Catid
> Group by M.Catid
> Order by M.Catid

It might be more understandable if you read it like:

SELECT M.Catid, SUM(M.Hours) AS allotedhours, SUM(T.Hours) AS usedHours
FROM Manhours AS M INNER JOIN Tasks as T
USING (ChargeNum, EmployeeID, Catid)
WHERE M.ProjectId=32
GROUP BY M.Catid

Is it correct that the two tables are joined on three columns?

Maybe it's best to try and refrase how the data in the two tables is
connected and what exactly you want to retrieve.
Try to think in data: "for project 32 I want all the records from table a
plus the records from table b which have the same value for col_name, sum
the values in col_name and sort them by col_name". From this you will be
able to construct your query easily...

Regards, Jigal.



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


Problem with joins and query

2004-02-03 Thread Luis Lebron
I am having a problem with a query that joins the following tables. I want
to create a query that would tell me how many Manhours to a particular
project (32) by category and how many hours (from the Tasks table) have
actually been used for this project and category.


Manhours
 mid| ProjectId |ChargeNum  | Catid | Hours | EmployeeId

  1 | 32|11 | 19| 80| 200020 
  2 | 32|11 | 19| 24|
23 


Tasks

TaskID  |ChargeNum  |Catid  |EmployeeId |Hours  
1   |11 |19 |200020 |8 
2   |11 |19 |200020 |8 
5   |11 |19 |23 |12 


The query I am using looks like this:

Select M.Catid, sum(M.Hours) as allotedhours, sum(T.Hours) as usedHours
>From Manhours as M, Tasks as T
Where M.ProjectId=32 
AND T.ChargeNum=M.ChargeNum
AND T.EmployeeID=M.EmployeeID
AND T.Catid=M.Catid
Group by M.Catid
Order by M.Catid

The results I am expecting are:

Catid   |allotedhours   |usedHours  
19  |104|28 

instead I am getting:

Catid   |allotedhours   |usedHours  
19  |184|28 


So I imagine that I am missing something in my join syntax, but I haven't
been able to figure it out.


Luis R. Lebron
Sigmatech, Inc


Insert select query problem

2003-11-13 Thread Luis Lebron
I am try to copy a couple of fields from one table to another. Here is my
query

Insert into users_test (firstName, lastName) Select firstName, lastName from
users;

The users table has 1,263 rows. However, only 1 row is inserted into
users_test. 

If I perform the following query 

Insert into users_test Select * users;

all the rows are inserted. What am I doing wrong in the first query?

thanks,

Luis R. Lebron
Sigmatech, Inc


Question on slow queries

2003-11-13 Thread Luis Lebron
I just started logging slow queries. Today I found the following lines in
the slow query log.

# Query_time: 14  Lock_time: 0  Rows_sent: 293  Rows_examined: 293
use storyboards;
SELECT /*!40001 SQL_NO_CACHE */ * FROM `rwt_screens`;


What exact does the third line mean?

thanks,


Luis R. Lebron
Sigmatech, Inc


RE: Creating random data in a test table based on an existing tab le

2003-11-11 Thread Luis Lebron
Thanks for the help. I tried your suggestion but only got 1 row inserted in
the test table.

Luis

-Original Message-
From: Olof Tjerngren [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 3:01 AM
To: Luis Lebron
Cc: Mysql (E-mail)
Subject: Re: Creating random data in a test table based on an existing
table


How about somethine like this as a starting point:

insert into testuser (firstname,lastname) select 
u1.firstname,u2.lastname from user u1, user u2 order by rand() limit 1;

MvH,

Luis Lebron wrote:
> I have an users table for a php application that I am programming. The
> current users table has about 1500 records. I would like to create a test
> table (i.e. users_test) with 10,000 records based on random data from the
> first table (i.e. random first name combined with a random last name,
> etc...). Is it possible to do this via a MySQL query? 
> 
> Luis R. Lebron
> Sigmatech, Inc
> 



Creating random data in a test table based on an existing table

2003-11-10 Thread Luis Lebron
I have an users table for a php application that I am programming. The
current users table has about 1500 records. I would like to create a test
table (i.e. users_test) with 10,000 records based on random data from the
first table (i.e. random first name combined with a random last name,
etc...). Is it possible to do this via a MySQL query? 

Luis R. Lebron
Sigmatech, Inc


Secure way of storing passwords in the database

2003-11-07 Thread Luis Lebron
Any suggestions of a "secure" way of storing membership passwords (for a
website) in a mysql database? Should I use sha, aes, des???

thanks,



Luis R. Lebron
Sigmatech, Inc


RE: Issues with Mysql 4.0 and PHP in a production environment

2003-11-07 Thread Luis Lebron
Anything that breaks a script (unsupported functions, changes, etc.) or that
causes performance problems.

thanks,

Luis

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 4:09 PM
To: Luis Lebron
Cc: Mysql (E-mail); Php-General (E-mail)
Subject: Re: Issues with Mysql 4.0 and PHP in a production environment


On Thu, Nov 06, 2003 at 02:10:27PM -0600, Luis Lebron wrote:
> Are there any issues with running PHP 4.3.X and Mysql 4.0 in a production
> environment?

What sort of "issues" are you looking for?

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

MySQL 4.0.15-Yahoo-SMP: up 53 days, processed 2,012,977,736 queries
(432/sec. avg)


Issues with Mysql 4.0 and PHP in a production environment

2003-11-06 Thread Luis Lebron
Are there any issues with running PHP 4.3.X and Mysql 4.0 in a production
environment?


thanks,

Luis R. Lebron
Project Manager
Sigmatech, Inc


RE: Compiling MySQL 4

2003-11-06 Thread Luis Lebron
True, but the compilation options stated --without-readline . So what is
going on?

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 1:25 PM
To: Luis Lebron
Cc: Mysql (E-mail)
Subject: Re: Compiling MySQL 4


On Thu, Nov 06, 2003 at 01:01:47PM -0600, Luis Lebron wrote:
> I am trying to compile MySQL 4.x on a Red Hat 8.0 but I'm getting the
> following error
> 
> /usr/bin/ld: cannot find -lreadline
> collect2: ld returned 1 exit status
> make[2]: *** [mysql] Error 1
> make[2]: Leaving directory `/usr/src/mysql/mysql-4.0.16/client'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/mysql/mysql-4.0.16'
> make: *** [all] Error 2

[snip]

> Any ideas on what is wrong or missing?

"cannot find -lreadline"

The readline library is missing.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.15-Yahoo-SMP: up 53 days, processed 2,006,872,739 queries
(431/sec. avg)


Compiling MySQL 4

2003-11-06 Thread Luis Lebron
I am trying to compile MySQL 4.x on a Red Hat 8.0 but I'm getting the
following error

/usr/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/usr/src/mysql/mysql-4.0.16/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql/mysql-4.0.16'
make: *** [all] Error 2


The mysql compilation options are as follows 

CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
CFLAGS="-O3" CC=gcc CXX=gcc ./configure --prefix=/usr \
--localstatedir=/var/lib/mysql \
--with-extra-charsets=none \
--without-bench \
--without-debug \
--without-readline \
--with-mysqld-user=mysql \
--enable-assembler \
--enable-thread-safe-client \
--with-client-ldflags=-all-static


Any ideas on what is wrong or missing?

Luis R. Lebron
Project Manager
Sigmatech, Inc


Deleting from multiple tables

2003-10-29 Thread Luis Lebron

I am working on some database tables to handle messages on an intranet.

One table looks like this

msg_id | subject | message | date


there is another table used to track senders and recipients that looks like
this

msg_id | sender_id | recipient_id |


Now what I would like to do is delete any messages that are older than 45
days and the corresponding records in the second table.

How can I delete matching records from both tables at the same time?


thanks,


Luis R. Lebron
Project Manager
Sigmatech, Inc


Updating age based on date of birth

2003-10-22 Thread Luis Lebron
I have a table that contains a date of birth (date) and a age field. How can
I create an update query that would calculate the correct age (from the date
of birth) and update the age field? I tried doing it with php but ran into
problems with persons born before 1969.


thanks,

Luis R. Lebron
Sigmatech, Inc


Select query question

2003-08-29 Thread Luis Lebron
I have a test results table that looks like this

student_id  test_id score
1   1   90
1   1   100
1   1   80

2   1   95
2   1   85
2   1   75

I need to create a query that would give me the average of the top 2 scores
per student per test. 
Following this example, student #1 would have an average of 95 (100 + 90)/2
for test #1 and student #2 would have an average of 90 (95 + 85)/2

BTW, I using mysql 3.23

Any ideas on how I can do this?

thanks,

Luis


mysqlcheck fail in my.ini

2003-08-01 Thread Luis Lozano
I have this my.ini
--
[WinMySQLAdmin]
Server=C:/MYSQL/bin/mysqld-max.exe
QueryInterval=10
[mysqlcheck]
host=localhost
user=root
force
fast 
all-databases
silent
debug=c:\mychk.log
---
but do not check the BD at startup and do not write the log file. Some idea?

Thanks

luis

Include Check and Repair in my.ini

2003-07-03 Thread Luis Lozano
How can i check and repair DBs, before service in WIN32 started?
I try to include group [myisamchk] in my.ini files, but nothing happen. How can i 
include it?

Thanks

Luis

Help me!!!

2003-06-19 Thread Luis Enrique Bauzá Peña
Hi, I need some link to a spanish mysql list, would you ...?



Foreign Key

2003-03-24 Thread Luis Matos Lima
i´m having some trouble in creating a table like this 
one.

CREATE TABLE tab3( 
cod1 int( 3 ) NOT NULL ,
cod2 int( 3 ) NOT NULL ,
PRIMARY KEY ( cod1, cod2 ) ,
FOREIGN KEY ( cod1 ) REFERENCES tab1( cod1 ) ON UPDATE 
CASCADE ON DELETE CASCADE ,
FOREIGN KEY ( cod2 ) REFERENCES tab2( cod2 ) ON UPDATE 
CASCADE ON DELETE CASCADE 
) TYPE = INNODB 

I don´t understand why i acannot create it.
I´m using mysql 4.0.12 in win98 wiht phpmyadmin 2.2.4
i receive a message error like this

Mensagens do MySQL : 
Can't create table '.\test\tab3.frm' (errno: 150)

Please help, i´m in a important project and i need to 
know how to slove this problem.




-
Email Enviado utilizando o serviço MegaMail

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



Slower access from a client some router hops away from mysql server

2003-02-14 Thread Jose Luis Pérez

We have developed an application with Visual Basic 6 managing through
myoledb some mysql server tables.

Perhaps it´s basic, but we have seen that the client application runs much
more slower in a point separated
through 2 routers and with 2 Mbps circuits than in the vlan where the mysql
server is located.

I assume that the bandwith is not the problem (a wan connnection with 2Mbps
circuits is enough) and there is some fine tunning (application, myoledb or
mysqlserver) we are not configuring in a proper way.

I will appreciate a lot any ideas about this.

Thanks


José Luis


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

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




Portuguese Characters

2002-12-14 Thread Luis Damas
Hi.
I'm using MySql+MyODBC.
When reading data in VB (ADO) from the database, the Portuguese characteres
(çÇáãé, etcc) appear in a strange way.

Any Ideas?
Regards
Luis Damas
[EMAIL PROTECTED]


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

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




New to MySQL, ported from MS Access. Using ASP & MyODBC - UPDATE problem...

2002-11-04 Thread Luis Sanches
Hi,

I've recently made the move over from Access to MySQL.

So far, everything has been fine.
I'm using:
Win2K server (ASP)
WinMySQLadmin 1.4,
MyCC 0.8.4-alpha,
MyODBC 3.51 and
MySQL 3.23.51-nt

First problem: (fixed)
--
I had used some keywords as table names, but SQL in a Nutshell by O'Reilly
put me on the straight track.

Second problem: (also fixed)

Then I had problems using this line:   <% If MyRS.recordcount > 0 Then %>...

I discovered that under ASP, the recordcount is "-1", so I worked around
this by using the following line:
<% If MyRS.EOF = "False" Then %>.

All was fine, and exporting data straight from Access2000 into MySQL was
easy.

I then found one bizarre problem:

Third Problem: (Circumvented)
-
I could edit any old record set - originally created on Access, but not
newly created ones!

>> Error Type:
>> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
>> Query-based update failed because the row to update could not be found.

I spent quite some time looking for information on how to fix this, and drew
a blank.
I can display all the info from the new record set, but I can't update it...

..that is until I tried a different way to update it:

>>Old way:

1) Open connection  (sql="select * from mytablename where UserID = '1'")

2) MyRS("UserName") = "New Value"

3) MyRS.Update   '<-- Error occurred at this line
4) MyRS.Close

>>New way:

1) Open connection with update directly in sql statement:
(sql="UPDATE mytablename SET UserName = 'New Value' WHERE UserID = '1'")


So... here's my questions to you knowledgeable lot:

a) Why did the second method work, and not the first? - is this a MyODBC
bug?
b) Why is this only happening to NEW rows in the database? - is it a MyODBC
bug?
c) could I gain/fix anything by changing over to MySQL 4 ?
d) how do YOU normally update MySQL records from within ASP?

Many thanks for any insight.  As I said, I've made it work, so I'm not too
troubled, but I would like to code things in the 'standard' way.

Luis.



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

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




MySQL over NFS

2002-08-20 Thread Luis Calero


  Hi... I've got the folowing question, our servers are running pretty
busy these days and our main DB server is taking high load peaks (memory
is OK but the cpu has almost no idle time). We have another spare server
and I'm thinking about mounting the database over NFS (100mb LAN) to the
spare server and using both as frontends to the DB. Both servers are
supposed to do reads and updates to the DB, but i'm concerned with the
updates of the server using NFS.

  Are NFS locks safe enough to run this kind of setup? Is this going to be
an advantage or will suffer from other kinds of problems? Both boxes are
PIII dual 1Ghz / 1Gb ram, Linux 2.4.16, MySQL 3.23.52

  Thanx

--
  L


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

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




Re: Problem with subqueries

2002-07-31 Thread Luis Rodrigues

Thanks.

On 31 Jul 2002, Martin Waite wrote:

> On Wed, 2002-07-31 at 12:03, Luis Rodrigues wrote:
> > hi,
> > I have some sql code that I need to use with mysql
> > it uses nested queries and since mysql doesn't implement them 
> > I would like to know how to do this.
> > 
> > SELECT * FROM apartamentos 
> > WHERE vendido=0 
> > AND Concelho=$row["ConcelhoP"] 
> > AND Localidade LIKE '&$row["LocalidadeP"]&' ...
> > 
> > WHERE Referencia NOT IN ( SELECT Referencia FROM historico_clientes WHERE
> > NumCliente=$id)
> > 
> 
> 
> It will require something like:
> 
> SELECT a.* FROM apartamentos a
> LEFT JOIN historico_clientes h ON a.Referencia = h.Referencia AND h.NumCliente=$id
> WHERE h.Referencia IS NULL
> AND vendido=0 
> AND Concelho=$row["ConcelhoP"] 
> AND Localidade LIKE '&$row["LocalidadeP"]&' ...
> 
> ==
> Martin
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 


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

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




Problem with subqueries

2002-07-31 Thread Luis Rodrigues

hi,
I have some sql code that I need to use with mysql
it uses nested queries and since mysql doesn't implement them 
I would like to know how to do this.

SELECT * FROM apartamentos 
WHERE vendido=0 
AND Concelho=$row["ConcelhoP"] 
AND Localidade LIKE '&$row["LocalidadeP"]&' ...

WHERE Referencia NOT IN ( SELECT Referencia FROM historico_clientes WHERE
NumCliente=$id)

Best Regards,

Luis Rodrigues



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

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




Replication on different SQL servers

2002-07-17 Thread Luis Manuel Cova

Hi..

I'm working on a proyect to implement a SQL server with PHP to allow acces
to a MySQL server on the web.
The Master server (the server everybody work with) is a Windows 2000 CENTURA
SQL server.

I want to know how i can manage to export a database from that server to
another server (The one who will allow access to the database on the WEB)
With what funtion can i do this, and also install a script to make the slave
server update from the master database (This can be done once a day, it
doesnt have to be inmidiate)

Thanks


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

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




Porting from GUPTA-SQL client to PHP - SQL client.

2002-07-05 Thread Luis Manuel Cova

Hi..

I have a client that's been writen in GUPTA and compiled to be used as a
cliento to an SQL database that i access using my local Lan and Netbios..

I want to port that client software (i have the source code for the Gupta
Cliente) to be used in a PHP server to allow acces to the database from the
internet (TCP/IP)..

How can i do that??? If it can be done..

Thanks


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

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




Dumping a MySQL DB Out to Access

2002-02-25 Thread Luis Gonzalez

Hi, 
First of all, I'm not an expert at all, I'm just a newby who started a week
ago,,,
 
But I guess that the answer is very simple: Why don't you link your MySQL
database to Access thru MyODBC?
This way your customers could use Access as the front-end, while MySQL is
the back-end where the data is stored.
 
For that you just have to download the Myodbc driver, create dsn connection
in every PC that would be connected to the database server, create a blank
database in Access and link the tables in the server to the new Access
database. from this point on, it is just like working in Access.
 
For a detailed guide, check this out:
http://www.devshed.com/Server_Side/MySQL/ODBC/page1.html
 
Good luck,
LUIS
[EMAIL PROTECTED]

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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

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




Re: Newbie install problem

2001-12-26 Thread Luis A

You know what i download a different on. go to rpmfind.net do a mysql
search. also down load the client plus the common ... 

it should work. 

if you have trouble let me know ok ...

Luis


On Wed, 2001-12-26 at 10:09, Richard Lyons wrote:
> I've just downloaded and installed the rpm (to RH7.1), thus:
> 
># rpm -iv MySQL-3.23.46-1.i386.rpm
>Preparing packages for installation...
>MySQL-3.23.46-1
>Preparing db table
>Preparing host table
>Preparing user table
>Preparing func table
>Preparing tables_priv table
>Preparing columns_priv table
>Installing all prepared tables
>011226 12:32:20  /usr/sbin/mysqld: Shutdown Complete
> 
> 
>PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
>This is done with:
>/usr/bin/mysqladmin -u root -p password 'new-password'
>/usr/bin/mysqladmin -u root -h potty.coho -p password 'new-password'
>See the manual for more instructions.
>
>Please report any problems with the /usr/bin/mysqlbug script!
> 
>The latest information about MySQL is available on the web at
>http://www.mysql.com
>Support MySQL by buying support/licenses at https://order.mysql.com
> 
>Starting mysqld daemon with databases from /var/lib/mysql
>
> Following the instructions given on screen, I immediately did:
>   
># /usr/bin/mysqladmin -u root -p password 'mynewpassword'
>bash: /usr/bin/mysqladmin: No such file or directory
> 
> So I tried to locate my copy of mysqladmin.  I don't have one.  I can't 
> find any mention of it on the MySQL site.  Where do I get it from? 
> 
> The installation seems otherwise complete, inasmuch as chkconfig now 
> shows mysqld in the right places.
> 
> Can anyone enlighten me?
> 
> --
> richard
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
-- 




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

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




RE: Downsides of MySQL?

2001-12-18 Thread luis ferro

And on the other hand, with mySQL you can talk with the real developers
that make it work while on other "closed source" DBs, with luck, you can
get sensible costumer support...

Cheers,
Luis Ferro

-Original Message-
From: Michael Widenius [mailto:[EMAIL PROTECTED]]
Sent: terca-feira, 18 de Dezembro de 2001 11:52
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]]
Cc: Robinson, Mike; [EMAIL PROTECTED]
Subject: RE: Downsides of MySQL?



Hi!

I may be a little based, but here is some input regarding this.

>> Good morning.
>> Recently, we presented MySQL as a database option for a website that
>> we might be working on.  We've used it as our database in the past
and
>> we plan on using it in the future as possible.
>> With that said, I confess I don't have as intimate a 
>> knowledge of mySQL
>> to address some of the things in the email that was sent to 
>> me.  I'd like
>> to hear what some of you have to say/think about this.  I know some
>> of the things said below aren't entirely correct, but I'm not 
>> 100% sure 
>> about some of the others.
>> 
>> --Begin Quote--
>> 
>> MySQL - as I said at our meeting, we would not be comfortable 
>> with this 
>> as an enterprise strength solution. MySQL is unsupported freeware

MySQL is developed by a company, MySQL AB, who have been providing
commercial support for MySQL since 1996.  MySQL AB has the full
copyright of the core server, who is mainly developed by it.  A lot of
tools and API's around are provided by the MySQL users around the
world.

>> and lacks enterprise management functionality.

I agree that MySQL doesn't yet have all the nice admin GUI's that you
can find for some of the other commercial big players, but MySQL is
one the other hand much easier to manage, so there is much less need
for these.

There is a lot of administrative command tools for MySQL available
that allows one to monitor and work with MySQL.

>> It has a small 
>> limited feature 
>> set compared to ORACLE, DB/2 and is lacking the functionality 
>> to support 
>> data replication and has little capability for generating 
>> management info. 

MySQL supports replication since more than one year back (and you
don't have to pay extra to get this :)

You can find a quite complete feature comparison table at:
http://www.mysql.com/information/crash-me.php

You will notice that MySQL has most of the features that you will need
for most projects.  It has also a lot of unique features that makes it
extremely suitable for web and logging applications, but this doesn't
mean that MySQL isn't suitable for other applications as well.

I agree that we don't support everything that Oracle and DB/2 does,
but the things we support we do very well and we are closing the gap
the whole time.  We have always tried to avoid 'bloat' the server with
features that only a few people seldom need...

>> There are question marks around the scalability of the 
>> product.

MySQL is typically much faster than Oracle and DB/2, something MySQL
users have discovered over and over again.

http://www.mysql.com/information/benchmarks.html
(We will on this page soon have results from new multi-user benchmark
that
will contain a lot of new interesting data).

If your application have a need for hard database speed, you can
usually get much better performance with MySQL than you can with
either Oracle or DBI/2 on the same hardware.
(I have to say usually, as there is always exceptions for the rule;
One database can't be better in every tests, something our benchmarks
shows quite clearly..)

>> I'm not 
>> sure of the locking algorithms used (whether row level or 
>> record level) -

MySQL has a sophisticated handler concept which allows the user to
choose different backends for different tables.  With this you can
choose between table locks, page locks, row locks or versioning
(no locks at all).

For example, if you are using InnodB tables, the locking algorithm used
is very similar to what Oracle provides in their high end servers.

>> the fact that it is not generally used in multi-user solutions

MySQL is the most used open source database and is generally used in
multi-user environments.  You can find a lot of user stores that
proves this on http://www.mysql.com.

>> is a good enough indication that this is not accepted database
technology for
>> industrial-strength multi-user systems.

I can only say that our customer base proves otherwise :)
Just take a look in our email archive and check the email addresses
from people that is on the MySQL mailing lists..

>> The fact that it is unsupported freeware would mean that an 
>> end user would 
>> potentially be "held to ransom" by a DBA with specific 
>&

Installation trouble with PHP Mysql

2001-12-17 Thread Luis A

I have just installed the current version of php and mysql server plus
the  client. 

I had apache running already, so that means that I did not have to
install it again. 

When I did a test on mysql to connect i get this error 


Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/test.php on line 3


Well heres the code I used



Can someone tell me what I'm doing wrong . or is there other way I could
test it out? 

Thank you 


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

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




RE: MySQL v.s. Oracle

2001-12-13 Thread Luis Ferro

I would like to know one thing...

How to make MySQL work with Oracle and viceversa!

I'm tired of the treads that reduce technology in cases of one or another...

Cheers,
Luis Ferro

PS- What is the better tool a sand hammer or a nail hammer? answer: depend
on what you want to pound!

-Original Message-
From: Robert Sundstrvm [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 13 de Dezembro de 2001 11:55
To: [EMAIL PROTECTED]
Subject: RE: MySQL v.s. Oracle


At 04:23 2001-12-02 , you wrote:
>Not sure that total users is a good metric; queries per second may be
>better.
>
>We host web sites and use MySQL with MyISAM tables for small and
>medium-sized sites, Oracle for the big ones. Oracle's row-level locking
>abilities make a big, deciding difference for the bigger, more active
sites.
>Oracle just scales much better than MySQL.
>
>Big downside of Oracle is the price, which is why we use it for just the
big
>boys. Costs too much to install on all our servers.
>
>I'm currently evaluating Berkeley and InnoDB tables to see how they compare
>to Oracle. If they compare well then we may be using'em in place of Oracle
>for most sites.

I have done some admittedly not-so-scientific testing on MySQL (both with
MyISAM and InnoDB) to find that both combinations performs best in single
user systems. The test I run made about 50% updates/inserts and about 50%
queries, with medium sized transactions (3-5 statements per transaction,
where transactions was supported). On my regular desktop box I was able to
get about 700 statements per second using MyISAM and about two thirds of
that using InnoDB. Already at 2 simultaneous users (doing the same
transactions) total throughput was less than for the single user case.

Most stable commercial products exposes the opposite behavior. It may be
the case that MySQL performs pretty well in single (or few) user cases, but
the commercial alternatives will, in my experience, in most cases beat
MySQL on 3-5 users and above.

It is also the case that most commercial products supports better
optimization methods than MySQL. Two important things are caching statement
compilations at the server and stored procedures. If I have a performance
problem in my database it is often the case that I can improve things by
putting some SQL-code in a stored procedure.


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

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



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

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




RE: opinion - voating

2001-11-26 Thread Luis Ferro

This kind of voting is reductive as i for instance would answer both. They
both have its uses, and wise is the one that can recognize when to use one
or the other...

Cheers,
Luis Ferro
WebDev

-Original Message-
From: Ken Kinder [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 26 de Novembro de 2001 15:46
To: Mamun Murtaza Sheriff; [EMAIL PROTECTED]
Subject: Re: opinion - voating


Oracle is certainly more full-featured, but if you know very little about
databases, Oracle is not the right choice. Only use Oracle if you have a
full-time fix-figure-salary Oracle expert AND you actually need Oracle's
features.

If you don't specifically know you need Oracle, you don't.

On Wednesday 21 November 2001 09:45 pm, Mamun Murtaza Sheriff wrote:
> Dear All
>
> You all are working on Database for Long time. In your opinion Which one
is
> best 1. MySql or 2. Oracle
>
>
> Mamun
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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


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

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




RE: Getting to latest 5 Records

2001-11-26 Thread Luis Ferro

The best way is to get the records ordered inverselly by the auto-increment
field and then restrict the return to 5 records.

Cheers,
Luis Ferro
WebDev

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 26 de Novembro de 2001 10:02
To: Mysql List
Subject: Getting to latest 5 Records


Dear all
I had a table which with Auto_increment, which means when i insert a record
there will be a number insert to lead as the location of the record.
here is my question.
I was try to get the most last five records , but i don't know which query
should i use?

Thx
Jack


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

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


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

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




Mysql Lost

2001-11-21 Thread Luis

Hello all,

I have just notice that the new Mysql3.23.44.rpm is different.

I download the rpm installed it

(rpm -ivh Mysql )

installed fine, started the mysql deamon but when i tried to set a
passwd for root i could not find mysqladmin

it tells me that its located

/usr/bins/mysqladmin

but I look in the directory I did not see it

Well I also download the binary package. I  unzip it and untar it .

Went into the directory and ran this command.

./configure 

all it did was start mysql deamon.

Its not like befor I guess I'm going to read the doc on the site to
configure and install mysql the right way. But if anyone know a good
site to read the doc can you please let me know


Thank you


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

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




What Licence of Mysql Win32 is Free ?

2001-11-10 Thread Jose Luis Maieron

I'need know what version of MySQL running in Windows, is free licence ?

Thanks !


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

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




Linux VM on MySQL Servers...

2001-10-31 Thread Luis Ferro

Hi there,

After reading some debate under way in kernel lists, i'm curious 
regarding performance of MySQL under the two diferent VM currently in 
the kernels (Linus and Alan Cox kernels).

Has anyone any info regarding this?

Cheers,
Luis Ferro


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

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




Re: SecureCRT

2001-10-29 Thread Luis

[EMAIL PROTECTED] wrote:

> I am using SecureCRT to login to a remove MySQL server.  I can get pass the
> initial login.  However,  a login screen displays on the screen asking for a
> second password.  I have entered all information correctly, but the system is
> still requesting another password.
>
> Verlin Taylor
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Why dont you use ssh to login to you sever .


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

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




Re: Can't download files from MySql.com

2001-07-05 Thread Luis

try going downloading it from www.rpmfind.net thats a good site too


bye Luis
- Original Message -
From: "Michael Tam" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 12:36 AM
Subject: Can't download files from MySql.com


Hi all,

Did anyone experience any difficulty on downloading files from
mysql.com??
I tried to download MyODBC from the download page but none of the
downloads seems working at all

Regards,
Michael



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

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




Re: asking for teaching?

2001-07-04 Thread Luis

well you should read the man pages that come with it also there are alot of
book on mysql.

But you know what since your  a newbie. I wills how you. I dont have mysql
installed on a windows machine, but on a linux box. i believe the commands
are the same.


log in
mysql

create database test; ---hit enter

one you create it do this

# use test;--- this will change to this database

after that you will have to create the table

# create table art ; this will create the table for  you .

if i'm wrong let me know


bye Luis
- Original Message -
From: "Shania Qiu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 5:55 PM
Subject: asking for teaching?


> Hi, all,
>
> I am a newer to MySQL, being learning, i have installed the bianary
3.23.29
> into my pc which is running windows 2000. Can someone tell me where and
how
> to create tables in MySQL.
>
> Thank you all.
>
>
> shania.
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: Storing Credit Cards

2001-07-01 Thread Luis

well the one that hold the credit cards. what company do you work for ?
- Original Message -
From: "Luis" <[EMAIL PROTECTED]>
To: "Derick Dorner" <[EMAIL PROTECTED]>; "Chris Cameron" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, July 01, 2001 3:51 PM
Subject: Re: Storing Credit Cards


> for what company do you work if you dont mind me asking?
>
>
>
> - Original Message -
> From: "Derick Dorner" <[EMAIL PROTECTED]>
> To: "Chris Cameron" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, July 01, 2001 3:23 PM
> Subject: Re: Storing Credit Cards
>
>
> > I am running a website that users enter a credit card # (we have several
> > hundred thous users and this works fine) and they are stored in the
> > database, and their membership is renewed monthly. I keep the credit
card
> > #'s in a seperate database with strict permissions, and ALL data is
> > encrypted using mysqls function so its fast, and the salt to encrypt
them
> is
> > stored in a binary file readable only by that server and select admins
> > ..never had a problem. if i wanted to make it more secure i am doing
> > this...i am writing a seperate compiled c program to enter the database
> and
> > do the membership renewals, rather than php, and this way the salt used
to
> > decode the credit card info is NEVER on plaintext on the server, and
that
> > program wont run on another server...so no matter how bad we are hacked,
> it
> > is very difficult to get the infomation from us. this seems to be a good
> and
> > fast method.
> >
> > - Original Message -
> > From: "Chris Cameron" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, July 01, 2001 4:27 PM
> > Subject: Storing Credit Cards
> >
> >
> > > A client has asked us to make him an application that requires us
> keeping
> > > Credit Card Numbers. I'm a bit concerned as it immediately remined me
of
> > > egghead.com (having all their CC #'s stolen).
> > >
> > > One of the ideas was to have the users password encrypted as an md5
> hash,
> > > and then to encrypt the users CC with their password. So we wouldn't
> > > actually keep anything that could immediatly show credit card numbers
on
> > > the server. The problem this creates is whenever we need to use their
> > > credit card, the user needs to enter in their password. Which would be
> > > quite inconvenient as we'd use it in many places (like showing the
last
> 4
> > > digits to verify it's the right card).
> > >
> > > The only other idea was to just stick them in plain text and keep
people
> > > far away from the MySQL server.
> > >
> > > Has anyone had any experience with this? Or any suggestions?
> > >
> > > Thanks,
> > > Chris
> > >
> > >
> > > -
> > > Before posting, please check:
> > >http://www.mysql.com/manual.php   (the manual)
> > >http://lists.mysql.com/   (the list archive)
> > >
> > > To request this thread, e-mail <[EMAIL PROTECTED]>
> > > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> > >
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: Storing Credit Cards

2001-07-01 Thread Luis

for what company do you work if you dont mind me asking?



- Original Message -
From: "Derick Dorner" <[EMAIL PROTECTED]>
To: "Chris Cameron" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 01, 2001 3:23 PM
Subject: Re: Storing Credit Cards


> I am running a website that users enter a credit card # (we have several
> hundred thous users and this works fine) and they are stored in the
> database, and their membership is renewed monthly. I keep the credit card
> #'s in a seperate database with strict permissions, and ALL data is
> encrypted using mysqls function so its fast, and the salt to encrypt them
is
> stored in a binary file readable only by that server and select admins
> ..never had a problem. if i wanted to make it more secure i am doing
> this...i am writing a seperate compiled c program to enter the database
and
> do the membership renewals, rather than php, and this way the salt used to
> decode the credit card info is NEVER on plaintext on the server, and that
> program wont run on another server...so no matter how bad we are hacked,
it
> is very difficult to get the infomation from us. this seems to be a good
and
> fast method.
>
> - Original Message -
> From: "Chris Cameron" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 01, 2001 4:27 PM
> Subject: Storing Credit Cards
>
>
> > A client has asked us to make him an application that requires us
keeping
> > Credit Card Numbers. I'm a bit concerned as it immediately remined me of
> > egghead.com (having all their CC #'s stolen).
> >
> > One of the ideas was to have the users password encrypted as an md5
hash,
> > and then to encrypt the users CC with their password. So we wouldn't
> > actually keep anything that could immediatly show credit card numbers on
> > the server. The problem this creates is whenever we need to use their
> > credit card, the user needs to enter in their password. Which would be
> > quite inconvenient as we'd use it in many places (like showing the last
4
> > digits to verify it's the right card).
> >
> > The only other idea was to just stick them in plain text and keep people
> > far away from the MySQL server.
> >
> > Has anyone had any experience with this? Or any suggestions?
> >
> > Thanks,
> > Chris
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




Re: redhat 7.1 setting up mysql

2001-06-27 Thread Luis

Trond Eivind Glomsrød wrote:

> "wkd" <[EMAIL PROTECTED]> writes:
>
> > 1.  (*) text/plain
> >
> > I'm setting up mysql for redhat 7.1 to be used with php and apache. However, in 
>the past I've had problems with the setup. I had a person come in and setup mysql on 
>redhat 6.0 ( 2 1/2 days later he had it running) the program has been riddle with 
>bugs. The questions are: ( note: mysql is not installed on my computer from redhat. 
>I've had problems with the default setting that come with redhat in the past and did 
>not install then).
> >
> > 1) what rpm files should I used and is there an order to them?
>
> mysql and mysql-server (mysql-devel for program development) - just
> install the rpms ("rpm -Uvh mysql mysql-server") and start the service
> ("service mysqld start", which will initialize the database for the
> first time and start the server)
>
> > 2) when installing rpm files can you or how can you tell the program
> > where to install the program?
>
> This information is embedded in the package - there is a relocate
> switch, but for most packages this can create some unexpected results
>
> --
> Trond Eivind Glomsrød
> Red Hat, Inc.
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Well the rpm that came with rh 7.1 dont use. Download it from the net. but download 
the lower case one. I have a link on how to setup apache, mysql and php click on the 
link below it should show you  how to do it.


http://www.php.net/manual/en/install.apache.php

good luck let me know if you need help with it. Once again i started the mysql book, 
since i been putting it off. kind of like it.


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

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




user variables

2001-06-12 Thread Luis A. Fdez. de Retana Aguirre

Hello,

 My problem is about users variables. I want to do
a script to create a database so:
  SET @dbname:="mydbname";
  CREATE DATABASE @dbname;#  <-- Don´t
work
  CREATE DATABASE (SELECT @dbname);# <-- Don´t
Work

I have tried to define @dbname=mydbname directly
but it blocks.

Thanks



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

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




Driver odbc for mysql

2001-05-28 Thread Luis Carlos Braga

I install the obdc driver for mysql and then anothers database what runing (way others 
odbc drivers, as infomix) in my computer don´t runing more.

Please help



asian charatersets in mysql?

2001-04-30 Thread Luis Hoeks

I would be very pleased, if someone could tell me if MYSQL supports asian 
character sets like big5 or thai charctersets.
If yes, what do I need to install to get it running. Where can I find any 
help?
Any advice is very much appreciated!
Kind regards from
Luis
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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




Population a database

2001-04-20 Thread Luis

Hello all

I have a simple question. I have a database in (ms) accesss that I would like to 
transport into mysql database.

First  of all ,do i have to create the database plus tables. then import the data .

or

could i just grab the whole database and tables with all the data inside and import 
it. is there a how to or a sample of this method
Im sorry but I'm new to all this...


Thank you very much


Luis



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

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




Help with Mysql inport

2001-04-18 Thread Luis

Hello all, Just have  a simple question I hope.

1. I would love to move my database in access (ms) to mysql running on my
linux box (rh7.0)
How would I do this?

2. Then I would like to connect threw my windows machine into the database
running on the linux box.

I download the MyODBS file from the site. Installed it went into ODBS set in
the control panel . Here's were I get lost ..


First of all I need to move or inport the database to mysql server. How would
I do that.


Thank you for the help


Luis


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

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




Problem with mysql++, Aborted (core dumped)

2001-04-15 Thread Luis E . Cruz Campos

I am trying to prove a small program of test, but when trying to execute it 
this always it throws "Aborted (core dumped)", this happens at the time of 
making the connection:

It is the program:

#include 
#include 
#include "sqlplus.hh"

cchar *user="sqluser";
cchar *pass="sqluser";
cchar *host="Localhost";
cchar *db="test";

main () {
cout << "Conectando...\n";
Connection MySQL(db, host, user, pass);
cout << "Ok.";
return 0;
}

also i have proven with "Connection MySQL(db)" and "Connection MySQL(); 
MySQL.connect();", this like "root" and "common user"

i am using:

redhat 7.0
gcc 2.96
mysql 3.23.36
mysql++ 1.7.8

Thanks for your help !!! and sorry by my english !!!
 
-- 
Luis E. Cruz Campos
[EMAIL PROTECTED]

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

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




Re: Help with ODBC

2001-04-04 Thread Luis

Gary Huntress wrote:

> I had a similar problem after I installed a driver set, I don't think it was
> the MyODBC drivers, but the outcome was the same, a very generic windows
> error that was not even associated with an attempted connection.
>
> I had to reinstall the Microsoft MDAC components, available here
> http://www.microsoft.com/data/download.htm#26info
>
> Once I did that I could connect, I didn't even have to reinstall the MyODBC
> driver.
>
> Good Luck
>
> Gary "SuperID" Huntress
> ===
> FreeSQL.org offering free database hosting to developers
> Visit http://www.freesql.org
>
> - Original Message -
> From: "Luis" <[EMAIL PROTECTED]>
> To: "Steve Ruby" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, April 04, 2001 9:59 PM
> Subject: Help with ODBC
>
> > Thank you for all the help on MyODBC  but I can't connect to mysql server
> > threw access.
> >
> > Here are the steps on how I start.
> >
> > 1. I download the MyODBC setup file for windows. I ran the setup
> everything
> > went fine.
> > 2. Then I went in to my control panel > double click on ODBC Data
> > 3. ODBC Data open , I see seven options User DSN, System DSN, File DNS,
> > Drivers, Tracing Connection Pooling, Abaout
> > 4. I add in the User DSN "agentinfo" --- agentinfo is a database also in
> mysql
> > server.
> > 5. When i added i got other window that had alot of fields to fill in .,
> >
> > A. Windows DSN name :   agentinfo
> > B. Mysql Host :   192.168.2.146 --- that's the
> ip
> > address were i have mysql running.
> > C. Mysql database name:   agentinfo---name of
> > database on mysql.
> > D. user name : root  thats what i
> use
> > when running mysql or adding databases.
> > E. password ghost password
> to
> > log into mysql server.
> > F. port (if not 3306)3306  that's what is
> says
> > it running on in my /etc/services file
> >
> > after that i say ok . I also added a entry into Data Source files.  were
> it
> > asked me the same question as above.
> > I click ok then i get this error message.
> >
> > "General error: Invalid file dsn 'C:\Program files\Command Files\ODBC\Data
> > Source\agentinfo.dsn"
> >
> > I dont know what this is .
> >
> > Just wondering what I'm doing wrong. or if someone could show me the right
> > steps on loading it configure the ODBC date
> > plus how to connect threw access.
> >
> > Thank you
> >
> > Luis
> >
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >

thank you gary for the link i installed it . went back to control panel - ODBC
went to the "File DSN" option added

server1

filled out all the fields once again,  then i said ok

but this time i got this message

" A connection could not be made using the file data source parameters entered
. Save not-verified file DSN?"

So can you please tell me what i'm doing wrong


bye luis


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

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




Help with ODBC

2001-04-04 Thread Luis

Thank you for all the help on MyODBC  but I can't connect to mysql server
threw access.

Here are the steps on how I start.

1. I download the MyODBC setup file for windows. I ran the setup everything
went fine.
2. Then I went in to my control panel > double click on ODBC Data
3. ODBC Data open , I see seven options User DSN, System DSN, File DNS,
Drivers, Tracing Connection Pooling, Abaout
4. I add in the User DSN "agentinfo" --- agentinfo is a database also in mysql
server.
5. When i added i got other window that had alot of fields to fill in .,

A. Windows DSN name :   agentinfo
B. Mysql Host :   192.168.2.146 --- that's the ip
address were i have mysql running.
C. Mysql database name:   agentinfo---name of
database on mysql.
D. user name : root  thats what i use
when running mysql or adding databases.
E. password ghost password to
log into mysql server.
F. port (if not 3306)3306  that's what is says
it running on in my /etc/services file

after that i say ok . I also added a entry into Data Source files.  were it
asked me the same question as above.
I click ok then i get this error message.

"General error: Invalid file dsn 'C:\Program files\Command Files\ODBC\Data
Source\agentinfo.dsn"

I dont know what this is .

Just wondering what I'm doing wrong. or if someone could show me the right
steps on loading it configure the ODBC date
plus how to connect threw access.

Thank you

Luis


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

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




  1   2   >