Why doesn't MySQL support gzip encode/decode functions.

2007-06-12 Thread Kevin Burton
Why doesn't mysql support gzip for COMPRESS/UNCOMPRESS and only zlib For network applications zlib is a lot less compatible than gzip. For example I could send gzip'd content directly from the database within a larger gzip'd stream. Kevin -- Founder/CEO Tailrank.com Location: San Francisco

Re: date function question

2007-06-12 Thread Baron Schwartz
There is also a LAST_DAY() function that returns the last day of the month: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Peter Brawley wrote: > # of days since the first of the month from last month datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'

Re: Error 2013 (Lost Connection to MySQL Server) On A Solaris 10 Box

2007-06-12 Thread Baron Schwartz
Rajesh Mehrotra wrote: Hi, We copied over a test copy of a multi-GB database to a new Sun V440 box running Solaris 10 (64-bit) with a 64-bit MySQL install. When trying to connect to the database, we consistently get Error 2013. Any pointers? Check the server's error log and see if there's

Error 2013 (Lost Connection to MySQL Server) On A Solaris 10 Box

2007-06-12 Thread Rajesh Mehrotra
Hi, We copied over a test copy of a multi-GB database to a new Sun V440 box running Solaris 10 (64-bit) with a 64-bit MySQL install. When trying to connect to the database, we consistently get Error 2013. Any pointers? TIA. Sincerely, Raj Mehrotra hccs [EMAIL PROTECTED]

Re: date function question

2007-06-12 Thread Peter Brawley
> # of days since the first of the month from last month datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'))) > the # of days since the end of last month (e.g. from 5/31/07) datediff(now(),date_sub(concat(date_format(now(),'%Y-%m-'),'01'),INTERVAL 1 DAY)) PB - Andr

Re: MySql Host through Heartbeat

2007-06-12 Thread Baron Schwartz
Gerald L. Clark wrote: Baron Schwartz wrote: Gerald L. Clark wrote: Ben Clewett wrote: Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around fr

Fwd: Table crashing

2007-06-12 Thread Sharique uddin Ahmed Farooqui
Tables frequently crashing on my site. Here is the message I'm seeing * Warning*: Table './mydb/sessions' is marked as crashed and should be repaired query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid= s.uid WHERE s.sid = '854c6474111de174abbddf77f74b9d99' in * /www/ims/includes/da

Re: MySql Host through Heartbeat

2007-06-12 Thread Gerald L. Clark
Baron Schwartz wrote: Gerald L. Clark wrote: Ben Clewett wrote: Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around from server to server when

Re: MySql Host through Heartbeat

2007-06-12 Thread Baron Schwartz
Gerald L. Clark wrote: Ben Clewett wrote: Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around from server to server when a failure occures. I a

Re: MySql Host through Heartbeat

2007-06-12 Thread Ben Clewett
Baron, Thanks for the fast reply. I like the idea of piping in the servername to a small table on startup. Since this will only change on startup, sounds like an excellent idea. Or I may upgrade to above 5.0.41... Regards, Ben Baron Schwartz wrote: Hi, Ben Clewett wrote: Dear MySQL,

Re: MySql Host through Heartbeat

2007-06-12 Thread Gerald L. Clark
Ben Clewett wrote: Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around from server to server when a failure occures. I am trying to find a way f

Re: MySql Host through Heartbeat

2007-06-12 Thread Baron Schwartz
Hi, Ben Clewett wrote: Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around from server to server when a failure occures. I am trying to find a

Re: syntax to revoke

2007-06-12 Thread Stephen Liu
--- Baron Schwartz <[EMAIL PROTECTED]> wrote: > Stephen Liu wrote: > >> If you want to > >> get rid of the user entirely, use DROP USER. > > > > Could you please explain in more detail??? Where shall I add "DROP > > USER" > > The manual always explains the full syntax (http://dev.mysql.com/),

MySql Host through Heartbeat

2007-06-12 Thread Ben Clewett
Dear MySQL, I'm running 5.0.26 through Heartbeat. Which seems to work well, even as a replication slave and Heartbeat continously stopping and starting the server. The Heartbeat moves MySQL around from server to server when a failure occures. I am trying to find a way for MySQL to report t

Re: syntax to revoke

2007-06-12 Thread Baron Schwartz
Stephen Liu wrote: If you want to get rid of the user entirely, use DROP USER. Could you please explain in more detail??? Where shall I add "DROP USER" The manual always explains the full syntax (http://dev.mysql.com/), but in brief, DROP USER 'vmailuser'@'localhost'; will remove the use

Re: syntax to revoke

2007-06-12 Thread Stephen Liu
--- Baron Schwartz <[EMAIL PROTECTED]> wrote: > OK, the privileges are gone. USAGE is a synonym for "no privileges." Noted with tks. > If you want to > get rid of the user entirely, use DROP USER. Could you please explain in more detail??? Where shall I add "DROP USER" > > To safe guard,

Subject: determining if tables are being used

2007-06-12 Thread Sean Kelly
Keith, The definitive way is to turn on the query log and watch it for a few days or weeks. In your my.cnf under [mysqld] add the line: log=mysql-query Then restart your server. In your server's data directory (e.g. /usr/local/mysql/data/), there will now be a log file called mysql-query.log.

date function question

2007-06-12 Thread Andrey Dmitriev
Can someone advise the best way to determine a) the # of days since the first of the month from last month (e.g. from 5/1/07) b) the # of days since the end of last month (e.g. from 5/31/07) Is there are a good way to determine the # of workdays in a month. Thanks, Andrey -- MySQL General Mai

Re: syntax to revoke

2007-06-12 Thread Baron Schwartz
Stephen Liu wrote: mysql> SHOW GRANTS FOR 'vmailuser'@'localhost'; +--+ | Grants for [EMAIL PROTECTED]

Re: syntax to revoke

2007-06-12 Thread Stephen Liu
Hi Baron, > > I suppose it has been done ??? > > Yes, but you can check with SHOW GRANTS FOR 'vmailuser'@'localhost' > to be sure. mysql> SHOW GRANTS FOR 'vmailuser'@'localhost'; +

Re: syntax to revoke

2007-06-12 Thread Baron Schwartz
Hi, Stephen Liu wrote: Hi Baron, Tks for your advice. To undo this GRANT, run REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM 'vmailuser'@'localhost'; mysql> REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM 'vmailuser'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql>

Re: syntax to revoke

2007-06-12 Thread Stephen Liu
Hi Baron, Tks for your advice. > To undo this GRANT, run > > REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM > 'vmailuser'@'localhost'; mysql> REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM 'vmailuser'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> I suppose it has bee

Re: syntax to revoke

2007-06-12 Thread Baron Schwartz
Hi Stephen, Stephen Liu wrote: Hi folks, OpenBSD 4.0 x86_64 Mysql Postfix_2.4.3 After running following command; mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'vmailuser'@'localhost' IDENTIFIED BY 'password123'; Query OK, 0 rows affected (0.00 sec) I found I made a mistake to r

Re: maximum number of records in a table

2007-06-12 Thread kalin mintchev
> You should be fine. 100 000 000 is not that much. > Just make sure you set the right keys (and then query by them) on the > table > and even more importantly, set caches and buffers to utilize your RAM > appropriately. thanks. > Olaf > > > On 6/12/07 11:09 AM, "kalin mintchev" <[EMAIL PRO

syntax to revoke

2007-06-12 Thread Stephen Liu
Hi folks, OpenBSD 4.0 x86_64 Mysql Postfix_2.4.3 After running following command; mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'vmailuser'@'localhost' IDENTIFIED BY 'password123'; Query OK, 0 rows affected (0.00 sec) I found I made a mistake to run it. I need to revoke the GRANT

Re: maximum number of records in a table

2007-06-12 Thread J.R. Bullington
If you are talking about a Dual Core computer with 4 GBs of RAM and at least 6GB of swap space, you should have no problems running it on one computer. MySQL is really robust and can handle quite a load, esp. on Linux. If you are running Windows, just remember to remove all the

Re: maximum number of records in a table

2007-06-12 Thread Olaf Stein
You should be fine. 100 000 000 is not that much. Just make sure you set the right keys (and then query by them) on the table and even more importantly, set caches and buffers to utilize your RAM appropriately. Olaf On 6/12/07 11:09 AM, "kalin mintchev" <[EMAIL PROTECTED]> wrote: >> I guess a l

problems with accents and display alignement

2007-06-12 Thread Gilles MISSONNIER
hello, first, some settings : MySQL 5.0.32, under Linux debian etch the problem is the bad alignment : mysql> select nom,id from t2; +--++ | nom | id | +--++ | aàb | 1 | | été| 2 | | cçoôeêeèeëi | 3 | | c'est tout

Re: maximum number of records in a table

2007-06-12 Thread Jon Ribbens
On Tue, Jun 12, 2007 at 11:09:41AM -0400, kalin mintchev wrote: > > I guess a lot of that depends what an acceptable query execution time for > > you is. > > well... i don't really know. 30 secs maximum?! i've never worked with > such huge tables. 3 - 5 million records is fine but i've never work

"flush logs" vs. mysqladmin

2007-06-12 Thread Ofer Inbar
We run a mysqladmin flush-logs from cron every night. This causes our server to start a new binary log. However, the slow query log does not get flushed - our server continues updating the same slow query log file. If I run mysql and then issue a "flush logs" command, it flushes the binary logs

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Baron Schwartz
Ian P. Christian wrote: Ofer Inbar wrote: Assuming your slave is not usable by client programs now anyway and you don't mind it being unusable for a while longer, you can restart the slaving from scratch: This is exactly what I'm trying to avoid doing, it means 2 days downtime whilst the data

Re: maximum number of records in a table

2007-06-12 Thread kalin mintchev
thanks j.r... > > Olaf is right. > > It is really more about query execution time, and more importantly, QUERY > OPTIMIZATION. > > Depending on how you setup your keys, your table type, and what else your > server does, you should be able to run multiple queries on this table > with

Re: maximum number of records in a table

2007-06-12 Thread kalin mintchev
thanks j.r... > > Olaf is right. > > It is really more about query execution time, and more importantly, QUERY > OPTIMIZATION. > > Depending on how you setup your keys, your table type, and what else your > server does, you should be able to run multiple queries on this table > with

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Gordan Bobic
On Tue, 12 Jun 2007, Ian P. Christian wrote: > Ian P. Christian wrote: > > I upgraded my slave server a few weeks ago, and the slave failed, with > > an error similar to the one shown below. > > > I have figured out what happened here now - and I'm part of the way > though fixing it. > > It

Re: maximum number of records in a table

2007-06-12 Thread kalin mintchev
> I guess a lot of that depends what an acceptable query execution time for > you is. well... i don't really know. 30 secs maximum?! i've never worked with such huge tables. 3 - 5 million records is fine but i've never worked on a db with a table with 100 000 000 records. > Also, what else does

Re: Translation of sql into mysql

2007-06-12 Thread Gordan Bobic
On Wed, 13 Jun 2007, David Scott wrote: > > I am trying to update the column CreditCode in a table extract using data > from another table CreditCodes, which has columns CreditCode and > Consumer_No. > > I have been given the following sql which works on another database (not > sure which and

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Ian P. Christian
Ofer Inbar wrote: > Assuming your slave is not usable by client programs now anyway and > you don't mind it being unusable for a while longer, you can restart > the slaving from scratch: This is exactly what I'm trying to avoid doing, it means 2 days downtime whilst the data is re-inserted. I hav

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Ofer Inbar
"Ian P. Christian" <[EMAIL PROTECTED]> wrote: > In theory, I should be able to find out where the slave was up to in the > old logs, extract them manually and replay them on the slave, and then > reset the slave to use the new logs - however i'm not sure how reliable > that's going to be - or even

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Gordan Bobic
Just to clarify - are you asking for suggestions regarding avoiding re-seeding the slave or regarding what is likely to have gone wrong? Generally, a newer slave can cope with an older master, but not the other way around. If you updated the master while slave was out of date, you may be out of

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Ian P. Christian
Ian P. Christian wrote: > I upgraded my slave server a few weeks ago, and the slave failed, with > an error similar to the one shown below. I have figured out what happened here now - and I'm part of the way though fixing it. It turned out the defaults had changed somewhere, and rather then

Re: zabbix mysql problem

2007-06-12 Thread Gerald L. Clark
sizo nsibande wrote: I am trying to install zabbix, and at the third step I get this error: [EMAIL PROTECTED] etc]# mysql -u zabbix -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 5.0.27

zabbix mysql problem

2007-06-12 Thread sizo nsibande
I am trying to install zabbix, and at the third step I get this error: [EMAIL PROTECTED] etc]# mysql -u zabbix -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 5.0.27 Type 'help;' or '\h' f

Re: Translation of sql into mysql

2007-06-12 Thread Baron Schwartz
Hi David. David Scott wrote: I am trying to update the column CreditCode in a table extract using data from another table CreditCodes, which has columns CreditCode and Consumer_No. I have been given the following sql which works on another database (not sure which and it is late at night s

Translation of sql into mysql

2007-06-12 Thread David Scott
I am trying to update the column CreditCode in a table extract using data from another table CreditCodes, which has columns CreditCode and Consumer_No. I have been given the following sql which works on another database (not sure which and it is late at night so I can't ring up and ask) up

MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Ian P. Christian
I upgraded my slave server a few weeks ago, and the slave failed, with an error similar to the one shown below. I rolled back my upgrade, and it started working again, so I forgot about it. Today, I upgraded the master (again, from 5.0.32 to 5.0.42) - and hte slave failed again. I thought upgrad

Re: maximum number of records in a table

2007-06-12 Thread J.R. Bullington
Olaf is right. It is really more about query execution time, and more importantly, QUERY OPTIMIZATION. Depending on how you setup your keys, your table type, and what else your server does, you should be able to run multiple queries on this table without too much of an issue.

Table crashing

2007-06-12 Thread Sharique uddin Ahmed Farooqui
Tables frequently crashing on my site. Here is the message I'm seeing * Warning*: Table './mydb/sessions' is marked as crashed and should be repaired query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid= s.uid WHERE s.sid = '854c6474111de174abbddf77f74b9d99' in * /www/ims/includes/da

Re: how to get Number of rows matched?

2007-06-12 Thread J.R. Bullington
Ace, I am sorry to get into this so late, but you didn't mention what version you are running. If you are running 5.0.1 or greater, you can use the MySQL function ROW_COUNT(). You will find that it will help you in returning the results that you need. Here's the page in the ma

Re: maximum number of records in a table

2007-06-12 Thread Olaf Stein
I guess a lot of that depends what an acceptable query execution time for you is. Also, what else does the machine do, are there other databases or tables that are queried at the same time, do you have to join other tables in for your queries, etc? Olaf On 6/12/07 3:24 AM, "kalin mintchev" <[EMA

Re: maximum number of records in a table

2007-06-12 Thread kalin mintchev
hi david.. thanks... i've done this many times and yes either trough php, perl, python or on the mysql cl client. but my question here is not about doing it and insert times it's more about hosting it and query times. i currently have a working table for the same purpose with about 1.5 million r