Re: mysqldump error 1064 for database Use command
Hi win.a, I tried with another user the problem still persists. I am getting same error for another user as well. -- Regards, Manasi Save On Tue, 7 Sep 2010 11:41:35 0800, win.a wrote: use another user and dump the data ,eg the root . mysqldump -uroot -p --al-databases AllNew_Databases_20100904.sql All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 8:33 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi win.a, How am I suppose put that command. Could you help me with the syntax: If I am giving it this way:- mysqldump --all-databases AllNew_Databases_20100904.sql then it says it will not work with my system user. nor with this it is working :- mysqldump -u --all-databases AllNew_Databases_20100904.sql -- Regards, Manasi Save On Mon, 6 Sep 2010 20:12:26 0800, win.a wrote: try it without username and password in command line,type it it prompts. All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 3:28 PM, Manasi Save manasi.s...@artificialmachines.com wrote: No it does not. But when I dump database name mydb it does. but not the database with name 1. -- Regards, Manasi Save On Mon, 06 Sep 2010 09:23:21 0200, Jangita wrote: On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); - | version() | - | 5.1.22-rc-Debian_2~ppa5-log | - Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | 256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=manasi.s...@artificialmachines.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=win@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysqldump error 1064 for database Use command
I'm not sure but you might try with sql_mode set to ANSI. Otherwise try the dump remotely from a Linux box. Regards, Nitin From: Manasi Save manasi.s...@artificialmachines.com To: win.a win@gmail.com Cc: mysql@lists.mysql.com mysql@lists.mysql.com Sent: Wed, September 8, 2010 3:57:40 PM Subject: Re: mysqldump error 1064 for database Use command Hi win.a, I tried with another user the problem still persists. I am getting same error for another user as well. -- Regards, Manasi Save On Tue, 7 Sep 2010 11:41:35 0800, win.a wrote: use another user and dump the data ,eg the root . mysqldump -uroot -p --al-databases AllNew_Databases_20100904.sql All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 8:33 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi win.a, How am I suppose put that command. Could you help me with the syntax: If I am giving it this way:- mysqldump --all-databases AllNew_Databases_20100904.sql then it says it will not work with my system user. nor with this it is working :- mysqldump -u --all-databases AllNew_Databases_20100904.sql -- Regards, Manasi Save On Mon, 6 Sep 2010 20:12:26 0800, win.a wrote: try it without username and password in command line,type it it prompts. All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 3:28 PM, Manasi Save manasi.s...@artificialmachines.com wrote: No it does not. But when I dump database name mydb it does. but not the database with name 1. -- Regards, Manasi Save On Mon, 06 Sep 2010 09:23:21 0200, Jangita wrote: On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); - | version() | - | 5.1.22-rc-Debian_2~ppa5-log | - Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | 256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=manasi.s...@artificialmachines.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=win@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=ntn...@yahoo.com
Query SUM help
Hi I've the following query : SELECT total_team_rating, my_teams_id FROM (SELECT players.teams_id AS my_teams_id, SUM(players_master.rating) AS total_team_rating FROM players INNER JOIN players_master ON players.players_id = players_master.players_id WHERE players.worlds_id = 1 AND players.red_cards = 0 AND players.injury_duration_remaining = 0 GROUP BY players.teams_id) s1 ORDER BY s1.total_team_rating DESC This gives me the total of players_master.rating for each players.teams_id. However, I'm wanting to only base the players_master.rating on the top 11 records in the players table for each team. How can I modify my query to achieve this ? Thanks Neil
Replaying the mysqld.log file from production onto QA???
Hello all, I am trying to REPLAY the mysqld.log file from a production 5.1.4 server onto a QA server with 5.5 running and was wondering if there is an easy way of replaying the mysqld.log file? Just want to make sure all of the kinds of inserts, updates, selects and deletes work just as well on the 5.5 box, esp since we are turning on replication and copying tables from another server onto this server. Any ideas please? TIA... Nunzio
Re: Replaying the mysqld.log file from production onto QA???
Try using a mysqldump. - Reply message - From: ext Nunzio Daveri nunziodav...@yahoo.com Date: Wed, Sep 8, 2010 19:25 Subject: Replaying the mysqld.log file from production onto QA??? To: mysql@lists.mysql.com mysql@lists.mysql.com Hello all, I am trying to REPLAY the mysqld.log file from a production 5.1.4 server onto a QA server with 5.5 running and was wondering if there is an easy way of replaying the mysqld.log file? Just want to make sure all of the kinds of inserts, updates, selects and deletes work just as well on the 5.5 box, esp since we are turning on replication and copying tables from another server onto this server. Any ideas please? TIA... Nunzio
Does putting a LIMIT on a DELETE clause make any difference?
I am curious about something. I have a glue or hanging table like so: CREATE TABLE `fault_impact_has_fault_system_impact` ( `id_fault_impact` int(10) unsigned NOT NULL, `id_fault_system_impact` smallint(5) unsigned NOT NULL, KEY `fault_impact_key` (`id_fault_impact`,`id_fault_system_impact`), KEY `id_fault_system_impact` (`id_fault_system_impact`), CONSTRAINT `fault_impact_has_fault_system_impact_ibfk_1` FOREIGN KEY (`id_fault_impact`) REFERENCES `fault_impact` (`id_fault_impact`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fault_impact_has_fault_system_impact_ibfk_2` FOREIGN KEY (`id_fault_system_impact`) REFERENCES `fault_system_impact` (`id_fault_system_impact`) ON DELETE CASCADE ON UPDATE CASCADE ) And a lookup table like this: CREATE TABLE `fault_system_impact` ( `id_fault_system_impact` smallint(5) unsigned NOT NULL auto_increment, `fault_sytem_impact_name` varchar(50) NOT NULL, PRIMARY KEY (`id_fault_system_impact`) ) I have a bunch of checkboxes in a FORM and so in order to update properly, I wipe out all the PK IDs and then start inserting. It looks like this: UPDATE `fault_impact` SET `bite_code` = '12', `bite_code_type` = '32', `bite_subcode` = '21', `description_text` = 'Some random fault description here.', `fault_id` = '11-1', `fault_impact_other_explain` = '', `id_fault_area_impact` = '3', `symptom_lru_id` = '232', `symptom_lru_subid` = '34', `sys_perf_affected` = '', `update_date` = '2010-09-09 00:04:29' WHERE id_fault_impact = '2495' LIMIT 1; DELETE FROM fault_impact_has_fault_system_impact WHERE id_fault_impact = 2495; INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 1); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 3); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 2); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 7); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 10); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 14); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 9); INSERT INTO fault_impact_has_fault_system_impact(`id_fault_impact`,`id_fault_system_imp act`) VALUES(2495, 4); Given that I know there can only be a maximum of id_fault_system_impact IDs -- currently there are 17 rows in the fault_system_impact table -- and they're unique to any given id_fault_impact, would it benefit me to change my DELETE statement to something like this: DELETE FROM fault_impact_has_fault_system_impact WHERE id_fault_impact = 2495 LIMIT 17; Since the fault_impact_has_fault_system_impact table could have thousands of rows and it seems that mySQL would do a table scan? Unfortunately, you can't EXPLAIN on a DELETE to see what it might be doing. :( OR is mySQL smart enough to know that the id_fault_impact is an index and therefore it will just be right quick and stop after deleting those 8 rows above? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org