best configuration for ip failover
This is our situation: We have two servers running RHES3 with samba connections to a server running RHES4. (No, it's not dns. Believe me when I say I don't ever want to go through *that* pain again) Our ES4 server contains shared data that is not controlled through cvs. Our two ES3 servers contain our website which is controlled through cvs. Both our ES3 servers have mysql. The mysql dbs have our username/password (and other) information. We are in the process of setting up ip failover using a dns round-robin. My concern about keeping the mysql dbs on the ES3 servers is the possibility of changing the db on one and also changing the db on the other; I don't know how to keep the changes synced. I was considering putting the mysql db on the ES4 server and both the ES3 servers would connect to the mysql db there. My partner in crime is concerned about this since it would be a single point of failure. This is my question: What would be the best configuration for maintaining database integrity? I don't mean just between what I outlined, but in general? Clusters seems to be overly complicated (from what I can understand of it). I just need some direction at this point. Thanks, Susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
question about showing db and/or table size
I know there must be a command line query to show the size of the database or of specific tables. What is it? I've been unable to find anything in the online manual (of course that presupposes I've been looking in the right place). Thanks, Susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Temporary table question
Thanks y'all. It seems that the temporary table is the way I want to go for my particular situation. Susan -Original Message- From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 11:05 AM To: Nitin; Susan Ator; [EMAIL PROTECTED] Subject: Re: Temporary table question Also, sometimes one needs to copy the content of a table in itself but earlier versions of MySQL don't support something like INSERT INTO some_table SELECT * FROM some_table /* the select table and insert tables are not different */ So, you may create a temporary table, fill it with the info you want to copy, copy the contents of the temporary table into the original table and distroy the temporary table. Also, I sometimes work with complex joins. Instead of using those lengthy SQL instructions, I create temp tables and work with them. Thanks Emery - Original Message - From: "Nitin" <[EMAIL PROTECTED]> To: "Susan Ator" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 16, 2003 16:39 Subject: Re: Temporary table question > basically used to make queries easier running from within scripts. it could > be a good workaround for views, as you can create a temporary table to be > used as a view, but it gets destroyed as the connection to your database > closes. You can also use it as a good workaround for union, for older mysql > version, which doesn't support union and for other functions you want to > perform on some rows selected from multiple tables. > > Enjoy > Nitin > > - Original Message - > From: "Susan Ator" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 16, 2003 7:39 PM > Subject: Temporary table question > > > > I would like to know the circumstances in which a temporary table would be > > used. What is the rationale behind temporary tables? I have searched the > > manual and the 'net but only find out information about creating or > > manipulating them. > > > > Thanks, > > > > Susan > > > > -- > > 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]
Temporary table question
I would like to know the circumstances in which a temporary table would be used. What is the rationale behind temporary tables? I have searched the manual and the 'net but only find out information about creating or manipulating them. Thanks, Susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Why is this query not working?
Thank you. Changing it to: $max_esn = mysql_result($max_esn_result,$i); did the trick. sa -Original Message- From: Jennifer Goodie [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 6:33 PM To: Susan Ator; [EMAIL PROTECTED] Subject: RE: Why is this query not working? > I am running php 4.2.2 and mysql 3.23.54. This is a PHP question, not mySQL. > This is my query: > > $sql = "SELECT MAX(esn) FROM address"; // line 37 > $max_esn_result = mysql_query($sql) or print mysql_error(); // line > 38 > $max_esn = mysql_result($max_esn_result,$i,"esn"); // line 39 What is the value of $i? Are you sure you want to jump to row $i of your result set? > > This is the error I get: > > esn not found in MySQL result index 5 in > /var/www/html/address_entry.php on line 39 > I think since you are selecting MAX(esn) is doesn't get returned as esn, it gets returned as MAX(esn), I could be wrong. A simple fix would be to get rid of the third argument you are passing to mysql_result since your query is only returning one field you do not need an offset or name. Or you can change the query to "SELECT MAX(esn) as max_esn FROM address"; and then use max_esn as your offset/fieldname. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Why is this query not working?
I am running php 4.2.2 and mysql 3.23.54. This is my query: $sql = "SELECT MAX(esn) FROM address"; // line 37 $max_esn_result = mysql_query($sql) or print mysql_error(); // line 38 $max_esn = mysql_result($max_esn_result,$i,"esn"); // line 39 This is the error I get: esn not found in MySQL result index 5 in /var/www/html/address_entry.php on line 39 This is the structure of the address table: `address_id` int( 11 ) NOT NULL auto_increment, `address` varchar( 12 ) default NULL , `esn` int( 10 ) default NULL , `noi` varchar( 80 ) default NULL , `owner` varchar( 80 ) default NULL , `description` varchar( 80 ) default NULL , `operator` varchar( 20 ) default NULL , `timestamp` varchar( 20 ) default NULL , `addresslist` text, PRIMARY KEY ( `address_id` ) ) TYPE = MYISAM AUTO_INCREMENT = 601; When I run: SELECT MAX(esn) FROM address in phpMyAdmin I get the expected result which is 515. What in the world am I missing?!?!?! Susan Ator Online Services Engineer National Public Radio Distribution Division [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
update to 4.0 mySQL question
I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I attempted to run mysql_fix_privileges. This is the error I get: ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) /tmp is: drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp and mysql.sock is ACTUALLY located in /var/lib/mysql. Where do I need to look to change the location from /tmp to /var/lib/mysql for this particular file? susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: query question
Thank y'all very very much. Each day I learn something new ;) susan -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 1:35 PM To: Susan Ator; [EMAIL PROTECTED] Subject: RE: query question [snip] Is there a way to check if a field has x number of characters in it? I have a table with a column (phone) which, for the moment is varchar(25). I need to find those entries which have less than 10 characters. [/tuck] http://www.mysql.com/doc/en/String_functions.html mysql> SELECT LENGTH('text'); -> 4 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
query question
Is there a way to check if a field has x number of characters in it? I have a table with a column (phone) which, for the moment is varchar(25). I need to find those entries which have less than 10 characters. Can this be done? Thanks susan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Join problem
Well, it's not blowing up on me and returning a jillion records. Trouble is, it's also not returning any records at all. Thanks for the suggestion, though. I'll keep plugging away at it. susan -Original Message- From: William R. Mussatto [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 3:42 PM To: [EMAIL PROTECTED] Cc: Susan Ator Subject: RE: Join problem > Well, I'm running 3.23.54 on Red Hat 7.3. Given this, how in the world > do I accomplish the following: > > I have these tables: > dacspriv - with dacspriv_id,dacspriv_name,short_name > users - with user_id,username > dacs_access - with dacsaccess_id,dacspriv_id,user_id > > I need to be able to return a list of dacspriv.short_name where > user.user_id IS NOT in dacs_access but ONLY for that user_id (I have > over 1700 users with multiple mappings in dacs_access). > > > > susan > > > -Original Message- > From: Ryan McDougall [mailto:[EMAIL PROTECTED] > Sent: Friday, May 30, 2003 12:11 PM > To: mysql > Subject: Re: Join problem > > >> Short answer is mysql does not do sub-selects (i.e., a select inside >> of a select). The join part is not this issue. > > Wouldn't this depend on the version... I thought the newest versions, > 4.x+, supported sub-selects. > > Ryan > Ok let's see: select dacspriv_name,short_name from dacspriv,users LEFT JOIN dacs_access on dacs_access.user_id = users.user_id where dacs_access.user_id is NULL and users.user_id = WHATEVER The key is "dacs_access.user_id is NULL" While I haven't tried it with your data, I've used this in the past. For speed recommend user_id's in all tables be indexed. Obviously replace 'WHATEVER' with the userID value. William R. Mussatto, Senior Systems Engineer Ph. 909-920-9154 ext. 27 FAX. 909-608-7061 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Join problem
Well, I'm running 3.23.54 on Red Hat 7.3. Given this, how in the world do I accomplish the following: I have these tables: dacspriv - with dacspriv_id,dacspriv_name,short_name users - with user_id,username dacs_access - with dacsaccess_id,dacspriv_id,user_id I need to be able to return a list of dacspriv.short_name where user.user_id IS NOT in dacs_access but ONLY for that user_id (I have over 1700 users with multiple mappings in dacs_access). susan -Original Message- From: Ryan McDougall [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 12:11 PM To: mysql Subject: Re: Join problem > Short answer is mysql does not do sub-selects (i.e., a select inside of a > select). The join part is not this issue. Wouldn't this depend on the version... I thought the newest versions, 4.x+, supported sub-selects. Ryan __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Join problem
O. I've got a headache trying to understand joins. I'm definitely NOT a database guru. Why in the world doesn't this work? SELECT dacspriv_name FROM dacspriv WHERE dacspriv_id not in (SELECT dacspriv_id FROM dacs_access JOIN users ON dacs_access.user_id=users.user_id WHERE users.username='sator') Susan Ator Online Services Engineer National Public Radio Distribution Division [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]