Re: mysql privileges
I would like to thank everyone who gave suggestions about how to fix the mysql privileges. Here's what we did: We did a mysqldump on the mysql table on the old machine. We brought the mysqldump into the mysql table on the new machine We ran mysql_fix_privilege_tables We gave the commandflush privileges Everything worked perfectly after that. Thanks again to everyone who helped. -- Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036 >>> On 3/19/2008 at 6:10 PM, in message <[EMAIL PROTECTED]>, Sebastian Mendel <[EMAIL PROTECTED]> wrote: > Brown, Charles schrieb: >> Here is a follow-up question: Using mysqldump, I'm about to dump all >> databases and import to another instance - new . My question is do I >> need to define all security and users in the new mysql or the security >> definitions and privileges will be included in the dump file created by >> mysqldump. > > i am not sure if mysqldump does include `mysql` database, but you will see > if you look into it, > > you should run mysql_fix_privilege_tables after importing `mysql` database > > and FLUSH PRIVILEGES; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ORDER BY calculated field
Hi, How do I achieve a SQL statement to order my results based on two calculated fields for example : SELECT COUNT(ProductsPurchases.ProductID) as varProductCount, Products.Name, Products.ProductReview FROM ProductsPurchasesINNER JOIN Products ON Products.ProductID = ProductsPurchases.ProductIDGROUP BY Products.ProductID ORDER BY varProductCount+Products.ProductReviewDESC Thanks Neil _ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml
Re: ORDER BY calculated field
Neil Tompkins schrieb: Hi, How do I achieve a SQL statement to order my results based on two calculated fields for example : what two calculated fields? SELECT COUNT(ProductsPurchases.ProductID) as varProductCount, Products.Name, Products.ProductReview FROM ProductsPurchasesINNER JOIN Products ON Products.ProductID = ProductsPurchases.ProductIDGROUP BY Products.ProductID ORDER BY varProductCount+Products.ProductReviewDESC ORDER BY COUNT(ProductsPurchases.ProductID) -- Sebastian Mendel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ORDER BY calculated field
Hi I want to order by the totalled fields varProductCount and Products.ProductReviewDESC Neil > Date: Thu, 20 Mar 2008 11:36:30 +0100> From: [EMAIL PROTECTED]> To: > mysql@lists.mysql.com> Subject: Re: ORDER BY calculated field> > Neil > Tompkins schrieb:> > Hi,> > > > How do I achieve a SQL statement to order my > results based on two calculated fields for example :> > what two calculated > fields?> > > > SELECT COUNT(ProductsPurchases.ProductID) as varProductCount, > Products.Name, Products.ProductReview> > FROM ProductsPurchasesINNER JOIN > Products ON Products.ProductID = ProductsPurchases.ProductIDGROUP BY > Products.ProductID ORDER BY varProductCount+Products.ProductReviewDESC> > > ORDER BY COUNT(ProductsPurchases.ProductID)> > -- > Sebastian Mendel> > -- > > MySQL General Mailing List> For list archives: http://lists.mysql.com/mysql> > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]> _ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml
Re: ORDER BY calculated field
Neil Tompkins schrieb: Hi I want to order by the totalled fields varProductCount and Products.ProductReviewDESC just put them together, separated with comma, like it is written in the manual ORDER BY varProductCount + Products.ProductReviewDESC, COUNT(ProductsPurchases.ProductID) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ORDER BY calculated field
Sebastian Mendel schrieb: Neil Tompkins schrieb: Hi I want to order by the totalled fields varProductCount and Products.ProductReviewDESC just put them together, separated with comma, like it is written in the manual ORDER BY varProductCount + Products.ProductReviewDESC, COUNT(ProductsPurchases.ProductID) sorry: ORDER BY COUNT(ProductsPurchases.ProductID) + Products.ProductReviewDESC -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ORDER BY calculated field
Neil Tompkins schrieb: Thanks Sebastian, but I now get the error message [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]Invalid use of group function i am not familiar with ODBC or MySQL 3.x but possible just GROUP BY is missing check the manual for your mysql version for the exact syntax if this is not working at all you have to use HAVING -- Sebastian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ORDER BY calculated field
Thanks Sebastian, but I now get the error message [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]Invalid use of group function > Date: Thu, 20 Mar 2008 12:59:22 +0100> From: [EMAIL PROTECTED]> To: > mysql@lists.mysql.com> Subject: Re: ORDER BY calculated field> > Sebastian > Mendel schrieb:> > Neil Tompkins schrieb:> >> Hi> >> > >> I want to order by > the totalled fields varProductCount and > >> Products.ProductReviewDESC> > > > > just put them together, separated with comma, like it is written in the > > > manual> > > > ORDER BY varProductCount + Products.ProductReviewDESC,> > > COUNT(ProductsPurchases.ProductID)> > > > sorry:> > ORDER BY > COUNT(ProductsPurchases.ProductID) + Products.ProductReviewDESC> > -- > > Sebastian> > -- > MySQL General Mailing List> For list archives: > http://lists.mysql.com/mysql> To unsubscribe: http://lists.mysql.com/[EMAIL > PROTECTED]> _ Share what Santa brought you https://www.mycooluncool.com
RE: ORDER BY calculated field
Thanks for the help. However I found another solution which is to use the following SELECT COUNT(ProductsPurchases.ProductID)+Products.ProductReview as varProductCount, Products.Name, Products.ProductReviewFROM ProductsPurchasesINNER JOIN Products ON Products.ProductID = ProductsPurchases.ProductIDGROUP BY Products.ProductID ORDER BY varProductCount DESC > Date: Thu, 20 Mar 2008 13:08:51 +0100> From: [EMAIL PROTECTED]> CC: > mysql@lists.mysql.com> Subject: Re: ORDER BY calculated field> > Neil > Tompkins schrieb:> > Thanks Sebastian, but I now get the error message> > > > > [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]Invalid use of group function> > i > am not familiar with ODBC or MySQL 3.x> > but possible just GROUP BY is > missing> check the manual for your mysql version for the exact syntax> > if > this is not working at all you have to use HAVING> > -- > Sebastian> > -- > > MySQL General Mailing List> For list archives: http://lists.mysql.com/mysql> > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]> _ Share what Santa brought you https://www.mycooluncool.com
binlog sequence # rollover
do binlog sequences just rollover back to 0 w/o a resetlogs? will it just automatically go back to mysqld.00 after mysqld.99? any replication implications? I know it sounds like a stupid question and I'm sure the developers are smart enought to have thought of that but we'll be crossing that threshold in the next 6-8 weeks and I don't need to find out it's a problem the hard way. we're running 5.0.27 for most of our prod...
Re: Security overrides in mysql.cnf
At 2:51 PM -0500 3/19/08, Brown, Charles wrote: I inherited a mysql server database. Stuff are not documented. My question is: Are there any security work-arounds in mysql. I have access to the cnf file. I need to get in and dump the database. I was told that the cnf file allows security over rides. Please help If you were told that, perhaps you could ask the person(s) who told you that what they meant and how to do it. :-) Information in other followups about --skip-grant-tables is useful, too. You can start the server that way, connect as root w/no password, issue a FLUSH PRIVILEGES statement to re-enable the grant tables (so that you can use CREATE USER, GRANT, etc.), and then set up the accounts the way you want (new root password and so forth). -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: binlog sequence # rollover
Hi, On Thu, Mar 20, 2008 at 9:41 AM, Sid Lane <[EMAIL PROTECTED]> wrote: > do binlog sequences just rollover back to 0 w/o a resetlogs? will it just > automatically go back to mysqld.00 after mysqld.99? any replication > implications? > > I know it sounds like a stupid question and I'm sure the developers are > smart enought to have thought of that but we'll be crossing that threshold > in the next 6-8 weeks and I don't need to find out it's a problem the hard > way. I'm not sure what happens. But you can test: shut down a test installation, create mysqld.98, edit the mysqld.index file appropriately, and restart. Then see what happens when you run FLUSH LOGS a few times. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: the limitaiton of table size
At 10:47 PM -0400 3/18/08, Sookhyun Yang wrote: Dear all, I have a question about the limitatin of table size. If I use the InnoDB engine, I don't have to worry that the total size of table is greater than the single filesize? You can create an InnoDB tablespace that spans multiple files, yes. InnoDB will use the aggregate file size as the tablespace size. But remember that multiple tables share the tablespace. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Selecting the most recent entry for each object.
Hi, I have a load of reviews in a table and, for each person I want to pull out the most recent review. So, if I wanted to do this for a single person I would order by date desc and use "limit 1". But I'm not sure how to do this in bulk. Thanks.
Re: Selecting the most recent entry for each object.
Hi, On Thu, Mar 20, 2008 at 10:35 AM, Edward Corbett <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have a load of reviews in a table and, for each person I want to pull out > the most recent review. > > > > So, if I wanted to do this for a single person I would order by date desc > and use "limit 1". But I'm not sure how to do this in bulk. Try the techniques I wrote about here: http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/ Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Selecting the most recent entry for each object.
Great article. Got me on the right track. Actual solution I went with was something like: select `vPamLearner`.`learnerId`, `vPamLearner`.`usedName`, `vPamLearner`.`surname`, max(prComp.dateSubmitted) latestSubmitted, max(prComp.FProgressReviewId) latestSubmittedId, max(prStarted.dateStarted) latestStarted, max(prStarted.FProgressReviewId) latestStartedId from vPamLearner left join vPamFProgressReview prComp on vPamLearner.learnerId = prComp.learnerId and prComp.status = 'c' left join vPamFProgressReview prStarted on vPamLearner.learnerId = prStarted.learnerId and prStarted.status = 's' where `vPamLearner`.`assessorId` = 5 group by `vPamLearner`.`learnerId`; Cheers -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Baron Schwartz Sent: 20 March 2008 14:54 To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: Selecting the most recent entry for each object. Hi, On Thu, Mar 20, 2008 at 10:35 AM, Edward Corbett <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have a load of reviews in a table and, for each person I want to pull out > the most recent review. > > > > So, if I wanted to do this for a single person I would order by date desc > and use "limit 1". But I'm not sure how to do this in bulk. Try the techniques I wrote about here: http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per -group-in-sql/ Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
2 mysqld instances
Hi, I have a single machine with 2 mysql instances running. One of them was started like this: /home/y/libexec/mysqld --basedir=/home/mysql --datadir=/var/mysql/data --pid-file=/var/mysql/mysqld.pid --port=3306 --socket=/tmp/mysql.sock and, the other one, like this: /home/y/libexec/mysqld --defaults-extra-file=/var/app/data/my.cnf --basedir=/home/mysql --datadir=/var/app/data --user=mysql --pid-file=/var/run/mysqld.pid --port=3382 --socket=/tmp/app_mysql.sock However, when I try to access the second instance using "mysql -u root -P3382", I land on the first instance. Why? The only way I could get to that instance is by using mysql --socket=/tmp/app_mysql.sock -u root. Thank you.
Optimize db update
Hi, Actually I am updating TableA in DatabaseA with values from TableB in DatabaseB. Database B is on a stand alone PC. I'm using VB6 to create a .txt file containing data from TableB then using VB6 once more to recronstruct the table in DatabaseA then remove all data which are already in TableA and insert the remaining. This is working fine but as my table is growing bigger the process is taking more time (about 5 mins for 250,000 records) How can I optimise this process? and What are the alternatives available ? Thanks Regards, Velen
Re: 2 mysqld instances
In the last episode (Mar 20), Edson Noboru Yamada said: > I have a single machine with 2 mysql instances running. One of them > was started like this: > > /home/y/libexec/mysqld --basedir=/home/mysql --datadir=/var/mysql/data > --pid-file=/var/mysql/mysqld.pid --port=3306 --socket=/tmp/mysql.sock > > and, the other one, like this: > > /home/y/libexec/mysqld --defaults-extra-file=/var/app/data/my.cnf > --basedir=/home/mysql --datadir=/var/app/data --user=mysql > --pid-file=/var/run/mysqld.pid --port=3382 --socket=/tmp/app_mysql.sock > > However, when I try to access the second instance using "mysql -u root > -P3382", I land on the first instance. Why? -P is only used when connecting to non-localhost addresses. Try adding "-h 127.0.0.1" to your commandline. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Optimize db update
On Thu, Mar 20, 2008 at 1:41 PM, Velen <[EMAIL PROTECTED]> wrote: > > Actually I am updating TableA in DatabaseA with values from TableB in > DatabaseB. Database B is on a stand alone PC. I'm using VB6 to create a > .txt file containing data from TableB then using VB6 once more to > recronstruct the table in DatabaseA then remove all data which are already in > TableA and insert the remaining. [snip!] > How can I optimise this process? and What are the alternatives available ? If you don't absolutely need to use VB6, why not use something with native support like PHP? If you decide to go that route, I recommend subscribing to the PHP-DB list at http://php.net/mailinglists (referred to there as "Databases and PHP"). You should see a significant gain in performance using a native client as opposed to what you're now using (probably an ODBC DSN, MyODBC, or a JDBC hack). -- Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: 2 mysqld instances
On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson <[EMAIL PROTECTED]> wrote: > > > -P is only used when connecting to non-localhost addresses. Try adding > "-h 127.0.0.1" to your commandline. > It worked! Thank you!
Re: Optimize db update
Are the table structures identical ? If so, you could just move the data files themselves. Otherwise consider using unload from table B into seperated format (mysql load format) truncate table A load data infile into table A On Thu, Mar 20, 2008 at 2:20 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Thu, Mar 20, 2008 at 1:41 PM, Velen <[EMAIL PROTECTED]> wrote: > > > > Actually I am updating TableA in DatabaseA with values from TableB in > DatabaseB. Database B is on a stand alone PC. I'm using VB6 to create a > .txt file containing data from TableB then using VB6 once more to > recronstruct the table in DatabaseA then remove all data which are already > in TableA and insert the remaining. > [snip!] > > How can I optimise this process? and What are the alternatives > available ? > > If you don't absolutely need to use VB6, why not use something > with native support like PHP? > > function dba_query($sql) { // Simply return the connection resource ID >// Select the primary database >$dba_conn = > mysql_connect('hostname_a','username_a','password_a') or > die(mysql_error()); >$dba_db = mysql_select_db('database_a',$dba_conn); >$r = mysql_query($sql,$dba_conn) or die(mysql_error()); >return $r; > } > > function dbb_query($sql) { // Simply return the connection resource ID >// Select the secondary database >$dbb_conn = > mysql_connect('hostname_b','username_b','password_b') or > die(mysql_error()); >$dbb_db = mysql_select_db('database_b',$dbb_conn); >$r = mysql_query($sql,$dbb_conn) or die(mysql_error()); >return $r; > } > > $sql = "SELECT field1,field2,field3,field4 FROM table_a"; > $result = dba_query($sql) or die(mysql_error()); > while($row = mysql_fetch_array($result)) { >$ssql = "INSERT INTO table_b(field1,field2,field3,field4) >VALUES( >'".$row['field1']."', >'".$row['field2']."', >'".$row['field3']."', >'".$row['field4']."' >}"; >dbb_query($ssql) or die(mysql_error()); > } > ?> > >If you decide to go that route, I recommend subscribing to the > PHP-DB list at http://php.net/mailinglists (referred to there as > "Databases and PHP"). You should see a significant gain in > performance using a native client as opposed to what you're now using > (probably an ODBC DSN, MyODBC, or a JDBC hack). > > -- > > Forensic Services, Senior Unix Engineer > 1+ (570-) 362-0283 > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > -- Help build our city at http://free-dc.myminicity.com !
Re: 2 mysqld instances
At 3:25 PM -0300 3/20/08, Edson Noboru Yamada wrote: On Thu, Mar 20, 2008 at 2:53 PM, Dan Nelson <[EMAIL PROTECTED]> wrote: -P is only used when connecting to non-localhost addresses. Try adding "-h 127.0.0.1" to your commandline. It worked! Thank you! You can also force a TCP/IP connection, even for localhost, with --protocol=tcp http://dev.mysql.com/doc/refman/5.0/en/invoking-programs.html -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
doubt: mysqldump in linux like windows
Hello guys i have this situation in widnows with the mysql administrador i make backup i saw in the x.sql these lines for example /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), ('1-CHA01','KIT CHACARERO AZUL (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'), ('1-P0001','CASCOS DE MOTOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0003','LLANTAS DUNLOP LT 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0014','POLOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), see pls that each row is written in a unique of line of text now in linux with command in a terminal i do in this way my backups mysqldump --opt --password=XXX --user=root somedb > /home/Someuser/somepath/A.sql the backup is done but in this way /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'),('1-CHA01','KIT CHACARERO AZUL (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'),('1-P0001','CASCOS DE how you can see, all the rows appear in one line, dangeous, i dont want this behaviour when i open this file in windows tell me if i try to save this file i will missing some values or rows and in linux the gedit dies :( after to read this http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html mysqldump i tried in this way mysqldump --opt --extended-insert--password=XXX --user=root somedb > /home/Someuser/somepath/A.sql with the same undesired results how i can resolve this?? thanks in advanced -- View this message in context: http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16185833.html Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: relational tables
Sorry, I'm a top quoter. This is what I want to do. I'm still told there re problems with my keys. DROP TABLE IF EXISTS `person`; CREATE TABLE `person` ( `person_id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `email` varchar(255) default NULL, PRIMARY KEY (`person_id`), KEY `email` (`email`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 1, 'Name', '[EMAIL PROTECTED]' ) ; INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 2, 'second Name', '[EMAIL PROTECTED]' ) ; DROP TABLE IF EXISTS `shopping`; CREATE TABLE IF NOT EXISTS `shopping` ( `shopping_id` int(11) NOT NULL, `email` varchar(255) default NULL, `name` varchar(255) default NULL, PRIMARY KEY (`shopping_id`), UNIQUE KEY `email` (`email`), UNIQUE KEY `name` (`name`), FOREIGN KEY (`email`) REFERENCES `person` (`email`), FOREIGN KEY (`name`) REFERENCES `person` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Sebastian Mendel wrote: This is InnoDB so I should be able to do this by SQL, right? where do you want to see this drop-downs? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: doubt: mysqldump in linux like windows
Use --skip-extended-insert as another mysqldump option -Original Message- From: dr_pompeii [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 2:43 PM To: mysql@lists.mysql.com Subject: doubt: mysqldump in linux like windows Hello guys i have this situation in widnows with the mysql administrador i make backup i saw in the x.sql these lines for example /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), ('1-CHA01','KIT CHACARERO AZUL (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'), ('1-P0001','CASCOS DE MOTOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0003','LLANTAS DUNLOP LT 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0014','POLOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), see pls that each row is written in a unique of line of text now in linux with command in a terminal i do in this way my backups mysqldump --opt --password=XXX --user=root somedb > /home/Someuser/somepath/A.sql the backup is done but in this way /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'),('1-CHA01','KIT CHACARERO AZUL (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'),('1-P0001','CASCOS DE how you can see, all the rows appear in one line, dangeous, i dont want this behaviour when i open this file in windows tell me if i try to save this file i will missing some values or rows and in linux the gedit dies :( after to read this http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html mysqldump i tried in this way mysqldump --opt --extended-insert--password=XXX --user=root somedb > /home/Someuser/somepath/A.sql with the same undesired results how i can resolve this?? thanks in advanced -- View this message in context: http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16185833.html Sent from the MySQL - General mailing list archive at Nabble.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]
RE: relational tables
See below... > -Original Message- > From: John Taylor-Johnston [mailto:John.Taylor- > [EMAIL PROTECTED] > Sent: Thursday, March 20, 2008 2:17 PM > To: Sebastian Mendel; mysql@lists.mysql.com > Subject: Re: relational tables > > DROP TABLE IF EXISTS `person`; > CREATE TABLE `person` ( > `person_id` int(11) NOT NULL auto_increment, > `name` varchar(255) default NULL, > `email` varchar(255) default NULL, > PRIMARY KEY (`person_id`), > KEY `email` (`email`), > KEY `name` (`name`) > ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; > > INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 1, > 'Name', > '[EMAIL PROTECTED]' ) ; > INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 2, > 'second > Name', '[EMAIL PROTECTED]' ) ; > > DROP TABLE IF EXISTS `shopping`; > CREATE TABLE IF NOT EXISTS `shopping` ( > `shopping_id` int(11) NOT NULL, > `email` varchar(255) default NULL, > `name` varchar(255) default NULL, > PRIMARY KEY (`shopping_id`), > UNIQUE KEY `email` (`email`), > UNIQUE KEY `name` (`name`), > FOREIGN KEY (`email`) REFERENCES `person` (`email`), > FOREIGN KEY (`name`) REFERENCES `person` (`name`) > ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > Something doesn't smell right with the 'shopping' table. Rather than using what appears to be the same values (aside from the person_id as opposed to the shopping_id), wouldn't it be more effective to have the shopping table have 'shopping_id' and 'person_id' fields? With that approach, you could get away from having the same data in two tables. But, you'll have to start building ways to look up the person_id based on name and email values in order to populate the shopping table. Took a flyer at an updated version of the above (not knowing what your intent is): DROP TABLE IF EXISTS `person`; CREATE TABLE `person` ( `person_id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `email` varchar(255) default NULL, PRIMARY KEY (`person_id`), KEY `email` (`email`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( null, 'Name', '[EMAIL PROTECTED]' ) ; -- updated the key value to allow for being created automatically INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( null, 'second Name', '[EMAIL PROTECTED]' ) ; -- same thing here DROP TABLE IF EXISTS `shopping`; CREATE TABLE IF NOT EXISTS `shopping` ( `shopping_id` int(11) NOT NULL, `person_id` int(11) NOT NULL, PRIMARY KEY (`shopping_id`), FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`), ) ENGINE=InnoDB DEFAULT CHARSET=latin1; The syntax of the above might not be 100%...but it looks to be close enough. No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.7/1335 - Release Date: 3/19/2008 9:54 AM -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: doubt: mysqldump in linux like windows
Hi Rolando thanks for the reply it works, thanks, new command used mysqldump --opt --skip-extended-insert --password=XXX --user=root somedb > /home/Someuser/somepath/A.sql but i see one difference from windows /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), ('1-P0001','CASCOS DE MOTOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0003','LLANTAS DUNLOP LT 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), ('1-P0014','POLOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), now with the new command already shown i have this way LOCK TABLES `articulo` WRITE; /*!4 ALTER TABLE `articulo` DISABLE KEYS */; INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'); INSERT INTO `articulo` VALUES ('1-CHA01','KIT CHACARERO AZUL (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'); INSERT INTO `articulo` VALUES ('1-P0001','CASCOS DE MOTOS HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'); i need like the windows way, thats mean, for the first line for insertion before to insert all rows i need INSERT INTO `articulo` (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) VALUES i tried adding --disable-keys but wierd and undesired results regards Rolando Edwards-3 wrote: > > Use --skip-extended-insert as another mysqldump option > > -Original Message- > From: dr_pompeii [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2008 2:43 PM > To: mysql@lists.mysql.com > Subject: doubt: mysqldump in linux like windows > > > Hello guys > > i have this situation > in widnows with the mysql administrador i make backup > i saw in the x.sql these lines for example > > > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > INSERT INTO `articulo` > (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) > VALUES > ('1-15W40','ACEITE EXTRAVIDA X GLN > 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), > ('1-CHA01','KIT CHACARERO AZUL > (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'), > ('1-P0001','CASCOS DE MOTOS > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > ('1-P0003','LLANTAS DUNLOP LT > 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), > ('1-P0014','POLOS > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > > > see pls that each row is written in a unique of line of text > > now in linux with command in a terminal i do in this way my backups > > > mysqldump --opt --password=XXX --user=root somedb > > /home/Someuser/somepath/A.sql > > > the backup is done but in this way > > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN > 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'),('1-CHA01','KIT > CHACARERO AZUL > (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00','300','14'),('1-P0001','CASCOS > DE > > how you can see, all the rows appear in one line, > dangeous, i dont want this behaviour when i open this file in windows tell > me if i try to save this file i will missing some values or rows > and in linux the gedit dies :( > > after to read this > http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html mysqldump > i tried in this way > > > mysqldump --opt --extended-insert--password=XXX --user=root somedb > > /home/Someuser/somepath/A.sql > > with the same undesired results > > how i can resolve this?? > > thanks in advanced > -- > View this message in context: > http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16185833.html > Sent from the MySQL - General mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16188637.html Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
'mysql.servers' doesn't exist
Hey Folks. I'm getting this error -- I need your input or help. 080320 15:02:16 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist 080320 15:02:16 [Note] Event Scheduler: Loaded 0 events 080320 15:02:16 [Note] E:\Apps\Standard\HPRUM\MYSQL\bin\mysqld: ready for connections. Version: '5.1.23-rc-community' socket: '' port: 3306 MySQL Community Server (GPL) This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: 'mysql.servers' doesn't exist
Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist On Fri, Mar 21, 2008 at 4:23 AM, Brown, Charles <[EMAIL PROTECTED]> wrote: > Hey Folks. > > I'm getting this error -- I need your input or help. > > > 080320 15:02:16 [ERROR] Can't open and lock privilege tables: Table > 'mysql.servers' doesn't exist > 080320 15:02:16 [Note] Event Scheduler: Loaded 0 events > 080320 15:02:16 [Note] E:\Apps\Standard\HPRUM\MYSQL\bin\mysqld: ready > for connections. > Version: '5.1.23-rc-community' socket: '' port: 3306 MySQL Community > Server (GPL) > > This message is intended only for the use of the Addressee and > may contain information that is PRIVILEGED and CONFIDENTIAL. > > If you are not the intended recipient, you are hereby notified > that any dissemination of this communication is strictly prohibited. > > If you have received this communication in error, please erase > all copies of the message and its attachments and notify us > immediately. > > Thank you. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn
Re: doubt: mysqldump in linux like windows
If you skip the extend insert during mysqldump ,the process of the restore is painful. On Fri, Mar 21, 2008 at 5:05 AM, dr_pompeii <[EMAIL PROTECTED]> wrote: > > Hi Rolando > > thanks for the reply > it works, thanks, > > new command used > > mysqldump --opt --skip-extended-insert --password=XXX --user=root somedb > > /home/Someuser/somepath/A.sql > > but i see one difference > > from windows > > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > INSERT INTO `articulo` > > (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) > VALUES > ('1-15W40','ACEITE EXTRAVIDA X GLN > 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), > ('1-P0001','CASCOS DE MOTOS > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > ('1-P0003','LLANTAS DUNLOP LT > 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), > ('1-P0014','POLOS > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > > > now with the new command already shown > i have this way > > > LOCK TABLES `articulo` WRITE; > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN > 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'); > INSERT INTO `articulo` VALUES ('1-CHA01','KIT CHACARERO AZUL > (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00 > ','300','14'); > INSERT INTO `articulo` VALUES ('1-P0001','CASCOS DE MOTOS > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'); > > > i need like the windows way, thats mean, > for the first line for insertion before to insert all rows > i need > > INSERT INTO `articulo` > > (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) > VALUES > > > i tried adding --disable-keys but wierd and undesired results > > regards > > > Rolando Edwards-3 wrote: > > > > Use --skip-extended-insert as another mysqldump option > > > > -Original Message- > > From: dr_pompeii [mailto:[EMAIL PROTECTED] > > Sent: Thursday, March 20, 2008 2:43 PM > > To: mysql@lists.mysql.com > > Subject: doubt: mysqldump in linux like windows > > > > > > Hello guys > > > > i have this situation > > in widnows with the mysql administrador i make backup > > i saw in the x.sql these lines for example > > > > > > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > > INSERT INTO `articulo` > > > (`idArticulo`,`descripcion`,`stockactual`,`precioUnitario`,`precioUnitarioVenta`,`totalValorizado`,`xtraTextUnoArticulo`,`xtraNumDosArticulo`,`idLineaCategoria`,`idMedida`) > > VALUES > > ('1-15W40','ACEITE EXTRAVIDA X GLN > > 15W40','0.00','0.00','0.00','0.00','','0.00','300','11'), > > ('1-CHA01','KIT CHACARERO AZUL > > (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00 > ','300','14'), > > ('1-P0001','CASCOS DE MOTOS > > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > > ('1-P0003','LLANTAS DUNLOP LT > > 265/75R216','0.00','0.00','0.00','0.00','','0.00','300','10'), > > ('1-P0014','POLOS > > HONDA','0.00','0.00','0.00','0.00','','0.00','300','10'), > > > > > > see pls that each row is written in a unique of line of text > > > > now in linux with command in a terminal i do in this way my backups > > > > > > mysqldump --opt --password=XXX --user=root somedb > > > /home/Someuser/somepath/A.sql > > > > > > the backup is done but in this way > > > > /*!4 ALTER TABLE `articulo` DISABLE KEYS */; > > INSERT INTO `articulo` VALUES ('1-15W40','ACEITE EXTRAVIDA X GLN > > 15W40','0.00','0.00','0.00','0.00','','0.00 > ','300','11'),('1-CHA01','KIT > > CHACARERO AZUL > > (GDFGO,PORTAF,LLANT-DEL/POST)','0.00','0.00','0.00','0.00','','0.00 > ','300','14'),('1-P0001','CASCOS > > DE > > > > how you can see, all the rows appear in one line, > > dangeous, i dont want this behaviour when i open this file in windows > tell > > me if i try to save this file i will missing some values or rows > > and in linux the gedit dies :( > > > > after to read this > > http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html mysqldump > > i tried in this way > > > > > > mysqldump --opt --extended-insert--password=XXX --user=root somedb > > > /home/Someuser/somepath/A.sql > > > > with the same undesired results > > > > how i can resolve this?? > > > > thanks in advanced > > -- > > View this message in context: > > > http://www.nabble.com/doubt%3A-mysqldump-in-linux-like-windows-tp16185833p16185833.html > > Sent from the MySQL - General mailing list archive at Nabble.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://
Re: How to import oracle dump?
The following format can be supported by mysql. The first is the pure insert statement. The other is csv file. On Tue, Mar 18, 2008 at 10:00 PM, Rajesh Mehrotra <[EMAIL PROTECTED]> wrote: > > Have you tried the MySQL Migration Toolkit? Check > http://www.mysql.com/products/tools/migration-toolkit/ > > Raj Mehrotra > HCCS - Experts in Healthcare Learning > > > > > > > -Original Message- > From: Metalpalo [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 18, 2008 3:25 AM > To: mysql@lists.mysql.com > Subject: How to import oracle dump? > > > Hello > > I have got one question. > > I need to convert oracle dump file and import it to MySQl server. I have > found some utitlity OraDump-to-MySQL but it is not free and convert only > 5 > record from each table. > > Can somebody help me ? > > Thanks > -- > View this message in context: > http://www.nabble.com/How-to-import-oracle-dump--tp16115624p16115624.htm > l > Sent from the MySQL - General mailing list archive at Nabble.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] > > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn
Re: [ANN] PBXT storage engine version 1.0-Alpha released
learnt On Tue, Mar 18, 2008 at 3:39 PM, Paul McCullagh < [EMAIL PROTECTED]> wrote: > Yes, definitely. Previous versions of PBXT built on Windows, so there > can't be much work to get it going. > > But I don't think I will get around to firing up my Windows VM until > after the conference... > > On Mar 18, 2008, at 8:30 AM, Sebastian Mendel wrote: > > > Paul McCullagh schrieb: > >> Hi All, > >> I have just released the first fully durable version of PBXT. > >> Because of the amount of new code I have reverted PBXT to Alpha > >> status. This version, 1.0-alpha, can be downloaded from: http:// > >> www.primebase.org/download. > > > > will there be any Windows builds available sooner or later? > > > > -- > > Sebastian > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe:http://lists.mysql.com/mysql? > > [EMAIL PROTECTED] > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn