Re: Best practice to disable log bin for mysql_upgrade

2009-09-02 Thread Russell E Glaue
Does anyone have any information regarding my question?

Is the 'share/mysql_fix_privilege_tables.sql' script distributed with MySQL the
same as the script (represented as '[fix_priv_tables]') generated interally by
the mysql_upgrade command that contains SQL statements to upgrade the tables in
the mysql database?

If it isn't the same, is there a way to generate this [fix_priv_tables] script
outside of an actual upgrade, so that I could apply it myself?

-RG


Russell E Glaue wrote:
 According to this page in the MySQL 5.0 Manual:
 http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html
 -
 mysql_upgrade executes the following commands to check and repair tables and 
 to
 upgrade the system tables:
 
 mysqlcheck --all-databases --check-upgrade --auto-repair
 mysql  [fix_priv_tables]
 
 ...
 [fix_priv_tables] represents a script generated interally by mysql_upgrade 
 that
 contains SQL statements to upgrade the tables in the mysql database.
 -
 
 Is there a way to generate this [fix_priv_tables] script outside of an actual
 upgrade, so that I could apply it myself?
 
 Is this [fix_priv_tables] script the same as the
 share/mysql_fix_privilege_tables.sql script distributed with MySQL?
 
 -RG
 
 
 
 Russell E Glaue wrote:
 I am upgrading minor MySQL versions, 5.0.67 to 5.0.84
 I have a master-master replication setup, and want to upgrade both 
 installations.
 The ideal procedure for upgrading mysql using the mysql_upgrade command is to
 have binary logging turned off during the execution of mysql_upgrade.

 My situation is I do not want to turn off binary logging for the entire 
 server,
 I would like to turn off binary logging just for the session of the
 mysql_upgrade connection.

 mysql_upgrade does not support anything like --disable-log-bin (which seems 
 is a
 feature that should be supported for this cli app) (1)
 So it seems my only option is to turn off binary logging for the entire 
 server
 while I execute mysql_upgrade. Which also means blocking write access to the
 server while it runs so that statements I do want logged for replication do 
 not
 occur while binary logging is off.

 Is there another simple way to achieve this? Or what is best practice that
 achieves the least amount of down time?



 Alternately, there are sql files in the share directory of each archive:

 mysql-5.0.67-linux-i686-glibc23/share/
 |-- fill_help_tables.sql
 |-- mysql_fix_privilege_tables.sql
 |-- mysql_system_tables.sql
 |-- mysql_system_tables_data.sql
 |-- mysql_system_tables_fix.sql
 `-- mysql_test_data_timezone.sql
 mysql-5.0.84-linux-i686-glibc23/share/
 |-- fill_help_tables.sql
 |-- mysql_fix_privilege_tables.sql
 |-- mysql_system_tables.sql
 |-- mysql_system_tables_data.sql
 |-- mysql_system_tables_fix.sql
 `-- mysql_test_data_timezone.sql

 Is it true (yes or no) that the difference between these 6 sql files from one
 distribution to the next is what would be changed if the mysql_upgrade was
 executed to upgrade an installation from 5.0.67 to 5.0.84 ?



 According to this: http://forge.mysql.com/worklog/task.php?id=4991

 There are two scripts: share/mysql_system_tables.sql and
 share/mysql_system_tables_fix.sql
 These two scripts comprise the content of: 
 share/mysql_fix_privilege_tables.sql

 The following is true about these three files:
 cat share/mysql_system_tables.sql share/mysql_system_tables_fix.sql 
 share/mysql_fix_privilege_tables.sql

 To upgrade the schema of the mysql server, only the
 share/mysql_fix_privilege_tables.sql sql script need be applied.

 Is this correct?
 Is it true for MySQL 5.0.x ?



 References:
 (1) http://bugs.mysql.com/bug.php?id=46638thanks=4 mysql_upgrade needs
 --disable-log-bin option
 (2) http://forums.mysql.com/read.php?20,275140,275140#msg-275140 MySQL 
 Forums
 :: General :: Best practice to disable log bin for mysql_upgrade
 (3) http://forums.mysql.com/read.php?11,274796,274796#msg-274796 MySQL 
 Forums
 :: Install :: How to best disable log bin for mysql_upgrade


 -RG

 

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



Re: Best practice to disable log bin for mysql_upgrade

2009-08-26 Thread Russell E Glaue
According to this page in the MySQL 5.0 Manual:
http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html
-
mysql_upgrade executes the following commands to check and repair tables and to
upgrade the system tables:

mysqlcheck --all-databases --check-upgrade --auto-repair
mysql  [fix_priv_tables]

...
[fix_priv_tables] represents a script generated interally by mysql_upgrade that
contains SQL statements to upgrade the tables in the mysql database.
-

Is there a way to generate this [fix_priv_tables] script outside of an actual
upgrade, so that I could apply it myself?

Is this [fix_priv_tables] script the same as the
share/mysql_fix_privilege_tables.sql script distributed with MySQL?

-RG



Russell E Glaue wrote:
 I am upgrading minor MySQL versions, 5.0.67 to 5.0.84
 I have a master-master replication setup, and want to upgrade both 
 installations.
 The ideal procedure for upgrading mysql using the mysql_upgrade command is to
 have binary logging turned off during the execution of mysql_upgrade.
 
 My situation is I do not want to turn off binary logging for the entire 
 server,
 I would like to turn off binary logging just for the session of the
 mysql_upgrade connection.
 
 mysql_upgrade does not support anything like --disable-log-bin (which seems 
 is a
 feature that should be supported for this cli app) (1)
 So it seems my only option is to turn off binary logging for the entire server
 while I execute mysql_upgrade. Which also means blocking write access to the
 server while it runs so that statements I do want logged for replication do 
 not
 occur while binary logging is off.
 
 Is there another simple way to achieve this? Or what is best practice that
 achieves the least amount of down time?
 
 
 
 Alternately, there are sql files in the share directory of each archive:
 
 mysql-5.0.67-linux-i686-glibc23/share/
 |-- fill_help_tables.sql
 |-- mysql_fix_privilege_tables.sql
 |-- mysql_system_tables.sql
 |-- mysql_system_tables_data.sql
 |-- mysql_system_tables_fix.sql
 `-- mysql_test_data_timezone.sql
 mysql-5.0.84-linux-i686-glibc23/share/
 |-- fill_help_tables.sql
 |-- mysql_fix_privilege_tables.sql
 |-- mysql_system_tables.sql
 |-- mysql_system_tables_data.sql
 |-- mysql_system_tables_fix.sql
 `-- mysql_test_data_timezone.sql
 
 Is it true (yes or no) that the difference between these 6 sql files from one
 distribution to the next is what would be changed if the mysql_upgrade was
 executed to upgrade an installation from 5.0.67 to 5.0.84 ?
 
 
 
 According to this: http://forge.mysql.com/worklog/task.php?id=4991
 
 There are two scripts: share/mysql_system_tables.sql and
 share/mysql_system_tables_fix.sql
 These two scripts comprise the content of: 
 share/mysql_fix_privilege_tables.sql
 
 The following is true about these three files:
 cat share/mysql_system_tables.sql share/mysql_system_tables_fix.sql 
 share/mysql_fix_privilege_tables.sql
 
 To upgrade the schema of the mysql server, only the
 share/mysql_fix_privilege_tables.sql sql script need be applied.
 
 Is this correct?
 Is it true for MySQL 5.0.x ?
 
 
 
 References:
 (1) http://bugs.mysql.com/bug.php?id=46638thanks=4 mysql_upgrade needs
 --disable-log-bin option
 (2) http://forums.mysql.com/read.php?20,275140,275140#msg-275140 MySQL Forums
 :: General :: Best practice to disable log bin for mysql_upgrade
 (3) http://forums.mysql.com/read.php?11,274796,274796#msg-274796 MySQL Forums
 :: Install :: How to best disable log bin for mysql_upgrade
 
 
 -RG
 

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



Best practice to disable log bin for mysql_upgrade

2009-08-21 Thread Russell E Glaue
I am upgrading minor MySQL versions, 5.0.67 to 5.0.84
I have a master-master replication setup, and want to upgrade both 
installations.
The ideal procedure for upgrading mysql using the mysql_upgrade command is to
have binary logging turned off during the execution of mysql_upgrade.

My situation is I do not want to turn off binary logging for the entire server,
I would like to turn off binary logging just for the session of the
mysql_upgrade connection.

mysql_upgrade does not support anything like --disable-log-bin (which seems is a
feature that should be supported for this cli app) (1)
So it seems my only option is to turn off binary logging for the entire server
while I execute mysql_upgrade. Which also means blocking write access to the
server while it runs so that statements I do want logged for replication do not
occur while binary logging is off.

Is there another simple way to achieve this? Or what is best practice that
achieves the least amount of down time?



Alternately, there are sql files in the share directory of each archive:

mysql-5.0.67-linux-i686-glibc23/share/
|-- fill_help_tables.sql
|-- mysql_fix_privilege_tables.sql
|-- mysql_system_tables.sql
|-- mysql_system_tables_data.sql
|-- mysql_system_tables_fix.sql
`-- mysql_test_data_timezone.sql
mysql-5.0.84-linux-i686-glibc23/share/
|-- fill_help_tables.sql
|-- mysql_fix_privilege_tables.sql
|-- mysql_system_tables.sql
|-- mysql_system_tables_data.sql
|-- mysql_system_tables_fix.sql
`-- mysql_test_data_timezone.sql

Is it true (yes or no) that the difference between these 6 sql files from one
distribution to the next is what would be changed if the mysql_upgrade was
executed to upgrade an installation from 5.0.67 to 5.0.84 ?



According to this: http://forge.mysql.com/worklog/task.php?id=4991

There are two scripts: share/mysql_system_tables.sql and
share/mysql_system_tables_fix.sql
These two scripts comprise the content of: share/mysql_fix_privilege_tables.sql

The following is true about these three files:
cat share/mysql_system_tables.sql share/mysql_system_tables_fix.sql 
share/mysql_fix_privilege_tables.sql

To upgrade the schema of the mysql server, only the
share/mysql_fix_privilege_tables.sql sql script need be applied.

Is this correct?
Is it true for MySQL 5.0.x ?



References:
(1) http://bugs.mysql.com/bug.php?id=46638thanks=4 mysql_upgrade needs
--disable-log-bin option
(2) http://forums.mysql.com/read.php?20,275140,275140#msg-275140 MySQL Forums
:: General :: Best practice to disable log bin for mysql_upgrade
(3) http://forums.mysql.com/read.php?11,274796,274796#msg-274796 MySQL Forums
:: Install :: How to best disable log bin for mysql_upgrade


-RG

-- 
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 auto repair db on hosting with quota

2007-12-10 Thread Russell E Glaue

Well if MySQL uses TMPDIR only for the temporary tables, but uses the current
data directory for repairing the tables where the .TMD files will become double
in size, then it does sound like you are stuck.

If I had to manage it, and wanted automatic recovery, or at least not have to
get involved with a client recovering their database, then I would set the
hard_limit to be twice or three times the soft_limit.
Users would be allowed to go over the soft_limit for only X days as you 
configure.
Using a TMPDIR would help offset the amount of disk space needed for repair,
allowing the temp tables to be created on another partition.

I cannot think of another possible solution for your scenario.

-RG



Artem Kuchin wrote:
 Russell E. Glaue wrote:
 Hmm..,
 I thought the temp tables were created in the temp directory.
 What version of MySQL are you using?
 
 5.1 latest
 
 Perhaps you can temporarily increase the user's hard_limit, and not
 increase the soft_limit. When they have finished recovering, you can
 reset the hard_limit.  
 
 I can repair all table manually and i have a script for doing it just by
 chown-ing
 the db directory to mysql:mysql , repair it, and the back to
 mysql:usergroup
 so group quota is observed.
 
 Or perhaps it is possible to copy the corrupted database to the temp
 directory (with increased hard_limit), perform the recovery there,
 then copy it back. The data directory does not have to remain in the
 same location in order to be recoverable.  
 
 That's not the point. I need to make MYSQL AUTOMATIC REPAIR
 work. Because currently, if mysql tries to automatically repair
 large broken table it gets stuck because user group quota is
 exceeded.
 
 -- 
 Artem
 
 
 This would be the same as the last e-mailed proposed solution, but
 with two extra steps to copy back and forth from the temp directory.
 -RG


 - Original Message -
 From: Artem Kuchin [EMAIL PROTECTED]
 To: Russell E Glaue [EMAIL PROTECTED], mysql@lists.mysql.com
 Sent: Sunday, December 9, 2007 9:03:45 AM (GMT-0600) America/Chicago
 Subject: Re: How to auto repair db on hosting with quota

 I won't convert thread style, so, i'm top-posting :)

 All this would be great if it worked. The main problem is that
 temporary directory option for mysqld iS NOT USED while doing
 table repair. All files while repairing tables are placed
 in the same directoty with the same owner and group as the original
 database files (i mean, for example, .TMD files which can be huge!).

 So, i am currenctly stuck with no solultion to the problem.

 -- 
 Artem



 Russell E Glaue wrote:
 Using Quota on Unix, you can specify a different quota soft_limit for
 temporary space.
 You can set MySQL to use /tmp as the temporary space, then set a
 soft_limit of 10mb and a hard_limit of 300MB.
 This quota should be separate from the normal user space quota.

 With MySQL temp dir set to /tmp, and a soft/hard quota as 10MB/300MB,
 the recovery should occur successfully.
 And going above the soft_limit gives the user X amount of days to get
 back down below the soft_limit. And the user cannot go above the
 hard_limit.
 You can set the soft_limit recovery days to like 1 day. They can go
 over the 10MB soft_limit for 1 day, up to the hard_limit of 300MB,
 but after one day the temp files will be deleted until the soft_limit
 is satisfied.

 This is a great way to control temp space, and not let users abuse
 it, but still give them a lot of space to perform things like large
 mysql database recoveries.


 -RG


 Artem Kuchin wrote:
 I am asking this question as a hosting PROVIDER, not
 as a hosting client.

 The sitation is like this (this is a simple example with small
 numbers):

 1) a client has 100mb quota for site and db files (set on unix
 group) 2) 80mb is already taken by 75MB database in ONE TABLE and
 5mb of files 3) databases gets broken
 4) mysql tried to auto repair the table
 5) to repair data it must create a temporary file and this files
 take almost as much as 75MB
 6) user goes over quota becauase mysql needs another 75MB to reapir
 table, and this summs up like 75+75+5 a lot  than 100mb in quota
 7) mysql gets stuck on this db
 8) people continue to acccess site and connections build up and each
 connection waits for repair to be finished
 9) eventually mysql runs out of connections and this stop other
 clients too.
 10) day is ruined.

 SO the questions are:

 1) Is the way to specify USER/GROUP and PLACE for temporary files
 for table repair?
 2) Maybe there is some OTHER way to set quota for databases?
 3) Is there way to specify max number of connections for a user?

 Current solution for this as i see it is to make a daemon which
 must connect to database first with administrative privs and
 monitor number of connections and repairs using processlist. If some
 user does more than allowed number of connection then just kill them
 off. If repair accures - then turn off that host for a while and
 turn if back on again
 when repair

Re: log-bin

2007-12-10 Thread Russell E Glaue
I have experienced this issue before. When I got the error, I just put
everything back in the data directory.

MySQL, somewhere in its code, expects the binlog index to be in the data
directory, even when we configure it to be elsewhere.

I think the regular binlogs can be stored elsewhere, but MySQL still expects the
index file to be in the data directory.

Try configuring the index file to be stored in the data directory, while
configuring the binlogs to be stored in the logs directory as you wanted.

log-bin = /var/log/mysql/mysql_bin.log
log-bin-index = /var/lib/mysql/mysql_bin.index

If it works, it would be great if you could file a bug for this.
Include steps to reproduce this issue.

-RG



bruce wrote:
 oh...
 
 btw,  also made sure the permissions are set on the /var/log/msql dir, and
 the underlying files, as well as that the owner/group are 'mysql'...
 
 thanks
 
 
 
 -Original Message-
 From: bruce [mailto:[EMAIL PROTECTED]
 Sent: Saturday, December 08, 2007 5:39 PM
 To: 'mysql list'
 Subject: RE: log-bin
 
 
 
 arrggg..
 
 hi martin.
 
 nope, i tried to add the line to my my.cnf file. in fact, i also copied the
 bin log files from the /var/lib/... to the /var/log/mysql dir
 
 i now have in the my.cnf file
 
 log-bin = /var/log/mysql/mysql_bin.log
 log-bin-index = /var/log/mysql/mysql_bin.index
 
 
 i have the following in the /var/log/mysql dir
 ---
 mysql-bin.01  mysql-bin.03  mysql-bin.05  mysql_bin.index
 mysql-bin.02  mysql-bin.04  mysql-bin.06
 ---
 i get the same err as before...
 
 
 again, if i simply only have the log-bin in the my.cnf, allowing mysql to
 write things to the default locations then everything starts as
 expected...
 
 thanks
 
 
 
 -Original Message-
 From: Martin Gainty [mailto:[EMAIL PROTECTED]
 Sent: Saturday, December 08, 2007 1:49 PM
 To: bruce
 Subject: Re: log-bin
 
 
 Bruce-
 
 when log-bin is enabled
 log-bin = /var/log/mysql/mysql_bin.log
 
 specify log-bin-index
 log-bin-index[=file_name]
 
 http://blog.robinz.info/archives/2006/04/13/fixedmysqld-file-mysql-binindex-
 not-found-errcode-13/
 M-
 - Original Message -
 From: bruce [EMAIL PROTECTED]
 To: 'mysql list' mysql@lists.mysql.com
 Sent: Saturday, December 08, 2007 3:44 PM
 Subject: log-bin
 
 
 hi...

 i'm trying to run mysql on a fedora core 5, system to allow the log bin
 files to be created.

 i have the following my.cnf file:

 ---
 [mysqld]
 datadir=/var/lib/mysql
 socket=/var/lib/mysql/mysql.sock
 max_connections=3
 #log-error = /var/log/mysql_err.log
 #set-variable = log=/var/log/mysql_query.log
 log-bin = /var/log/mysql/mysql_bin.log
 #set-variable = log-slow-queries=/var/log/mysql_slow.log
 # Default to using old password format for compatibility with mysql 3.x
 # clients (those using the mysqlclient10 compatibility package).
 old_passwords=1

 [mysql.server]
 user=mysql
 #basedir=/var/lib
 basedir=/usr


 [mysqld_safe]
 err-log=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid
 --

 when i run /etc/init.d/mysql start, it dies, and i get an error stating
 that
 the mysql_bin.index isn't found: (the mysqld.log file)

 071208 11:09:25  mysqld started
 /usr/libexec/mysqld: File '/var/log/mysql/mysql_bin.index' not found
 (Errcode: 13)
 071208 11:09:25 [ERROR] Aborting

 if i comment out the log-bin line in the my.cnf file, mysql starts/runs,
 but
 i don't get the log bin files.

 if i run mysqld-safe --log-bin, it apparently creates the log bin files...

 i can't find the error that i see above when i search the 'net...

 basically, i'm looking to be able to test using the log bin files for
 backup
 purposes.

 any thought/ideas...

 thanks

 -tom



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



Re: Blank users/passwords

2007-12-10 Thread Russell E Glaue
Garris, Nicole wrote:
 I'm a new MySQL DBA taking over admin duties for an existing MySQL
 nonclustered 4.1 installation. It has 6 small user databases. So in the
 mysql database, I run the query
 
 Select host, user, password from user;
 
 Which returns the following:
 
  
 
 +-+-+---
 +
 
 | host| user   | password
 |
 
 +-+-+---
 +
 
 | localhost | root| (long hex string)
 |
 
 | localhost network name | root  |
 |
 
 | localhost network name | |
 |
 
 | localhost |   | (long hex string)
 |
 
 | localhost | one_user| (long hex string)
 |
 
 | %| one_user   | (long hex string)
 |
 
 | %   | root | (long hex string)
 |
 
 | localhost| two_user  | (long hex string)
 |
 
 | IP address x  | one_user | (long hex string)
 |
 
 | IP address y  | one_user|
 |
 
 +-+-+---
 +
 
  
 
 Does this mean that:
 
 1. Line 2 above: root can log in with a blank password from (localhost
 network name)? 
yes
 
 2. Line 3 above: A blank user/password can be used to log in from
 (localhost network name)?
yes
 
 3. Line 4 above: A blank user can be used to log in from localhost, but
 a password has been specified?
I believe mysql requires a username when a password is supplied
But in logic that does not follow rules ;-) ... yes
 
 4. Line 10 above: User one-user can be used to log in from IP address
 y with a blank password?
yes
 
  
 
 Or am I reading this incorrectly?
 
 


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



Re: How to auto repair db on hosting with quota

2007-12-09 Thread Russell E. Glaue
Hmm..,
I thought the temp tables were created in the temp directory.
What version of MySQL are you using?

Perhaps you can temporarily increase the user's hard_limit, and not increase 
the soft_limit. When they have finished recovering, you can reset the 
hard_limit.

Or perhaps it is possible to copy the corrupted database to the temp directory 
(with increased hard_limit), perform the recovery there, then copy it back.
The data directory does not have to remain in the same location in order to be 
recoverable.

This would be the same as the last e-mailed proposed solution, but with two 
extra steps to copy back and forth from the temp directory.

-RG


- Original Message -
From: Artem Kuchin [EMAIL PROTECTED]
To: Russell E Glaue [EMAIL PROTECTED], mysql@lists.mysql.com
Sent: Sunday, December 9, 2007 9:03:45 AM (GMT-0600) America/Chicago
Subject: Re: How to auto repair db on hosting with quota

I won't convert thread style, so, i'm top-posting :)

All this would be great if it worked. The main problem is that
temporary directory option for mysqld iS NOT USED while doing
table repair. All files while repairing tables are placed
in the same directoty with the same owner and group as the original
database files (i mean, for example, .TMD files which can be huge!).

So, i am currenctly stuck with no solultion to the problem.

--
Artem



Russell E Glaue wrote:
 Using Quota on Unix, you can specify a different quota soft_limit for
 temporary space.
 You can set MySQL to use /tmp as the temporary space, then set a
 soft_limit of 10mb and a hard_limit of 300MB.
 This quota should be separate from the normal user space quota.
 
 With MySQL temp dir set to /tmp, and a soft/hard quota as 10MB/300MB,
 the recovery should occur successfully.
 And going above the soft_limit gives the user X amount of days to get
 back down below the soft_limit. And the user cannot go above the
 hard_limit. 
 You can set the soft_limit recovery days to like 1 day. They can go
 over the 10MB soft_limit for 1 day, up to the hard_limit of 300MB,
 but after one day the temp files will be deleted until the soft_limit
 is satisfied. 
 
 This is a great way to control temp space, and not let users abuse
 it, but still give them a lot of space to perform things like large
 mysql database recoveries. 
 
 
 -RG
 
 
 Artem Kuchin wrote:
 I am asking this question as a hosting PROVIDER, not
 as a hosting client.
 
 The sitation is like this (this is a simple example with small
 numbers):
 
 1) a client has 100mb quota for site and db files (set on unix group)
 2) 80mb is already taken by 75MB database in ONE TABLE and 5mb of
 files 3) databases gets broken
 4) mysql tried to auto repair the table
 5) to repair data it must create a temporary file and this files take
 almost as much as 75MB
 6) user goes over quota becauase mysql needs another 75MB to reapir
 table, and this summs up like 75+75+5 a lot  than 100mb in quota
 7) mysql gets stuck on this db
 8) people continue to acccess site and connections build up and each
 connection waits for repair to be finished
 9) eventually mysql runs out of connections and this stop other
 clients too.
 10) day is ruined.
 
 SO the questions are:
 
 1) Is the way to specify USER/GROUP and PLACE for temporary files
 for table repair?
 2) Maybe there is some OTHER way to set quota for databases?
 3) Is there way to specify max number of connections for a user?
 
 Current solution for this as i see it is to make a daemon which
 must connect to database first with administrative privs and
 monitor number of connections and repairs using processlist. If some
 user does more than allowed number of connection then just kill them
 off. If repair accures - then turn off that host for a while and
 turn if back on again
 when repair finished.
 
 I wonder how it is solved on mass hosting servers.
 
 --
 Regards,
 Artem


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



Re: How to auto repair db on hosting with quota

2007-12-07 Thread Russell E Glaue
Using Quota on Unix, you can specify a different quota soft_limit for temporary
space.
You can set MySQL to use /tmp as the temporary space, then set a soft_limit of
10mb and a hard_limit of 300MB.
This quota should be separate from the normal user space quota.

With MySQL temp dir set to /tmp, and a soft/hard quota as 10MB/300MB, the
recovery should occur successfully.
And going above the soft_limit gives the user X amount of days to get back down
below the soft_limit. And the user cannot go above the hard_limit.
You can set the soft_limit recovery days to like 1 day. They can go over the
10MB soft_limit for 1 day, up to the hard_limit of 300MB, but after one day the
temp files will be deleted until the soft_limit is satisfied.

This is a great way to control temp space, and not let users abuse it, but still
give them a lot of space to perform things like large mysql database recoveries.


-RG


Artem Kuchin wrote:
 I am asking this question as a hosting PROVIDER, not
 as a hosting client.
 
 The sitation is like this (this is a simple example with small
 numbers):
 
 1) a client has 100mb quota for site and db files (set on unix group)
 2) 80mb is already taken by 75MB database in ONE TABLE and 5mb of files
 3) databases gets broken
 4) mysql tried to auto repair the table
 5) to repair data it must create a temporary file and this files take
 almost as much as 75MB
 6) user goes over quota becauase mysql needs another 75MB to reapir table,
 and this summs up like 75+75+5 a lot  than 100mb in quota
 7) mysql gets stuck on this db
 8) people continue to acccess site and connections build up and each
 connection waits for repair to be finished
 9) eventually mysql runs out of connections and this stop other clients
 too.
 10) day is ruined.
 
 SO the questions are:
 
 1) Is the way to specify USER/GROUP and PLACE for temporary files
 for table repair?
 2) Maybe there is some OTHER way to set quota for databases?
 3) Is there way to specify max number of connections for a user?
 
 Current solution for this as i see it is to make a daemon which
 must connect to database first with administrative privs and
 monitor number of connections and repairs using processlist. If some user
 does more than allowed number of connection then just kill them off. If
 repair accures - then turn off that host for a while and turn if back on
 again
 when repair finished.
 
 I wonder how it is solved on mass hosting servers.
 
 -- 
 Regards,
 Artem
 


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



Re: How to auto repair db on hosting with quota

2007-12-07 Thread Russell E Glaue

Those of us who view our mail in threads also post in threads. ;-)

Here is some info for your concerns.

We assume the client is going to run their database under their client
unix-system username.
You specify the temp directory in the my.cnf file.
The documentation (when I last read it) says temp tables are created in the temp
directory.
If MySQL does not set the permissions you want on temp files, you can set the
shell umask so permissions can be read-only to the user.

umask = The user file-creation mask is set to mode.

any-unix$ man umask

-RG


Artem Kuchin wrote:
 
 I see topposting i popular in this mail list :)
 
 Well, thank you for the idea. It seems to be workable. I hope that 
 while data is being repaired and it is located
 in tmp the rights are set correctly so noone else can read the
 files. I'll see it myself. Thank you very much.
 
 Any idea on how to limit connection per user? (so one user
 cannot abuse the server and take all max_connections connections
 for himself).
 
 -- 
 Regards,
 Artem
 
 Russell E Glaue wrote:
 Using Quota on Unix, you can specify a different quota soft_limit for
 temporary space.
 You can set MySQL to use /tmp as the temporary space, then set a
 soft_limit of 10mb and a hard_limit of 300MB.
 This quota should be separate from the normal user space quota.

 With MySQL temp dir set to /tmp, and a soft/hard quota as 10MB/300MB,
 the recovery should occur successfully.
 And going above the soft_limit gives the user X amount of days to get
 back down below the soft_limit. And the user cannot go above the
 hard_limit. You can set the soft_limit recovery days to like 1 day.
 They can go
 over the 10MB soft_limit for 1 day, up to the hard_limit of 300MB,
 but after one day the temp files will be deleted until the soft_limit
 is satisfied.
 This is a great way to control temp space, and not let users abuse
 it, but still give them a lot of space to perform things like large
 mysql database recoveries. Artem Kuchin wrote:
 I am asking this question as a hosting PROVIDER, not
 as a hosting client.

 The sitation is like this (this is a simple example with small
 numbers):

 1) a client has 100mb quota for site and db files (set on unix group)
 2) 80mb is already taken by 75MB database in ONE TABLE and 5mb of
 files 3) databases gets broken
 4) mysql tried to auto repair the table
 5) to repair data it must create a temporary file and this files take
 almost as much as 75MB
 6) user goes over quota becauase mysql needs another 75MB to reapir
 table, and this summs up like 75+75+5 a lot  than 100mb in quota
 7) mysql gets stuck on this db
 8) people continue to acccess site and connections build up and each
 connection waits for repair to be finished
 9) eventually mysql runs out of connections and this stop other
 clients too.
 10) day is ruined.

 SO the questions are:

 1) Is the way to specify USER/GROUP and PLACE for temporary files
 for table repair?
 2) Maybe there is some OTHER way to set quota for databases?
 3) Is there way to specify max number of connections for a user?

 Current solution for this as i see it is to make a daemon which
 must connect to database first with administrative privs and
 monitor number of connections and repairs using processlist. If some
 user does more than allowed number of connection then just kill them
 off. If repair accures - then turn off that host for a while and
 turn if back on again
 when repair finished.

 I wonder how it is solved on mass hosting servers.

 -- 
 Regards,
 Artem
 


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



Re: SQL analysis tool - open source?

2007-12-06 Thread Russell E Glaue
Hmm... mysqlsla is not bad

However, I was hoping for something to help dive into the SQL queries and
present their relation together in a single view of how the database and tables
are being used.

mysqlsla shows the unique queries being used. And I'd like to see from the other
end how the database and tables are being used by all queries together.

For example, the report might show a visual representation of the database and
table schema, and I can see what columns are getting hit most in all queries. If
I see that a particular unindexed column is being hit a lot for searching, then
I might choose to index it... for example.


MySQL Proxy does not satisfy this need alone because I want to produce an
analytical report based on database and table usage. Out of the box, using MySQL
Proxy or turning on SQL logging serves the same function. I need to take the
results from either and produce a report that analyzes usage.

mysqlsla is a step in the right direction, but from my one day quick review of
it, it does not appear to go deep enough.

If I am not using mysqlsla to its full potential, I would appreciate a pointer
on best practices.


Thanks for the tool tips.

I'll still be looking, so any other pointer from anyone would be great.

-RG


Baron Schwartz wrote:
 You could also try http://hackmysql.com/mysqlsla
 
 On Dec 6, 2007 9:23 AM, B. Keith Murphy [EMAIL PROTECTED] wrote:
 MySQL Proxy is good.  It doesn't fit in some environments however.
 Another option would be the QPP (Query Processing Programs) that I and a
 co-worker have developed.  They can be downloaded at
 http://www.paragon-cs.com/queryprogs.

 thanks

 Keith

 Michael Dykman wrote:
 Have you considered:

http://forge.mysql.com/wiki/MySQL_Proxy



 On Dec 5, 2007 5:14 PM, Russell E Glaue [EMAIL PROTECTED] wrote:

 Does anyone know of an open source SQL analysis tool?

 I have query logging turned on in MySQL.
 And I would like to analyze all the logged SQL select queries to find out 
 how
 the database is being used, and then optimize MySQL databases or the SQL
 views/statements accordingly.

 Perhaps it would generate a report of most used columns for searching and
 retrieving, across all logged SQL queries.


 We have a software package used to generate reports from data in MySQL, 
 and the
 users are allowed to make ad hoc querying. So we do not (necessarily) have
 control over the SQL queries that are executed.
 And once in a great while, some unknowing user will execute a query 
 (unoptimized
 of course) that takes longer than satisfactory to execute.

 So I want to analyze all the queries users have issued, and try and 
 optimize the
 database tables accordingly, or adjust the views in the reporting software.


 Any tools (open source only) out there to help?


 -RG


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







 --
 B. Keith Murphy

 Paragon Consulting Services
 http://www.paragon-cs.com
 850-637-3877


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



library with api for MySQL binlog parsing

2007-12-06 Thread Russell E Glaue

Does anyone know of a programming library/module (C or PERL or ?) to interface
with the MySQL binary logs?

Preferably a PERL module which wraps some C library to gain a PERL OO api
interface to manipulating MySQL Binary Logs.

If this does not exist, can someone point me at the API documentation for the C
library used by the mysqlbinlog tool?
Is it:
 src/sql/log.cc
 src/sql/log_event.cc
 src/sql/log_event.h

I also see in src/client/mysqlbinlog.cc #included sql_common.h and
mysql_priv.h and client_priv.h

Has anyone wrapped these into a general mysqlbinlog library api?


I am interested in writing/finding a tool or library to read and parse the mysql
binary log file.

-RG

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



SQL analysis tool - open source?

2007-12-05 Thread Russell E Glaue

Does anyone know of an open source SQL analysis tool?

I have query logging turned on in MySQL.
And I would like to analyze all the logged SQL select queries to find out how
the database is being used, and then optimize MySQL databases or the SQL
views/statements accordingly.

Perhaps it would generate a report of most used columns for searching and
retrieving, across all logged SQL queries.


We have a software package used to generate reports from data in MySQL, and the
users are allowed to make ad hoc querying. So we do not (necessarily) have
control over the SQL queries that are executed.
And once in a great while, some unknowing user will execute a query (unoptimized
of course) that takes longer than satisfactory to execute.

So I want to analyze all the queries users have issued, and try and optimize the
database tables accordingly, or adjust the views in the reporting software.


Any tools (open source only) out there to help?


-RG


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



Re: Giant database vs unlimited databases

2007-11-20 Thread Russell E Glaue
No one probably wants to go through the trouble to code this solution but it
is possible to use MySQL Proxy to filter the SQL statements and results.

MySQL Proxy sits in between MySQL Server and the MySQL Client.
It can read queries, modify them, send queries to the server or deny them all
together, and even read results and modify them as well, or deny the results to
be sent back to the client.

Perhaps if you can resolve to a less complicated set up, but still lean towards
the VPD idea, MySQL Proxy might work for you.

I just wanted to throw this solution out in case it was useful.
-RG


Eric Frazier wrote:
 Mohammad wrk wrote:
 Hi Eric,

 In the case of  a yes answer to the second question below, can't we
 still use something like VPD (Virtual Private Database) in MySQL?

 Thanks,

 Mohammad

 
 Hi,
 
 I don't know much about Oracle, but I looked this up. MySQL can't do it,
 that I know of.  Here is the final example of such a setup that I found
 at http://www.oracle-base.com/articles/8i/VirtualPrivateDatabases.php
 
 CONNECT user1/[EMAIL PROTECTED];
 INSERT INTO schemaowner.user_data (column1, user_id)
  VALUES('User1', 1);
 INSERT INTO schemaowner.user_data (column1, user_id) 
 VALUES('User2',2);
 COMMIT;
 
 CONNECT user2/[EMAIL PROTECTED]
 INSERT INTO schemaowner.user_data (column1, user_id)
 VALUES ('User 1', 1);
 INSERT INTO schemaowner.user_data (column1, user_id)
 VALUES ('User 2', 2);
 COMMIT;
 
 CONNECT schemaowner/[EMAIL PROTECTED]
 SELECT * FROM schemaowner.user_data;
 CONNECT user1/[EMAIL PROTECTED];
 SELECT * FROM schemaowner.user_data;
 CONNECT user2/[EMAIL PROTECTED]
 SELECT * FROM schemaowner.user_data;
 
 Notice that:
 
 * When connected to USER1, only the first insert will work.
 * When connected to USER2, only the second insert will work.
 * The failing inserts produce the error:
 ORA-28115: policy with check option violation
 
 
 You can setup column level privileges on MySQL, but I wonder if it would
 be buggy considering I have never heard of anyone doing this before.
 Plus from what I understand the above example is a lot more than column
 privileges. user1 can only insert data if the insert statement's data
 sets user_id to 1, for example. Pretty cool, but scary in a way. I find
 this much logic in the DB to be scary(esp if not well documented), but
 then I use MySQL :)
 
 So as to which way you should go is most defiantly a matter of opinion I
 think. But, going back to my opinion(which is not at all informed as to
 all the details), if question 2 is a YES, then I would tend to go with
 separate DBs.
 
 Thanks for the Oracle lesson :)
 
 Thanks,
 
 Eric
 
 
 
 
 
 
 
 
 - Original Message 
 From: Eric Frazier [EMAIL PROTECTED]
 To: Mohammad wrk [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Sent: Monday, November 19, 2007 7:42:13 AM
 Subject: Re: Giant database vs unlimited databases

 Mohammad wrk wrote:
   Hi,
  
   I'm working on a web 2.0 project that targeting small to medium
 size companies for providing business services. Companies simply
 register to the site and then start their business by loading their
 data, sharing and discussing them with others.
  
   The design/architectural decision now we are facing from database
 perspective is how we should store companies' specific data? One way
 is to put all of them in a single database and partition them by
 company-id and the other one is to create, on the fly,  a new database
 per company . The justification for the latter is that MySQL is not
 powerful enough (compare to Oracle or DB2) to handle large amount of
 data and concurrent users.
  
   I'm new to MySQL and don't know that much about it and this is why
 I'd like to discuss this concern here.
  

 Funny, I thought you asked the question, should I separate my customers
 into their own databases, or use one big DB? Not MySQL sucks, Oracle is
 better. :)

 Issues I would ask about on this:

 1. Is there a chance that given their separation, these DBs will ever
 diverge in design because of differences between customers?
 2. Could they ever need to be separated for legal reasons? (like one bad
 query causing customer data be compromised)
 3. Is there any other reason you may do something vastly different from
 one customer to another?

 If you answer yes to any of these, then you might be best off separating
 dbs. But, if you never want to, or expect for any of these things to
 happen, you will just be creating headaches for yourself. Backup,
 replication, and the need for cross DB queries, will all be a pain in
 comparison to a single DB.

 I am sure there is more to consider, but these are the points that come
 to my mind right away.

 Thanks,

 Eric


 
 Instant message from any web browser! Try the new * Yahoo! Canada
 Messenger for the Web BETA*
 

Re: Giant database vs unlimited databases

2007-11-19 Thread Russell E Glaue
How much power do you want?

We migrated from Oracle to MySQL because to get enough power from Oracle 8/9i,
we had to buy an extremely powerful machine.
We had oracle on a sun solaris 9 box, and got X amount of power out of it.

On a similar machine we installed MySQL and we got XX amount of power out of it.
We choose MySQL because we can get more power out of it on a simple server than
we did with Oracle. And MySQL was more flexible.

Additionally, data management is easier for us on MySQL.

We house dozens of organizations on MySQL servers. Each org either shares a db
server, or they get their own db servers.

In fact we are now installing MySQL on xen/linux systems and are able to
reallocate memory and CPU to xen servers if they need more, rather than having
to upgrade hardware in machines.

When CPU amd memory start to top on a machine, we look at the queries and
optimize them. That usually fixes anything that slows down the server.

Our typical xen linux system is 8GB dual-ranked memory Intel 3GHz 1333FSB
Quad-core CPU 4MB-Cache. You want to get memory that matches the CPU FSB, or as
close to it as possible. We use the RHEL (Red Hat Enterprise Linux).

I think many people find other non-intel systems perform better for Oracle - But
that is because those systems are optimized at sale point. If the Intel system
hardware is configured well, it will perform just as good with MySQL.


And you can always migrate from MySQL to Oracle later if you really find that
you need to.
Tell your employer, if they want to pad the bottom line, they should use
inexpensive MySQL and spend some of the savings optimizing the Web Application.
Use Java grid technology, and load balance your read-only SQL queries (look at
Free Sequoia - https://forge.continuent.org/projects/sequoia )


-RG


Mohammad wrk wrote:
 Hi,
 
 I'm working on a web 2.0 project that targeting small to medium size 
 companies for providing business services. Companies simply register to the 
 site and then start their business by loading their data, sharing and 
 discussing them with others.
 
 The design/architectural decision now we are facing from database perspective 
 is how we should store companies' specific data? One way is to put all of 
 them in a single database and partition them by company-id and the other one 
 is to create, on the fly,  a new database per company . The justification for 
 the latter is that MySQL is not powerful enough (compare to Oracle or DB2) to 
 handle large amount of data and concurrent users.
 
 I'm new to MySQL and don't know that much about it and this is why I'd like 
 to discuss this concern here. 
 
 Thanks,
 
 Mohammad
  
 
 
 
   Ask a question on any topic and get answers from real people. Go to 
 Yahoo! Answers and share what you know at http://ca.answers.yahoo.com


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



Re: Corrupting MySQL on purpose for testing

2007-11-07 Thread Russell E Glaue

Try putting the data directory on a small partition and let it get filled 100%
with a single update that does not get fully committed due to disk full, then
turn the power off to the computer so there is no attempt for a nice shutdown.
You should also get a corruption in the master binary logs, if binary logging is
turned on.

If you use VMWare (vmware server is free) to virtualize a test OS with small
drives, it will be easier to do this.

-RG


Richard Edward Horner wrote:
 Hi,
 
 I'm working on a program that will run in the event that tables are
 crashed or corrupt. Can anyone recommend a good method for crashing my
 tables or corrupting them so I have some test cases? I'm mostly
 interested in MyISAM and InnoDB table types.
 
 I was thinking I would just start an infinite loop with an UPDATE
 statement in it and then kill -9 the mysqld process.
 
 Any better ideas?
 
 Thanks, Rich(ard)


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



Re: Regarding MySql Service

2007-11-07 Thread Russell E Glaue
Your mysql server is either not running, or is not creating the sock file at the
location /var/lib/mysql/mysql.sock that calendar.php expects.

What do you get when you do this?
linux$ ls -la /var/lib/mysql/mysql.sock

look in the my.cnf file to find where the MySQL sock is written to, and modify
your PHP application to use that sock file.
You can also dig through your MySQL error logs to make sure MySQL is not having
any problems creating the sock file nor performing a normal startup.

-RG


piyush joshi wrote:
 Dear all,
Right Now I am having different kind of problem in mysql
 server . mysqld service automatically goes off . when we open a website and
 enter something to search from mysql database it gives the following error -
 
 
 *Warning: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (2) in /home/httpd/html/php/mdp/calendar.php on
 line 97*
 
 *Warning: MySQL Connection Failed: Can't connect to local MySQL server
 through socket '/var/lib/mysql/mysql.sock' (2) in
 /home/httpd/html/php/mdp/calendar.php** on line 97*
 *Db Error*
 
 Kindly tell me where is the problem ..i will be grateful to you ..Thanks in
 advance ..
 
 
 
 


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



Re: Account Problems. Can't register server with new account

2007-11-06 Thread Russell E Glaue
Run this SQL Query

mysql select Host,User from user;

Make sure the output has this record values:
+---+--+
| Host  | User |
+---+--+
| localhost | usuario1 |
+---+--+

If your mysql error message were to say this:
  Access denied for user 'usuario1'@'me-me-me.com'
The record values need to look like this:
+--+--+
| Host | User |
+--+--+
| me-me-me.com | usuario1 |
+--+--+

Or
  Access denied for user 'usuario1'@'192.168.20.5'
+--+--+
| Host | User |
+--+--+
| 192.168.20.5 | usuario1 |
+--+--+


To Update:
mysql update user set Host=localhost where User='usuario1' LIMIT 1;

-RG

AlejandraB wrote:
 Good evening.
 
 I have mysql cluster installed and I'm trying to start the mysql server with
 a new user account recently created, and  I'm having trouble accessing the
 server  with the new account.
 
 [EMAIL PROTECTED] bin]# ./mysql -u usuario1 -p
 Enter password:
 ERROR 1045 (28000): Access denied for user 'usuario1'@'localhost' (using
 password: YES)
 
 
 The  new user does exists and I know the problem is not password related.
 
 mysql use mysql
 Reading table information for completion of table and column names
 You can turn off this feature to get a quicker startup with -A
 
 Database changed
 mysql select User from user;
 +--+
 | User |
 +--+
 | mysql|
 | root |
 | usuario1 |
 |  |
 | mysql|
 | root |
 +--+
 
 
 
 Thanks in advance


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



Re: utf8 queries

2007-11-06 Thread Russell E Glaue

I assume your collation on the database table 'city' is utf8_general_ci
And also check the columns of the database table 'city' to ensure they are also
utf8_general_ci.

The database, its tables, and the tables individual columns can all have a
different collation.

Last, ensure that you set utf8 for your client connection as well.

http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html


-RG



Ovidiu Farauanu wrote:
 Hello.
 
 I have a problem with queries on a utf8 table. For example when I send
 select SQL_CALC_FOUND_ROWS * from city where country_code = 'pl' and
 language_code = 'en' and ( city_name like 'A%' or city_name like 'A%
 ) order by city_name
 to MySQL, it returns to me not only cities that begin with capital letter A
 but also with latin capital letter A with ring above, with diaeresis,
 with acute and etc.
 I don't want that. I will query it to do this.
 
 Please help. How so query to get only cities that begin with A and
 only those that begin with A
 ??
 


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



Re: Please help to solve a serios problem

2007-11-06 Thread Russell E Glaue

The mysql.sock location '/var/lib/mysql/mysql.sock' attempted to be used by your
connecting client may be wrong.

linux$ ls -la /var/lib/mysql/mysql.sock

Does the file exist?

You say this is the sock file created by mysqld:

 srwxrwxrwx  mysql mysql system_u:object_r:mysqld_var_run_t mysql.sock

So your client would need to connect like so:

linux$ mysql --socket=system_u:object_r:mysqld_var_run_t mysql.sock 
--user=user -p

What OS are you running MySQL on?

-RG


Ali Nebi wrote:
 On Tue, 2007-11-06 at 09:32 -0600, [EMAIL PROTECTED] wrote:
 i believe you need to have root create the file /var/lib/mysql/mysql.sock
 and then make it readable and writable by the user that owns mysql.

 You can make that same file owner by the user that runs mysql.




 -Original Message-
 From: Ali Nebi [EMAIL PROTECTED]
 Sent: Nov 6, 2007 9:24 AM
 To: mysql@lists.mysql.com
 Subject: Please help to solve a serios problem

 Hi, i need of help for a serios problem.

 We have installed mysql 5 and we are using InnoDB engine. OS is CentOS
 5, x86. 

 Our problem is this. 
 We get this message in the log:


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

 The problem is that mysql make recovering the database, we are
 restarting whole server and it crash again. It continue to crash. We
 tried to recover manually database, but it continue to crash. What we
 can do to solve this problem?

 We need to solve this problem urgently. 

 Thanks in advanced!

 Regards, Ali Nebi!


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

 
 This socket file is created automatically when i run mysql by this
 way: /etc/init.d/mysql start.
 The file has these permissions set. I think this is ok, problem is
 something different i think, but i don't know where.
 
 srwxrwxrwx  mysql mysql system_u:object_r:mysqld_var_run_t mysql.sock
 
 
 
 


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



Re: Errors management

2007-11-05 Thread Russell E Glaue
Does the client loose the MySQL connection completely? Or is there just an error
in receiving the responding packet back?

Here is an idea:

You can do a ping to test the connection.

Fist ping the connection to verify you can send and receive on that connection.
Then send the SQL Command.

If you cannot ping the connection the first time, destroy the connection and
report Connection lost to MySQL Server due to Network Errors.

If you get an errored network packet, then ping your connection a 2nd time to
test it to verify you still have the connection. Then report back to the client
Network Error in receiving response from MySQL Server, your query may have been
successful, or maybe not.

If you get an errored network packet, and you cannot ping your connection a 2nd
time, then report back to the client, Network connection lost, your query may
have been successful, or maybe not.


Does this happen more than 50% of the time?
If it does happen more than 50% of the time, you will want to add in more code
to test the connection every time, and verify the results of an SQL Command with
additional queries without relying only on the result MySQL sends back. This
will cost more on the client side.
If the client application is distributed to many users, you may want to set up a
flag to active this additional code, like Turn on Paranoid MySQL Connections
with Follow Up Testing Methods

-RG


NextWare - Mirko wrote:
 Hi All,
 
 I have this question...
 I send a INSERT from client to server, the server write the row and send
 the result ok
 to the client. Due to a network failure the client doesn't receive the
 result and an error is reported to the user.
 How can I manage this error?
 


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



short e-mail survey on load-balance technology used

2007-11-01 Thread Russell E Glaue

Permit me to query the users on this list to ask a few questions on if and how
they scale their MySQL with the use of load-balancers.


I am only expecting very short answers, but you may choose to answer how ever
you like.

My goal is to try and understand what state the MySQL community is in with the
use of load-balancing technology, and what is the next step we think technology
should go.

If you are willing to reply to these questions, I thank you.
-RG


1) Do you use a load-balancer for your MySQL Deployment?



## If yes, please answer the remaining questions.

2) What load-balancer (product name) do you use for your MySQL Deployment?



3) Do you use the default mechanisms of the load-balancer to negotiate traffic
to your MySQL deployment, or have you created your own custom mechanism for the
load-balancer to use?




4) (a) Other than your current load-balancer, have you tried to use any other
load-balancers with success or failure?
(b) Or is there another load-balancer you are looking into possibly using?
(Some Examples: MySQL Proxy, Continuent, Sequoia (C-JDBC), Linux Virtual Server,
F5 Networks BigIP, EddieDNS, or even Heartbeat, Pen, Python Director, 
Distributor)



5) How do you primarily use the load balancer?
  1) load-balance read-only SQL queries
  2) load-balance read-write SQL queries
  3) other? (like some custom setup)



6) When it comes to scaling MySQL and the use of load-balancing, what do you
feel is a technology that is missing that the MySQL community should create?
(I.e. perhaps some new technical item in the MySQL database server software, or
something on the load-balancing technology side)





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



Re: short e-mail survey on load-balance technology used

2007-11-01 Thread Russell E Glaue
Philip Hallstrom wrote:
...
 6) When it comes to scaling MySQL and the use of load-balancing, what
 do you
 feel is a technology that is missing that the MySQL community should
 create?
 (I.e. perhaps some new technical item in the MySQL database server
 software, or
 something on the load-balancing technology side)
 
 Something similar to pgpool that can automatically redirect writes to
 the master and reads to a pool of slaves.
 
 http://pgpool.projects.postgresql.org/
 
 If that already exists and you know about it, link please! :)


pgpool is a connection pool server for PostgreSQL. pgpool runs between
PostgreSQL's clients(front ends) and servers(back ends).

Well there are a few solutions out there.

The first comparable product for MySQL is MySQL Proxy.
  http://forge.mysql.com/wiki/MySQL_Proxy


There is the C-JDBC solution, now known as Sequoia.
It was a project of ObjectWeb, now known as OW2
Now it is a part of the Continuent technology line as an Apache 2 licensed Open
Source solution.
https://forge.continuent.org/projects/sequoia


You can read about some other options in an article I wrote on the MySQL
Developer Zone.
MySQL Failover Strategy using State Management, introducing MPP - Part 1
http://dev.mysql.com/tech-resources/articles/failover-strategy-part1.html


Thanks for your feedback.
If you happen to remember the name of the hardware load balancer you used, I
would sure be interested to know the name.

-RG

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



Re: short e-mail survey on load-balance technology used

2007-11-01 Thread Russell E Glaue
Philip Hallstrom wrote:
...
 6) When it comes to scaling MySQL and the use of load-balancing, what
 do you
 feel is a technology that is missing that the MySQL community should
 create?
 (I.e. perhaps some new technical item in the MySQL database server
 software, or
 something on the load-balancing technology side)
 
 Something similar to pgpool that can automatically redirect writes to
 the master and reads to a pool of slaves.
 
 http://pgpool.projects.postgresql.org/
 
 If that already exists and you know about it, link please! :)


pgpool is a connection pool server for PostgreSQL. pgpool runs between
PostgreSQL's clients(front ends) and servers(back ends).

Well there are a few solutions out there.

The first comparable product for MySQL is MySQL Proxy.
  http://forge.mysql.com/wiki/MySQL_Proxy


There is the C-JDBC solution, now known as Sequoia.
It was a project of ObjectWeb, now known as OW2
Now it is a part of the Continuent technology line as an Apache 2 licensed Open
Source solution.
https://forge.continuent.org/projects/sequoia


You can read about some other options in an article I wrote on the MySQL
Developer Zone.
MySQL Failover Strategy using State Management, introducing MPP - Part 1
http://dev.mysql.com/tech-resources/articles/failover-strategy-part1.html


Thanks for your feedback.
If you happen to remember the name of the hardware load balancer you used, I
would sure be interested to know the name.

-RG

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



Re: short e-mail survey on load-balance technology used

2007-11-01 Thread Russell E Glaue
Philip Hallstrom wrote:
 pgpool is a connection pool server for PostgreSQL. pgpool runs between
 PostgreSQL's clients(front ends) and servers(back ends).

 Well there are a few solutions out there.

 The first comparable product for MySQL is MySQL Proxy.
  http://forge.mysql.com/wiki/MySQL_Proxy
 
 Almost, but the faq says it's not quite there (auto splitting
 reads/writes).
 
 http://forge.mysql.com/wiki/MySQL_Proxy_FAQ#In_load_balancing.2C_how_can_I_separate_reads_from_writes.3F
 
 
 Will be nice once it is though!
 
 -philip
 

You are correct, right out of the box it does not split read/writes.

Lua script can be written to intercept the query, and then change the connection
to a mysql host based on read/write.

I have not heard of a success story yet, but there is a Lua script written for
read/write splitting that is distributed with MySQL Proxy:

{MySQLProxy_install_dir}/share/mysql-proxy/rw-splitting.lua

There is a post on Aug 26 on Proxy's R/W Splitting:
  http://jan.kneschke.de/2007/8/26/mysql-proxy-more-r-w-splitting

There was a post a few days ago in the MySQL Proxy Forum about a problem
  http://forums.mysql.com/read.php?146,180080,180080

Also a related bug:
  http://bugs.mysql.com/bug.php?id=31574


-RG

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



MySQL Proxy Topics

2007-09-07 Thread Russell E Glaue

I'd like to speak/write with someone, off the list, on the MySQL Proxy project
who might be involved in the following topics I found on the MySQL Proxy 
Cookbook:

#  (TODO) Advanced - Use a Proxy between master and slaves to monitor
replication traffic

# (TODO) Guru - Use a Proxy between master and slaves to supervise master
fail-over.


Can anyone point me towards someone?
-RG


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



Re: recovering from 'disk full' mysql error

2007-09-05 Thread Russell E Glaue
Ya, I did that.
I read elsewhere that this was recommended for 4.1.9+.

I did
stop slave;
change master to master_log_file='{Relay_Master_Log_File}',
master_log_pos={Exec_master_log_pos};
start slave

And it gave the same error.
That is when I checked the binlogs and saw that it was corrupted at
{Exec_master_log_pos}

MySQL does not want to move past that corrupted position in the binlogs.
Any attempt to start at a position after the corrupted position does not work
either.

I had to flush the logs on master and use the next incremented binlog. But I had
to completely reinitialize the slave because from the corrupted position to the
next new binlog there was additional data updates for master mysql that did not
get replicated to the slave due to the corrupted binlog issue I am referring to
in this post.


If you have personally verified these steps you outlined work, please list what
MySQL versions these steps successfully worked on.
I am using 4.1.22 in this scenario.

-RG



Alex Arul Lurthu wrote:
 stop slave;
 
 change master to master_log_file='Relay_Master_Log_File' ,
 master_log_pos=Exec_master_log_pos;
 
 #Get the values for the above command from your show slave status output.
 
 start slave;
 
 The above process should fix your problem.
 
 
 On 9/4/07, *Russell E Glaue* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote:
 
 I had a disk full error on the master MySQL (4.1.22), which was
 replicating to a
 slave (4.1.22 ).
 
 My question is, how do I recover a slave replica when the master had
 a disk full
 error, space was freed, but the 'disk full' issue left a corrupted
 master binlog?
 1) Do I have to reinitialize the slave from scratch,
 2) or can I use some CLI tool to repair the damaged binlog (see below)
 3) or can I skip to the next binlog
 
 This is assuming I performed a stop and start of the master mysql,
 then 'purge
 binary logs' from master.
 And would the resolution be the same if I did not start and stop the
 master mysql?
 
 
 According to bug 9949 (http://bugs.mysql.com/bug.php?id=9949) this
 was addressed
 in 4.1.9.
 I am running 4.1.22, and have experienced this issue as outlined.
 
 I am not finding a good sum of reasoning and process to proceed with
 resolving
 this type of predicament. Can anyone clue me in to resolving this?
 
 
 I purged enough binlogs to free up disk space on master, and then
 started the
 slave replica process on the slave.
 
 I get this famous error:
 -
 070904 12:46:26 [Note] Slave I/O thread: connected to master
 '[EMAIL PROTECTED]:3306',  replication started in log
 'master1-bin.54' at
 position 138164107
 070904 12:46:26 [ERROR] Error reading packet from server: binlog
 truncated in
 the middle of event (server_errno=1236)
 070904 12:46:26 [ERROR] Got fatal error 1236: 'binlog truncated in
 the middle of
 event' from master when reading data from binary log
 -
 
 I do a binlog dump on 'master1-bin.54', and I get the below
 error ('Error in
 log format or read error') at the end of the output:
 
 -
 #070904 11:46:22 server id 2  end_log_pos 137541177 Query  
 thread_id=48871
 exec_time=0 error_code=0
 #070904 11:46:22 server id 2  end_log_pos 137655584 Query  
 thread_id=48871
 exec_time=0 error_code=0
 #070904 11:46:22 server id 2  end_log_pos 137655719 Query  
 thread_id=48773
 exec_time=0 error_code=0
 #070904 11:46:22 server id 2  end_log_pos 137770204 Query  
 thread_id=48773
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 137770339 Query  
 thread_id=48870
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 137962851 Query  
 thread_id=48870
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 137962986 Query  
 thread_id=48871
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 138152129 Query  
 thread_id=48871
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 138152264 Query  
 thread_id=48773
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 138163972 Query  
 thread_id=48773
 exec_time=0 error_code=0
 #070904 11:46:24 server id 2  end_log_pos 138164107 Query  
 thread_id=48870
 exec_time=0 error_code=0
 ERROR: Error in Log_event::read_log_event(): 'read error', data_len:
 81904,
 event_type: 2
 Could not read entry at offset 138164107:Error in log format or read
 error
 -
 
 
 -RG
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 http://lists.mysql.com/mysql
 To
 unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 -- 
 Thanks
 Alex
 http

recovering from 'disk full' mysql error

2007-09-04 Thread Russell E Glaue
I had a disk full error on the master MySQL (4.1.22), which was replicating to a
slave (4.1.22).

My question is, how do I recover a slave replica when the master had a disk full
error, space was freed, but the 'disk full' issue left a corrupted master 
binlog?
1) Do I have to reinitialize the slave from scratch,
2) or can I use some CLI tool to repair the damaged binlog (see below)
3) or can I skip to the next binlog

This is assuming I performed a stop and start of the master mysql, then 'purge
binary logs' from master.
And would the resolution be the same if I did not start and stop the master 
mysql?


According to bug 9949 (http://bugs.mysql.com/bug.php?id=9949) this was addressed
in 4.1.9.
I am running 4.1.22, and have experienced this issue as outlined.

I am not finding a good sum of reasoning and process to proceed with resolving
this type of predicament. Can anyone clue me in to resolving this?


I purged enough binlogs to free up disk space on master, and then started the
slave replica process on the slave.

I get this famous error:
-
070904 12:46:26 [Note] Slave I/O thread: connected to master
'[EMAIL PROTECTED]:3306',  replication started in log 'master1-bin.54' at
position 138164107
070904 12:46:26 [ERROR] Error reading packet from server: binlog truncated in
the middle of event (server_errno=1236)
070904 12:46:26 [ERROR] Got fatal error 1236: 'binlog truncated in the middle of
event' from master when reading data from binary log
-

I do a binlog dump on 'master1-bin.54', and I get the below error ('Error in
log format or read error') at the end of the output:

-
#070904 11:46:22 server id 2  end_log_pos 137541177 Query   thread_id=48871
exec_time=0 error_code=0
#070904 11:46:22 server id 2  end_log_pos 137655584 Query   thread_id=48871
exec_time=0 error_code=0
#070904 11:46:22 server id 2  end_log_pos 137655719 Query   thread_id=48773
exec_time=0 error_code=0
#070904 11:46:22 server id 2  end_log_pos 137770204 Query   thread_id=48773
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 137770339 Query   thread_id=48870
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 137962851 Query   thread_id=48870
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 137962986 Query   thread_id=48871
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 138152129 Query   thread_id=48871
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 138152264 Query   thread_id=48773
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 138163972 Query   thread_id=48773
exec_time=0 error_code=0
#070904 11:46:24 server id 2  end_log_pos 138164107 Query   thread_id=48870
exec_time=0 error_code=0
ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 81904,
event_type: 2
Could not read entry at offset 138164107:Error in log format or read error
-


-RG

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



Re: MySQL load balancing...

2004-12-16 Thread Russell E Glaue
We have fail-over using Linux Virtual Server, now upgrading to Red Hat 
Cluster Suite. We do not implement load-balancing.
Here is why.

In order to have full true load balancing, you need to have two or more 
MySQL database server replicating data to each other in real time. 
Currently your only choice is master-master replication.
master-master replication is not fast enough for real-time updates for a 
load-balanced environment. It is good enough for fail-over which is what 
we currently implement.

You can still have load-balancing in a distributed fashion. If you have 
two MySQL database servers for your cluster, and you designate half your 
databases for one server and half for the other, technically you are 
implementing load balancing as your distributing your data among two 
servers. Although this is not really the best practice. However in this 
setup, each server can be a fail-over for the other. So if one server 
fails the other takes over as master for it's databases.

fail-over recovery.
This is one issue worth considering. If your MySQL database server comes 
back online, LVS (Linux Virtual Server) wants to immediately throw it 
back in as master/primary. However, once the server is up, it needs time 
to get back up to date from the other master. So for recovery, you will 
need to perform this manually and not let LVS do this automatically. 
Bring the server back online, allow time for the replication to 
complete, then go to the LVS and set the server as active primary.

-RG
Kevin A. Burton wrote:
Was curious what people on the list are using for load balancing.. there 
are a number of techniques here but it would be interesting if people 
could share some real-world experiences

HTTP load balancing is pretty well understood but there's not a bunch 
out there on MySQL load balancing

Kevin

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


replication: bin logs not transferred, load data gives error

2004-11-10 Thread Russell E Glaue
I am setting up a master-master replication.
I have the masters set up correctly (I guess), and they update their 
position when changes occur. 'show slave status' and 'show master 
status' both show the correct positions between each server.

However. Although the slave position increments to match the position on 
the master on both servers, the data is NOT getting updated. The 
position continues to increment up and up, but nothing is changed.

When I had successful replication in the past, I remeber the bin-logs 
being transfered from the master to the slave for the updates. This is 
currently NOT happenning on both servers.

When I execute the 'LOAD DATA FROM MASTER' I ALWAYS get an error.
ERROR 1189: Net error reading from master
And I get the same error on both servers.
Now I know the replication configuration is correct, because when 
changes occur on one server, the 'Read_Master_Log_Pos' changes on the 
second server to match the first server. However, the data is NOT 
getting updated.

There is no firewall between the two machines.
And we are running MySQL 4.0.20
Is there a reason why the bin-logs are not being transferred?
I suspect this is the reason why the data is not getting updated.
And I suspect the error from 'LOAD DATA FROM MASTER' demonstrates the 
problem I am having.

What is wrong?
Any help?
-RG
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: replication: bin logs not transferred, load data gives error

2004-11-10 Thread Russell E Glaue
Just so it is known, repl_user, the replication account, has full access 
on the master database to do everything from any host '%'.

Here is my log output on server2:
041110  8:59:01  Slave SQL thread initialized, starting replication in 
log 'server1-bin.054' at position 3646268, relay log 
'./server2-relay-bin.002' position: 27198
041110  8:59:01  Slave I/O thread: connected to master 
'[EMAIL PROTECTED]:3307',  replication started in log 'server1-bin.054' 
at position 3646268
041110  9:01:46  Slave I/O thread killed while reading event
041110  9:01:46  Slave I/O thread exiting, read up to log 
'server1-bin.054', position 3647181
041110  9:01:46  Error reading relay log event: slave SQL thread was killed

The log output on server1 for the slave failure is the same
And on both servers, I believe this is the error in the logs when I 
issue 'LOAD DATA FROM MASTER'
	create_table_from_dump: failed in handler::net_read_dump()

Any help from any one?
-RG
Russell E Glaue wrote:
I am setting up a master-master replication.
I have the masters set up correctly (I guess), and they update their 
position when changes occur. 'show slave status' and 'show master 
status' both show the correct positions between each server.

However. Although the slave position increments to match the position on 
the master on both servers, the data is NOT getting updated. The 
position continues to increment up and up, but nothing is changed.

When I had successful replication in the past, I remeber the bin-logs 
being transfered from the master to the slave for the updates. This is 
currently NOT happenning on both servers.

When I execute the 'LOAD DATA FROM MASTER' I ALWAYS get an error.
ERROR 1189: Net error reading from master
And I get the same error on both servers.
Now I know the replication configuration is correct, because when 
changes occur on one server, the 'Read_Master_Log_Pos' changes on the 
second server to match the first server. However, the data is NOT 
getting updated.

There is no firewall between the two machines.
And we are running MySQL 4.0.20
Is there a reason why the bin-logs are not being transferred?
I suspect this is the reason why the data is not getting updated.
And I suspect the error from 'LOAD DATA FROM MASTER' demonstrates the 
problem I am having.

What is wrong?
Any help?
-RG


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


error importing from mysqldump output

2004-11-09 Thread Russell E Glaue
I did a mysqldump from serverA, took that output and did the following 
as illustrated below to import into serverB.
why did I get an error?

Did mysqldump output the wrong SQL syntax?  I would not think so, but I 
got this error which says so.

I am using mysql-4.0.20 on both servers.
I am importing with skip-grant-tables option, and no databases 
(including no mysql database).

daemon0% mysqldump -S mysqld-daemon0.sock --master-data --all-databases 
 daemin0-dump.sql

daemon1% mysql -S /tmp/mysqld-daemon1.sock  /tmp/daemon0-dump.sql
ERROR 1064 at line 14071: You have an error in your SQL syntax.  Check 
the manual that corresponds to your MySQL server version for the right 
syntax to use near 'order int(1) NOT NULL default '0',
  PRIMARY KEY  (moduleID),

CREATE TABLE modules (
  moduleID varchar(10) NOT NULL default '',
  moduleName varchar(50) NOT NULL default '',
  order int(1) NOT NULL default '0',
  PRIMARY KEY  (moduleID),
  UNIQUE KEY moduleID (moduleID)
) TYPE=MyISAM COMMENT='List of all Modules';

Would this possibly be a bug with mysqldump ?
-RG
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: error importing from mysqldump output

2004-11-09 Thread Russell E Glaue
Daniel Kasak wrote:
Russell E Glaue wrote:
snipped
ERROR 1064 at line 14071: You have an error in your SQL syntax.  Check 
the manual that corresponds to your MySQL server version for the right 
syntax to use near 'order int(1) NOT NULL default '0',
  PRIMARY KEY  (moduleID),

snipped
Would this possibly be a bug with mysqldump ?
-RG

'order' is a reserved word.
I would rename that field, pronto!
In my opinion the bug is not in mysqldump, but in mysql allowing you to 
use a fieldname that is a reserved word.
And yes I know about the backticks that mysqlcc uses, but surely this 
causes more problems than it solves. See above example.

So if a word is reserved, a table with that same spelling cannot exist?
If this is so, then why did mysql allow it to be created?
-RG
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Specifying Error Log

2002-04-19 Thread Russell E Glaue


I think it would be a good idea to be able to specify the error log on
the command line when starting mysqld. Right now mysql users can only
specify the following logs on the command line:
log (access/activity log)
log bin
log bin index
log update
log isam
log slow-queries
innodb_log_*

I would love to be able to specify the error log on the command line.
log error
( by default-only it is $MYSQL_ROOT/var/`hostname`.err )
mysqld --log-error=/usr/mysql/logs/error.log

Maybe some people don't like that it is flagged as an error log.
I really don't care what it is referred to as long as I can actually
specify the name and location of the log.

Does anyone else have an opinion on this?
-RG


-
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: Automatic Startup of mysqld in Mac OS X

2002-04-18 Thread Russell E Glaue


Yes. Look in this months digest. There is a thread about this.
-RG

On Thu, 18 Apr 2002, Jimi Oleksiak wrote:

 I am having real trouble trying to get mysqld to start automatically
 when I restart my Mac OS X or Mac OS X Server systems.
 I am reading the MySQL document, chapter 2.4.3, and have tried many
 different approaches.
 I can get mysqld to start manually from the terminal window, as follows

 su
 safe_mysqld

 But not from startup.

Does anyone have any experience with this?

 Thank You,

 Jimi Oleksiak



 -
 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: Load Blancing Mysql Max Db Server Between 2 Servers

2002-04-12 Thread Russell E Glaue


If your database is read-only, you can use Linux Virtual Server to load
balance traffic to MySQL servers.
-RG


On Fri, 12 Apr 2002, Frankie Gravato wrote:

 Date: Fri, 12 Apr 2002 10:54:56 -0400
 From: Frankie Gravato [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Load Blancing Mysql Max Db Server Between 2 Servers

 Hello Fellow Mysql Users

 Is Mysql Max Data Base Server even possible to do loadblancing
 to spread its load between 2 or more machines. I'm having tough time getting
 my mysql to work under heavy site load on Dual Cpu FreeBSD 4.5 machine
 running Mysql max. Any insight would help me at this point. thanks

 -Fgravato


 -
 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: time zones?

2002-04-12 Thread Russell E Glaue


We use a Network Time Server to keep the MySQL server in the right time.
-RG

On Fri, 12 Apr 2002, John Klein wrote:

 [EMAIL PROTECTED] wrote:
 
  As I understand it, the mysql TIMESTAMP type represents the time in your
  local timezone (the one your computer is using).
 
  This makes it problematic to use in timezones that have a summer/daylight
  savings time.  All of the date arithmetic functions will yield inaccurate
  results if one of the dates is in summer time and the other is in standard
  time.
 
  For these reasons, I resort to using an INT field that stores Unix time
  (seconds since the start of the Unix epoch, 00:00:00 UTC, January 1, 1970).
  This makes the data independent of the database's time zone. I still use the
  TIMESTAMP data type as a convenient way to keep tabs on when a row was modified,
  if doing date arithmetic on the column is a concern.

 I find myself doing this with a lot of databases as well, simply because
 it's more useful in Perl-land to have an epoch time value. It might be
 worthwile to have some way of retreiving a timestamp as an epoch value in
 addition to other fifty ways you can currently retrieve it. (If there
 already is a way, I'd be thrilled to hear about it.)

 --
 John Klein, Database Applications Developer |  Omnia Mutantur,
 Systems Group - Harvard Law School  |  Nihil Interit

 -
 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: Uninstalling on MacOS X

2002-04-08 Thread Russell E Glaue


Your binary distrubution downloaded from mysql.org installs in
/usr/local/mysql
If you remove everything from that directory, you can just install the
binary distribution again into that directory.
Don't forget to run the mysql_install_db script after installation so to
set up your initial mysql databases:
/usr/local/mysql/scripts/mysql_install_db
You will also want to be sure to install the mysql distro as root.
-RG

On Sun, 7 Apr 2002, Gilbert Wilson wrote:

 SMW Mac OS X user looking for someone, anyone, to help him uninstall
 mySQL-3.23.49 because he has royally screwed up the installation.

 Chronology of events:

 1) installed from binary, process went smoothly
 2) several weeks go by without use, forget password to mysql
 3) cannot remember password, at all
 4) install mysql over itself, doesn't fix problem
 5) Delete mysql directory
 6) start over by installing from source thinking that¹s the REAL way to do
 it anyway.

 7) More problems, use 'locate' to delete all (I thought) mysql files; don't
 think I really did delete all of them though.

 8) Reinstall from binary, again!
 9) now mysql is just broken, ka-putz, destroyed. Server won't start --
 nuttin.

 I was thinking of updating the 'locate' database, and then searching for all
 files that have 'mysql' in them, again.  Is this the best way to remove
 mysql?  Or is there a better way?  Also do all of mysql's files have mysql
 in their name?

 I have just enough CL knowledge to get myself into trouble, but not enough
 to pull myself out of it.

 Thanks,
 Gilbert Wilson



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

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




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

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




Re: MySQL won't keep running on my Mac OSX

2002-04-08 Thread Russell E Glaue


I have the same exact setup down to the hardware (believe it or not).
Your best game plan is to install the MySQL binary distro into
/usr/local/mysql as the root user. And then run the MySQL server as root.
You'll have to start the MySQL Server when you start the laptop.
Otherwise, you can log out or put the laptop to sleep, and the MySQL
server should keep running. This setup works fine on my G3-firewire Mac OS
10.1.3 Lap Top computer.
-RG


On Mon, 8 Apr 2002, Jay Hill wrote:

 I'm having trouble keeping MySQL running on my computer (PowerBook G3
 -Firewire, 576MB RAM, G3/400 - 40GB HD with plenty free in the main
 OS X partition).  I'm running OS X 10.1.3.

 1.  I installed MySQL (binary) in \Users\hill\MySQL\ directory
 (logged in as me/hill, not root)
 2.  I can run the install and safe_mysqld and initially get the
 database up and running.
   I can log in as root (database not OS), assign passwords.  I can
 even load PHPMyAdmin and manage the databases.
 3.  If I restart the computer or log-off/log-on, I've received
 different errors.
   The main error is Error 2002: Can't connect to local MySQL
 server through socket '/tmp/mysql.sock' (2).
   I've also gotten an error that the current user is not
 authorized or some other issue with password.  I can't connect
   to the database to test out what the 'password' is supposed to
 be.  So then .
 4.  If I delete the \data\ directory contents, I can reinstall and go
 through the process again.

 It will work well until I do a sleep or restart and then I must
 delete and do everything all over.

 I'm somewhat new to UNIX (used it many years ago) and don't know all
 the tricks, tests but am not uncomfortable digging around for fixes.
 And I know there are too many folks with success that it's obviously
 something on/about my system, but not sure where to dive in.  Can
 someone give me an idea as to why the database won't keep running or
 at least some things to check for?

 Thanks in advance for any help.
 --

 Jay Hill
 NetLearning, Inc.
 Knoxville, Tennessee
 865.251.4335
 www.net-learning.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




-
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 spanned over several systems

2002-04-06 Thread Russell E Glaue


Try linux virtual server.
You can Load Balance any port on a multitude of servers.
Your MySQL Servers you would load balance would have to be read-only
slaves though.

We are currently running two linux virtual servers to load-balance
same-port services on multiple servers with multiple Unix OSes.
The Linux Virtual Servers are even clustering themselves for fail-over.
-RG

On Sat, 6 Apr 2002, Daniel Page wrote:

 Hi,

 I would like to try to implement a MySQL server that is spanned over several
 machines (a sort of database cluster) - as this is only a test, I am not too
 woried about the end OS, but I will probably use a Mandrake 8.1 or 8.2 Linux
 distribution.

 I have found in the manual information about running several servers on the
 same system, but nothing on running one (or several linked) servers that can
 run queries on a database distributed over several systems...

 Any information, passed experiences, or links to ressources on the web will
 be greatly appreciated.

 Cheers,
 Daniel



 -
 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




dump stats? - Re: mysql monitoring

2002-04-06 Thread Russell E Glaue


Has anyone though about writing an internal function to have MySQL dump
database statistics into a flat file or database tables?
-RG

On 5 Apr 2002, Jason Yates wrote:

 Date: 05 Apr 2002 16:04:01 -0500
 From: Jason Yates [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: mysql monitoring

 Is there any sort of mysql load monitoring tools out there?  If not how
 can I get how many query's per/sec, users, etc, which I can log to a
 flat file or db, and I could run rrdtool against it to get graphs?

 -Jason


 -
 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: PERL/SQL, again? - Re: Procedures

2002-04-03 Thread Russell E Glaue


Actually, I like this proposal of being able to plug in any language into
MySQL.  I also want to make a note that Greg Cope has a very good point.
I believe it to be good to be able to plug in any language, but the mySQL
community may want to make a standard recomendation of a certain language.
And going from what Greg mentioned in an earlier e-mail in this thread,
the embedded language of choice really needs to be a small and compact
language. Perhaps it is feature rich, but still small.
A big language like java or perl will most likely slow down the database.

What language could MySQL try to standardize on that would not cause the
server to slow down or become bulky in memory?  I don't know if Python or
PHP are necessarilly better choices than PERL or Java under these
considerations. I cringe at offering up TCL as an option (don't hit me!).
I might go along with using LISP.

Does anyone on this list have a suggestion as what might be the best
language to embed into MySQL?  Be sure to consider memory efficiency,
threadding, speed of the language, and compactness (compared to code and
library bulkiness).  I'd like to hear what other people think?

As far as creating a language just to embed in MySQL... this may be
tempting, but I think it to be far better to not do this. The problems
with inventing a language just for MySQL is stalness of advancing the
language, and also innovation and optimization. There are already lots of
people in existing communities to improve current program languages.

-RG


On Tue, 2 Apr 2002, Jeremy Zawodny wrote:

 On Tue, Apr 02, 2002 at 06:20:41PM -0600, Russell E Glaue wrote:
 
  On the mysql-internals mail list we had a thread going about this. I
  was suggesting something like embedding PERL into MySQL to produce
  something like PERL/SQL (similar to PL/SQL in oracle).
  Unfortunately, although promising and liked among people of the
  list, there are no plan right now to develop anything like
  this. Atleast no one has taken the initiative to look into this.

 Actually, there are plans.  I've been in at least 2 discussions (1 was
 in person) about just how it will be done.

 The plan, last I heard, is to provide a general API for plugging in a
 language on the back-end.  So if you to use Python, you can.  If you
 want to use PHP, you can.  Java?  Probably.  And so on.

 The only problematic languages are those with threading problems--like
 Perl.

 Jeremy
 --
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

 MySQL 3.23.47-max: up 54 days, processed 1,508,672,191 queries (319/sec. avg)



-
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




not really - Re: LDAP authentication for mySQL databases

2002-04-02 Thread Russell E Glaue


Currently there is no built-in straight-forward methods to authenticate
against LDAP Directories. However, I have heard from others who have
compiled OpenLDAP using MySQL as a back-end database.
OpenLDAP: I do not know if the possibility exists to replicate the
MySQL tables storing the OpenLDAP data in the above scenario.  But if
regular access to those MySQL tables is possible, it will most likely need
to be massaged into a proper format. And of course you would have to tell
OpenLDAP to store Passwords in Plain text.
iPlanet: A product from iPlanet (Sun One) does exist to keep data
in iPlanet Directory (LDAP) Server synchronized with an SQL Database (like
MySQL). This product is called iPlanet Integration Server. I am not sure
how it will handle the passwords.

-RG

On Mon, 1 Apr 2002, Johannes Ernst wrote:

 I'd like to authenticate mySQL users against an LDAP directory. Can I
 do that? If so, how? Couldn't find anything anywhere ...

 Thanks,


 Johannes.

 -
 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




mysqlmanager - Re: FW: To run MySQL Server from the remote machine

2002-04-02 Thread Russell E Glaue


Have you looked at mysqlmanager?
It is still being developed and I am told it should not be used other than
for testing MySQL.  There is a mysqlmanagerc (client) app that goes with
it. It looks like it is being made to execute commands remotely.

I am waiting for someone to tell me what 'bin/mysqlmanager' does.

Maybe mysqlmanager/mysqlmanagerc will be able to remotely execute shell
scripts to start up MySQL processes.  I am hoping it can execute other
binaries/shell-scripts too.
-RG


On Tue, 2 Apr 2002, Chetan Lavti wrote:

 -Original Message-
 From: Chetan Lavti
 Sent: Thursday, March 28, 2002 11:39 AM
 Subject: RE: To run MySQL Server from the remote machine

  hi,
 
  Is it possible to Start the MySQL Server from the remote machine..??
  Mysql provides a Api's for shut down the server from the remote
  place i.e. ( mysql_shutdown(mysqlhadler))
  but I can't see any api for starting the Mysql server from the remote
  machine.
 
  Does it mean that every time when I have to run the server it will be
  done manually...
 
  Please, if anybody knows about this..?? do help me..
 
  I have to do this as soon as possible...??
 
  Thanks and regards,
  Chetan Lavti
 
 
 
 
 
 

 -
 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: backup databases

2002-04-02 Thread Russell E Glaue


We use mysqldump.
It is fast and easy. restoration is not hard.
If you want more a more percise restoration option, look at using the
change-log. It wil allow you to revert back in time to a state of the DB.
-RG


On Tue, 2 Apr 2002, Kory Wheatley wrote:

 Date: Tue, 02 Apr 2002 11:26:58 -0700
 From: Kory Wheatley [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: backup databases

 What is the best method to backup all your MYSQL DATBASES with not a lot
 of down time.  I have read  about using  mysqlhotcopy and mysqldump
 are these the best methods. Also what procedure is followed in backing
 up the databases. I'm basically looking for the must accurate and
 reliable way of doing this.

 --
 #
 Kory Wheatley
 Academic Computing Analyst Sr.
 Phone 282-3874
 #
 Everything must point to him.



 -
 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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: backup databases

2002-04-02 Thread Russell E Glaue


It's easy shell.
-
#!/usr/bin/bash
DATE=`/usr/bin/date '+%Y%m%d%H%M%S'`  # or '+%Y%m%d'
mysqldump -uUsername -pPassword --all-databases  tmp.sql  tar  \
 -cf MySQL-Backup-${DATE}.tar.gz -z tmp.sql  rm -f tmp.sql
-
-RG

On Tue, 2 Apr 2002, David McInnis wrote:

 Date: Tue, 2 Apr 2002 10:53:27 -0800
 From: David McInnis [EMAIL PROTECTED]
 To: 'Jonathan Hilgeman' [EMAIL PROTECTED], [EMAIL PROTECTED],
  [EMAIL PROTECTED]
 Subject: RE: backup databases

 Could you share your script for doing the date thing with the rest of
 us?  That sounds useful.

 David McInnis

 -Original Message-
 From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 10:40 AM
 To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
 Subject: RE: backup databases

 I regularly back up all my databases with mysqldump:

 mysqldump -uUsername -pPassword --all-databases  tmp.sql  tar -cf
 MySQL-Backup-DATE.tar.gz -z tmp.sql  rm -f tmp.sql

 I use a script (to determine DATE) in conjunction with cron to back all
 databases up nightly, and I also have the script e-mail the .tar.gz file
 to
 me so I can have a backup in case the server goes down.

 I've heard of hotcopy but never used it, so I couldn't recommend or
 unrecommend it.

 - Jonahtan


 -Original Message-
 From: Kory Wheatley [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 02, 2002 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: backup databases


 What is the best method to backup all your MYSQL DATBASES with not a lot
 of down time.  I have read  about using  mysqlhotcopy and mysqldump
 are these the best methods. Also what procedure is followed in backing
 up the databases. I'm basically looking for the must accurate and
 reliable way of doing this.

 --
 #
 Kory Wheatley
 Academic Computing Analyst Sr.
 Phone 282-3874
 #
 Everything must point to him.



 -
 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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[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 mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: backup databases

2002-04-02 Thread Russell E Glaue


On Tue, 2 Apr 2002, Mark Stringham wrote:

 What would  the script look like if I'm on Win2k ?

Good luck!!

But seriously; there is a $300 software package out there (can't remember
name) that will give your billy-boy OS some unix shell-like capabilities,
including TAR. It was featured in like a January (or December) Network
Magazine article.
If your interested in knowing what this software package is, e-mail me and
I'll look and get the name (and URL) to you.
-RG



 Mark
 -Original Message-
 From: Rodney Broom [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Tuesday, April 02, 2002 12:22 PM
 Subject: Re: backup databases


 From: David McInnis [EMAIL PROTECTED]
 
  Could you share your script for doing the date thing with the rest of
  us?  That sounds useful.
 
   From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
   mysqldump -uUsername -pPassword --all-databases  tmp.sql  tar -cf
   MySQL-Backup-DATE.tar.gz -z tmp.sql  rm -f tmp.sql
   I use a script (to determine DATE)...
 
 
 How about:
 
   mysqldump -uUsername -pPassword --all-databases  tmp.sql  \
   tar -cf MySQL-Backup-`date +%Y-%m-%d`.tar.gz -z tmp.sql  \
   rm -f tmp.sql
 
 Try this for an example that doesn't change anything:
 
   echo MySQL-Backup-`date +%Y-%m-%d`.tar.gz
 
 ---
 Rodney Broom
 Programmer: Desert.Net
 
 sql
 
 
 
 -
 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: backup databases

2002-04-02 Thread Russell E Glaue


Maybe... after some long hours and many lines.  I am not sure.  I know it
won't necessarilly be easy.
You'd be better off using PERL.
You can download the windows binary of PERL for free. (www.perl.org)
You can install PERL anywhere you want on the system just so long as your
PERL scripts point at the PERL.EXE executable.
-RG


On Tue, 2 Apr 2002, Mark Stringham wrote:

 Could I run something similar as a BAT file?

 -Original Message-
 From: Russell E Glaue [EMAIL PROTECTED]
 To: Mark Stringham [EMAIL PROTECTED]
 Cc: Rodney Broom [EMAIL PROTECTED]; [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Date: Tuesday, April 02, 2002 4:25 PM
 Subject: Re: backup databases


 
 On Tue, 2 Apr 2002, Mark Stringham wrote:
 
  What would  the script look like if I'm on Win2k ?
 
 Good luck!!
 
 But seriously; there is a $300 software package out there (can't remember
 name) that will give your billy-boy OS some unix shell-like capabilities,
 including TAR. It was featured in like a January (or December) Network
 Magazine article.
 If your interested in knowing what this software package is, e-mail me and
 I'll look and get the name (and URL) to you.
 -RG
 
 
 
  Mark
  -Original Message-
  From: Rodney Broom [EMAIL PROTECTED]
  To: [EMAIL PROTECTED] [EMAIL PROTECTED]
  Date: Tuesday, April 02, 2002 12:22 PM
  Subject: Re: backup databases
 
 
  From: David McInnis [EMAIL PROTECTED]
  
   Could you share your script for doing the date thing with the rest of
   us?  That sounds useful.
  
From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
mysqldump -uUsername -pPassword --all-databases  tmp.sql  tar -cf
MySQL-Backup-DATE.tar.gz -z tmp.sql  rm -f tmp.sql
I use a script (to determine DATE)...
  
  
  How about:
  
mysqldump -uUsername -pPassword --all-databases  tmp.sql  \
tar -cf MySQL-Backup-`date +%Y-%m-%d`.tar.gz -z tmp.sql  \
rm -f tmp.sql
  
  Try this for an example that doesn't change anything:
  
echo MySQL-Backup-`date +%Y-%m-%d`.tar.gz
  
  ---
  Rodney Broom
  Programmer: Desert.Net
  
  sql
  
  
  
  -
  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: backup databases

2002-04-02 Thread Russell E Glaue


forgot to mention.
you'll have to use ZIP, since TAR is not available on Windows (unless
you use the previously mentioned software packages).
-RG

On Tue, 2 Apr 2002, Russell E Glaue wrote:

 Maybe... after some long hours and many lines.  I am not sure.  I know it
 won't necessarilly be easy.
 You'd be better off using PERL.
 You can download the windows binary of PERL for free. (www.perl.org)
 You can install PERL anywhere you want on the system just so long as your
 PERL scripts point at the PERL.EXE executable.
 -RG


 On Tue, 2 Apr 2002, Mark Stringham wrote:
 
  Could I run something similar as a BAT file?
 
  -Original Message-
  From: Russell E Glaue [EMAIL PROTECTED]
  To: Mark Stringham [EMAIL PROTECTED]
  Cc: Rodney Broom [EMAIL PROTECTED]; [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  Date: Tuesday, April 02, 2002 4:25 PM
  Subject: Re: backup databases
 
 
  
  On Tue, 2 Apr 2002, Mark Stringham wrote:
  
   What would  the script look like if I'm on Win2k ?
  
  Good luck!!
  
  But seriously; there is a $300 software package out there (can't remember
  name) that will give your billy-boy OS some unix shell-like capabilities,
  including TAR. It was featured in like a January (or December) Network
  Magazine article.
  If your interested in knowing what this software package is, e-mail me and
  I'll look and get the name (and URL) to you.
  -RG
  
  
  
   Mark
   -Original Message-
   From: Rodney Broom [EMAIL PROTECTED]
   To: [EMAIL PROTECTED] [EMAIL PROTECTED]
   Date: Tuesday, April 02, 2002 12:22 PM
   Subject: Re: backup databases
  
  
   From: David McInnis [EMAIL PROTECTED]
   
Could you share your script for doing the date thing with the rest of
us?  That sounds useful.
   
 From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
 mysqldump -uUsername -pPassword --all-databases  tmp.sql  tar -cf
 MySQL-Backup-DATE.tar.gz -z tmp.sql  rm -f tmp.sql
 I use a script (to determine DATE)...
   
   
   How about:
   
 mysqldump -uUsername -pPassword --all-databases  tmp.sql  \
 tar -cf MySQL-Backup-`date +%Y-%m-%d`.tar.gz -z tmp.sql  \
 rm -f tmp.sql
   
   Try this for an example that doesn't change anything:
   
 echo MySQL-Backup-`date +%Y-%m-%d`.tar.gz
   
   ---
   Rodney Broom
   Programmer: Desert.Net
   
   sql
   
   
   
   -
   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




PERL/SQL, again? - Re: Procedures

2002-04-02 Thread Russell E Glaue


On the mysql-internals mail list we had a thread going about this. I was
suggesting something like embedding PERL into MySQL to produce something
like PERL/SQL (similar to PL/SQL in oracle).
Unfortunately, although promising and liked among people of the list,
there are no plan right now to develop anything like this. Atleast no one
has taken the initiative to look into this.

Would anyone on this list be interested in something like MySQL PERL/SQL?

In the mean time, the closest thing is probably to create extended (yes,
and static) functions to MySQL.  Adding functions to MySQL Server itself
is documented in the MySQL Manual/documentation.

-RG


On Tue, 2 Apr 2002 [EMAIL PROTECTED] wrote:

 Does any know if mysql has any kind of stored procedures?
 If not, is there any plans on including them?

 -matt


 -
 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: mysqlmanager

2002-04-01 Thread Russell E Glaue

Can you tell me what the mysqlmanager application will end up doing?
Currently you say it is for testing purposes.
But what is the future intended use of this program? What is in store for
this application down the road?

I see one of the parameters is a command length.  Will this app allow a
mysql server process to be managed remotely?  Like starting and stopping
from the shell, or doing data checks?

-RG



On Mon, 1 Apr 2002, Michael Widenius wrote:

 Hi!

  Russell == Russell E Glaue Russell writes:

 Russell in the '{MYSQLROOT}/bin' there are two executables in particular.
 Russell  mysqlmanager
 Russell  mysqlmanagerc
 Russell I see these are version 1.0, and such are recently added.
 Russell Can anyone tell me:
 Russell  What does bin/mysqlmanager do, and how do I use it?
 Russell  Why does the bin/mysqlmanagerc give me an error that it cannot
 Russell connect to the server and port mysqlmanager is listening on?

 The above programs are to still in development. Currently they are
 only usable for the mysql test suite to allow testing of stop and
 restart of the MySQL server, but in the near future these will be used
 by the 'failsafe' replication code.

 Russell I'll execute 'bin/mysqlmanager --port=3307 --host=127.0.0.1'

 cut

 Russell So, why do I get this error?
 Russell And if I get this corrected, what can I do with 'bin/mysqlmanager' and
 Russell 'bin/mysqlmanagerc' applications?  I do not see documentation anywhere.

 Currently you should not yet try to use invoke these programs
 yourself, but just regard them as part of our test system.

 Regards,
 Monty

 -
 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




mysqlmanager

2002-03-31 Thread Russell E Glaue


in the '{MYSQLROOT}/bin' there are two executables in particular.
mysqlmanager
mysqlmanagerc
I see these are version 1.0, and such are recently added.
Can anyone tell me:
What does bin/mysqlmanager do, and how do I use it?
Why does the bin/mysqlmanagerc give me an error that it cannot
connect to the server and port mysqlmanager is listening on?

I'll execute 'bin/mysqlmanager --port=3307 --host=127.0.0.1'
Running `ps -aux` I see the mysqlmanager binary is running.
Then when I execute 'bin/mysqlmanagerc --port=3307 --host=127.0.0.1' I get
a connection error:
bin/mysqlmanagerc: Could not connect to MySQL manager: Could not connect
to 127.0.0.1(61)

So, why do I get this error?
And if I get this corrected, what can I do with 'bin/mysqlmanager' and
'bin/mysqlmanagerc' applications?  I do not see documentation anywhere.

I am running the following platform: apple-darwin1.3.7 (powerpc)
The MySQL is the binary download of 4.0.0-alpha from mysql.org/downloads/
-RG


-
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: Testing MySQL 4.0

2001-06-20 Thread Russell E Glaue


On Wed, 20 Jun 2001, Michael Widenius wrote:

 
 Hi!
 
  Sasha == Sasha Pachev [EMAIL PROTECTED] writes:
 
 Sasha On Tuesday 19 June 2001 17:43, Russell E Glaue wrote:
   . After you've pulled, run BUILD/compile-pentium (for a lean fast binary)
   or BUILD/compile-pentium-debug - it will build a binary for you.
  
  We run all our MySQLs on the fast SPARCs and PPCs
  is pentium the only supported hardware right now?
 
 Sasha No, but we do not have a nifty compile-solaris-sparc-debug in the BUILD 
 Sasha directory yet, largely because none of our developers uses a Sparc for their 
 Sasha primary development machine. We do have compile-solaris-sparc, though, and 
 Sasha even compile-solaris-sparc-purify. Feel free to copy one of those, hack it 
 Sasha and send it to us.
 
 Sasha On most platforms, BUILD/compile-pentium should build a good binary even if 
 Sasha the architecture is not a pentium.
 
 This is not really true, as BUILD/compile-pentium will include
 compiler options that only works on Intel (and not sparc)
 
 Another thing is that you should normally never use scripts in the BUILD
 options if you are not working on developing MySQL, as these scripts
 require that you have a lot of extra tools installed.
 
 To do a correct build on Solaris sparc you should use the
 following configure line:
 
 
 CFLAGS=-O3 CXX=gcc CXXFLAGS=-felide-constructors -fno-exceptions
 -fno-rtti -O3 -fno-omit-frame-pointer ./configure
 --prefix=/usr/local/mysql --enable-assembler
 --with-mysqld-ldflags=-all-static
 
 You can find more information about this in the MySQL manual in the
 Solaris section.
 
 Regards,
 Monty
 


Thanks Monty.
I am interested in testing the 4.0 development tree for PPC Darwin and
Solaris 8, both which are my primary development/production archs.

-RG
+--+
 Russell E Glaue, Technologies Engineer  Integrator  [EMAIL PROTECTED]
 Center for the Application of Information Technologies
 WIU, 101 Horrabin Hall, 1 University Circle, Macomb, IL 61455
 http://www.cait.org



-
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: Testing MySQL 4.0

2001-06-19 Thread Russell E Glaue

 . After you've pulled, run BUILD/compile-pentium (for a lean fast binary)
 or BUILD/compile-pentium-debug - it will build a binary for you.

We run all our MySQLs on the fast SPARCs and PPCs
is pentium the only supported hardware right now?

-RG


On Tue, 19 Jun 2001, Sasha Pachev wrote:

 Hello, MySQL users/hackers:
 
 As some of you know, we are currently actively working on MySQL 4.0, and are 
 making some progress. Those who are subscribed to the internals lists get 
 notified of all of our commits and can monitor the progress.
 
 If you would like to do a pull from our repository and play with it, follow 
 the instructions at http://www.mysql.com/doc/I/n/Installing_source_tree.html 
 . After you've pulled, run BUILD/compile-pentium (for a lean fast binary) or 
 BUILD/compile-pentium-debug - it will build a binary for you.
 
 If you have a spare development system, plug in 4.0 binary and try to run 
 your applications on it to see if it will crash. If it does, although 4.0 is  
 pre-alpha, it is a concern to us - our rule is not to have anything in the 
 central repository that we know crashed - each developers has to run make 
 test before he can push the change, and it has to pass, maybe with the 
 exception of when one developer commits a test case for a bug for some other 
 developer to fix it. 
 
 So if you can get our tree to crash ( again, we recommend you do not try it 
 on a production system yet :-) ), please report it. The sooner you report it, 
 the sooner we fix it, and the sooner we get 4.0 into production quality 
 release.
 
 Some cool things already coded in the current 4.0 tree:
 
 REPLICATION:
 
  * LOAD DATA FROM MASTER auto-magically sets up a slave ( master tables 
 will be locked in the current code, but this will be fixed in the future once 
 we get hot backup to work)
  * master is aware of slaves if they register
  * client has built-in master/slave awareness that get turned on with special 
 client options or through new API calls
 
 GENERAL SQL:
 
  * count(distinct) is about 30% faster 
  * records can be read on raw MyISAM level with HANDLER command
  * multi-delete works, but there is a bug we are aware of that we have not 
 fixed yet
 
 FULL TEXT:
 
  * All I know  is that it works much better - Sergei could fill in the details
 
 The above list is not comlete - I just typed it from memory.
 
 Of course, the new API, SQL syntax, log formats, etc is subject to change 
 since we are still pre-alpha, so do not build applications that depend on it 
 until we have officially blessed them. 
 
 Also, now is the best time to throw in suggestions, feature requests, etc. 
 Once we've stablized the branch, it would be a lot harder to get us to change 
 things.
 
 So, in short, have fun...
 
 -- 
 MySQL Development Team
 For technical support contracts, visit https://order.mysql.com/
__  ___ ___   __ 
   /  |/  /_ __/ __/ __ \/ /   Sasha Pachev [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
 /_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
___/  
 
 -
 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]
 
 


-
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