Re: Access denied/password change
Is there any way I can change passwd of database without knowing the administrator . I'm unable to get into the mysql prompt due to access denied message.I want to change passwd.How to do this? After change passwd do you think we need to grant some priviledges? thanks Anoop kumar V [EMAIL PROTECTED] wrote: The reason i sthat you have not provided authorisation privileges to the database or to the tables within the database for that user... Very often we think granting all to the database is enough to make our app work with a particular user - this may be true for some databases - but in mysql you must do a grant all on your_database.* for that user - you must explicitly authorise the user for each table (using * or each table name) within the database. Hope that helps, Anoop On 6/4/05, Gleb Paharenko [EMAIL PROTECTED] wrote:Hello. See: http://dev.mysql.com/doc/mysql/en/access-denied.html http://dev.mysql.com/doc/mysql/en/resetting-permissions.html Seena Blace [EMAIL PROTECTED] wrote: [-- text/plain, encoding 8bit, charset: iso-8859-1, 17 lines --] Hi, I have been noticing following error when trying to connect mysql. ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) or ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) What could be reason? Is there any way I can connect to database without changing passwd? thanks - Discover Yahoo! Get on-the-go sports scores, stock quotes, news more. Check it out! -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Thanks and best regards, Anoop - Discover Yahoo! Get on-the-go sports scores, stock quotes, news more. Check it out!
Access denied
Hi, I have been noticing following error when trying to connect mysql. ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) or ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) What could be reason? Is there any way I can connect to database without changing passwd? thanks - Discover Yahoo! Get on-the-go sports scores, stock quotes, news more. Check it out!
CONCAT
hi, how to concat 2 columns to display in report? select column1concat column2 form table1; Concatenation Operator pl? thanks - Discover Yahoo! Stay in touch with email, IM, photo sharing more. Check it out!
Re: QUERY (TOP)
Thanks Shawn! Peter Brawley [EMAIL PROTECTED] wrote:Seena, That data is for one date. To test Shawn's 2-stage query I'd need a data for several days. Without your tables and data, I tried Shawn's algorithm on a test database we use a lot, nwib, which is a MySQL port of the widely used (and copied) Microsoft Northwind database. It has customers, orders, orderdetails, payments etc, and it's populated. Your question, who are the top ten spammers per day? is logically equivalent, in nwib, to: what customers made the top ten number of orders for any given year? Translating Shawn's method to nwib.orders gives us: CREATE TABLE orderstats ( yr SMALLINT NOT NULL , rank INT AUTO_INCREMENT, customerID CHAR(5) NOT NULL, ordercount INT UNSIGNED NOT NULL, PRIMARY KEY(yr,rank) ); INSERT orderstats ( yr, customerID, ordercount ) SELECT YEAR(orderdate) AS yr, customerID, COUNT(customerID) AS ordercount FROM orders GROUP BY yr, customerID ORDER BY yr,ordercount DESC which, as Shawn says, auto-populates orderstats.rank for each group. After the above executes, SELECT * from orderstats WHERE rank = 10 gives the top ten ordering customers per year, as expected. So I am unclear why the algorithm does not work for your spam table. PB - Seena Blace wrote: Peter here u go.just a few.You may see sample report. 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 1108529 | 0 | 1 |0 | 0 | | 2005-05-05 | 14140 | 0 | 0 |0 | 0 | | 2005-05-05 | 46 | 1 | 0 |1 | 0 | | 2005-05-05 | 10378 | 0 | 0 |0 | 0 | | 2005-05-05 | 16068 | 0 | 0 |0 | 0 | | 2005-05-05 | 110085 | 0 | 1 |0 | 0 Peter Brawley [EMAIL PROTECTED] wrote: Seena, I'm curious how Shawn's elegant-looking solution fails. Would you mind sending me a small data sample so I can explore his solution? Thx. Peter Brawley - Seena Blace wrote: Shawan,Here you go.mysql select * from spam_stats- where rank =10 ;+-+-+--+---+---+---+| report_date | report_sender_domain_id | rank | processed | spam | suspected |+-+-+--+---+---+---+| 2005-04-07 | 46 |1 | 22054 | 19263 |13 || 2005-04-06 | 46 |2 | 20229 | 16998 |37 || 2005-04-08 | 46 |3 | 19493 | 16443 |24 || 2005-04-05 | 46 |4 | 19322 | 15921 | 158 || 2005-04-29 | 46 |5 | 19241 | 15804 | 8 || 2005-05-02 | 46 |6 | 47732 | 15287 |82 || 2005-05-04 | 46 |7 | 91907 | 14275 |25 || 2005-04-29 | 52 |8 | 15875 | 13422 | 4 || 2005-05-02 | 52 | 9 | 56530 | 13098 |31 || 2005-05-04 | 52 | 10 |129549 | 12566 |18 |+-+-+--+---+---+---+10 rows in set (0.00 sec)[EMAIL PROTECTED] wrote:Please try my solution before you tell me it's broken, OK? I know you want to see the top 10 spammers for EACH day. That's what I wrote for you. Please try my solution with your data and get back to me with the results and explain to me what's wrong so I can fix it.Thank you for your patience,Shawn GreenDatabase AdministratorUnimin Corporation - Spruce PineSeena Blace wrote on 05/16/2005 04:41:19 PM: Shawn,query SELECT * FROM spam_statsWHERE rank = 10;will return all rows which I don't want.I need datewise top 10 spam domain.means condition would be serach those rows which are having top 10 spam (means highest) on each day and show the output like which I send [EMAIL PROTECTED] wrote:Seena Blace wrote on 05/16/2005 11:13:48 AM: shawnI think 2nd query will return only 10 rows.I want out like followingsdate domain spam05/05/05 hotmail.com 12005/05/05 yahoo.com 11005/05/05 abc.com 9905/05/05 def.com 8005/05
Re: QUERY (TOP)
Shawan, Here you go. mysql select * from spam_stats - where rank =10 ; +-+-+--+---+---+---+ | report_date | report_sender_domain_id | rank | processed | spam | suspected | +-+-+--+---+---+---+ | 2005-04-07 | 46 |1 | 22054 | 19263 |13 | | 2005-04-06 | 46 |2 | 20229 | 16998 |37 | | 2005-04-08 | 46 |3 | 19493 | 16443 |24 | | 2005-04-05 | 46 |4 | 19322 | 15921 | 158 | | 2005-04-29 | 46 |5 | 19241 | 15804 | 8 | | 2005-05-02 | 46 |6 | 47732 | 15287 |82 | | 2005-05-04 | 46 |7 | 91907 | 14275 |25 | | 2005-04-29 | 52 |8 | 15875 | 13422 | 4 | | 2005-05-02 | 52 |9 | 56530 | 13098 |31 | | 2005-05-04 | 52 | 10 |129549 | 12566 |18 | +-+-+--+---+---+---+ 10 rows in set (0.00 sec) Thanks [EMAIL PROTECTED] wrote: Please try my solution before you tell me it's broken, OK? I know you want to see the top 10 spammers for EACH day. That's what I wrote for you. Please try my solution with your data and get back to me with the results and explain to me what's wrong so I can fix it. Thank you for your patience, Shawn Green Database Administrator Unimin Corporation - Spruce Pine Seena Blace wrote on 05/16/2005 04:41:19 PM: Shawn, query SELECT * FROM spam_stats WHERE rank = 10; will return all rows which I don't want. I need datewise top 10 spam domain. means condition would be serach those rows which are having top 10 spam (means highest) on each day and show the output like which I send earlier. thanks [EMAIL PROTECTED] wrote: Seena Blace wrote on 05/16/2005 11:13:48 AM: shawn I think 2nd query will return only 10 rows. I want out like followings date domain spam 05/05/05 hotmail.com 120 05/05/05 yahoo.com 110 05/05/05 abc.com 99 05/05/05 def.com 80 05/05/05 mnpo.net 79 . like that upto 10 -- 05/06/05 yahoo.com 300 05/06/05 def.com 250 05/06/05 zer.com 200 ..like that upto 10 Each day there are multiple entry from diffrent domains or same domain. I want each day whatever top 10 spam sender domain. thanks [EMAIL PROTECTED] wrote: Seena Blace wrote on 05/16/2005 10:08:15 AM: Any suggestion pl? Seena Blace wrote:hi, here is table description report1 +-+--+--+- +-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+- +-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 | | | report_rcpt_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_sender_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_ipaddress_id | int(10) unsigned | YES | MUL | NULL | | | time | datetime | | MUL | -00-00 00:00:00 | | | detected_spam | int(10) unsigned | | | 0 | | | detected_virus | int(10) unsigned | | | 0 | | | processed | int(10) unsigned | | | 0 | | | allowed | int(10) unsigned | | | 0 | | | suspected | int(10) unsigned | | | 0 | | | blocked | int(10) unsigned | | | 0 | | | spam | int(10) unsigned | | | 0 | | | virus | int(10) unsigned | | | 0 | | I WANT REPORT LIKE FOLLOWINGS date sender processed spam suspected I want top 10 spam sender each day. QUery i'm using select date_format(time,'%Y-%d-%m'),report_sender_domain_id, processed ,spam from report1 order by spam desc ,report_sender_domain_id,date_format(time,'%Y-% d-%m') limit 10; Please suggest. thanks It was the weekend. Not everyone lurks on their days off. Try this select date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,processed ,spam ,suspected from report1 order by spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') limit 10; or if there is more than one entry per spammer per day SELECT date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,sum(processed) as processed ,sum(spam) as spam ,sum(suspected) as suspected FROM report1 GROUP BY date_format(time,'%Y-%d-%m') ,report_sender_domain_id ORDER BY spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') LIMIT 10; That will give you their total stats for each day. Shawn Green Database
Re: QUERY (TOP)
Any suggestion pl? Seena Blace [EMAIL PROTECTED] wrote:hi, here is table description report1 +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 | | | report_rcpt_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_sender_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_ipaddress_id | int(10) unsigned | YES | MUL | NULL | | | time | datetime | | MUL | -00-00 00:00:00 | | | detected_spam | int(10) unsigned | | | 0 | | | detected_virus | int(10) unsigned | | | 0 | | | processed | int(10) unsigned | | | 0 | | | allowed | int(10) unsigned | | | 0 | | | suspected | int(10) unsigned | | | 0 | | | blocked | int(10) unsigned | | | 0 | | | spam | int(10) unsigned | | | 0 | | | virus | int(10) unsigned | | | 0 | | I WANT REPORT LIKE FOLLOWINGS date sender processed spam suspected I want top 10 spam sender each day. QUery i'm using select date_format(time,'%Y-%d-%m'),report_sender_domain_id,processed ,spam from report1 order by spam desc ,report_sender_domain_id,date_format(time,'%Y-%d-%m') limit 10; Please suggest. thanks - Discover Yahoo! Find restaurants, movies, travel more fun for the weekend. Check it out! - Do you Yahoo!? Yahoo! Small Business - Try our new resources site!
output in text file /migration
Hi, I want to migrate 1 table from MYSQL to oracle ? how to do that ? How to get output of table into text file? thanks . - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone.
Re: QUERY (TOP)
shawn I think 2nd query will return only 10 rows. I want out like followings date domain spam 05/05/05 hotmail.com120 05/05/05 yahoo.com 110 05/05/05 abc.com 99 05/05/05 def.com 80 05/05/05 mnpo.net 79 . like that upto 10 -- 05/06/05 yahoo.com 300 05/06/05 def.com 250 05/06/05 zer.com 200 ..like that upto 10 Each day there are multiple entry from diffrent domains or same domain. I want each day whatever top 10 spam sender domain. thanks [EMAIL PROTECTED] wrote: Seena Blace wrote on 05/16/2005 10:08:15 AM: Any suggestion pl? Seena Blace wrote:hi, here is table description report1 +-+--+--+- +-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+- +-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 | | | report_rcpt_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_sender_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_ipaddress_id | int(10) unsigned | YES | MUL | NULL | | | time | datetime | | MUL | -00-00 00:00:00 | | | detected_spam | int(10) unsigned | | | 0 | | | detected_virus | int(10) unsigned | | | 0 | | | processed | int(10) unsigned | | | 0 | | | allowed | int(10) unsigned | | | 0 | | | suspected | int(10) unsigned | | | 0 | | | blocked | int(10) unsigned | | | 0 | | | spam | int(10) unsigned | | | 0 | | | virus | int(10) unsigned | | | 0 | | I WANT REPORT LIKE FOLLOWINGS date sender processed spam suspected I want top 10 spam sender each day. QUery i'm using select date_format(time,'%Y-%d-%m'),report_sender_domain_id, processed ,spam from report1 order by spam desc ,report_sender_domain_id,date_format(time,'%Y-% d-%m') limit 10; Please suggest. thanks It was the weekend. Not everyone lurks on their days off. Try this select date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,processed ,spam ,suspected from report1 order by spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') limit 10; or if there is more than one entry per spammer per day SELECT date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,sum(processed) as processed ,sum(spam) as spam ,sum(suspected) as suspected FROM report1 GROUP BY date_format(time,'%Y-%d-%m') ,report_sender_domain_id ORDER BY spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') LIMIT 10; That will give you their total stats for each day. Shawn Green Database Administrator Unimin Corporation - Spruce Pine - Yahoo! Mail Stay connected, organized, and protected. Take the tour
Re: select count(*) table
just give a it try select count(columnname) from table; Eric Bergen [EMAIL PROTECTED] wrote:select count(*) table; gives me a syntax error in 4.0 and 4.1 so I'm not sure how that worked. Something similar would be select count(*) t; which uses the shortcut alias syntax. It's the same as doing select count(*) as t; Simon Garner wrote: [EMAIL PROTECTED] wrote: I have a curious situation I was hoping someone could shed some light on. mysql select count(*) table; +---+ | table | +---+ | 0 | +---+ 1 row in set (0.00 sec) mysql select count(*) from table; +--+ | count(*) | +--+ | 25965 | +--+ 1 row in set (0.00 sec) I found it curious that the first query didn't return an error with there being no 'from', and even more curious that it returned a 0. Is the first query actually legit, and if so, what does the 0 mean? Yes, you can do a select without a table. This allows you to get the values of expressions or functions. E.g. SELECT 1+1 will return 2, and SELECT NOW() will return the current date and time. Your query is selecting COUNT(*) AS table rather than COUNT(*) FROM table. Naturally, without a table, COUNT(*) will return 0. -Simon -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses.
repair table/close table ?????
Hi, Here is what I see. mysql check table report_1; +---+---+--++ | Table | Op| Msg_type | Msg_text | +---+---+--++ | mailtest.report_1 | check | error| record delete-link-chain corrupted | | mailtest.report_1 | check | error| Corrupt| +---+---+--++ 2 rows in set (0.02 sec) Does repair table report_1 command fix? or anything we need to do extra? Apart from this brightmail.din_top_spam warning : 1 clients is using or hasn't closed the table properly status : OK How to close such kind of table? thanks - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone.
Re: QUERY (TOP)
Shawn, query SELECT * FROM spam_stats WHERE rank = 10; will return all rows which I don't want. I need datewise top 10 spam domain. means condition would be serach those rows which are having top 10 spam (means highest) on each day and show the output like which I send earlier. thanks [EMAIL PROTECTED] wrote: Seena Blace wrote on 05/16/2005 11:13:48 AM: shawn I think 2nd query will return only 10 rows. I want out like followings date domain spam 05/05/05 hotmail.com 120 05/05/05 yahoo.com 110 05/05/05 abc.com 99 05/05/05 def.com 80 05/05/05 mnpo.net 79 . like that upto 10 -- 05/06/05 yahoo.com 300 05/06/05 def.com 250 05/06/05 zer.com 200 ..like that upto 10 Each day there are multiple entry from diffrent domains or same domain. I want each day whatever top 10 spam sender domain. thanks [EMAIL PROTECTED] wrote: Seena Blace wrote on 05/16/2005 10:08:15 AM: Any suggestion pl? Seena Blace wrote:hi, here is table description report1 +-+--+--+- +-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+- +-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 | | | report_rcpt_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_sender_domain_id | int(10) unsigned | YES | MUL | NULL | | | report_ipaddress_id | int(10) unsigned | YES | MUL | NULL | | | time | datetime | | MUL | -00-00 00:00:00 | | | detected_spam | int(10) unsigned | | | 0 | | | detected_virus | int(10) unsigned | | | 0 | | | processed | int(10) unsigned | | | 0 | | | allowed | int(10) unsigned | | | 0 | | | suspected | int(10) unsigned | | | 0 | | | blocked | int(10) unsigned | | | 0 | | | spam | int(10) unsigned | | | 0 | | | virus | int(10) unsigned | | | 0 | | I WANT REPORT LIKE FOLLOWINGS date sender processed spam suspected I want top 10 spam sender each day. QUery i'm using select date_format(time,'%Y-%d-%m'),report_sender_domain_id, processed ,spam from report1 order by spam desc ,report_sender_domain_id,date_format(time,'%Y-% d-%m') limit 10; Please suggest. thanks It was the weekend. Not everyone lurks on their days off. Try this select date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,processed ,spam ,suspected from report1 order by spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') limit 10; or if there is more than one entry per spammer per day SELECT date_format(time,'%Y-%d-%m') ,report_sender_domain_id ,sum(processed) as processed ,sum(spam) as spam ,sum(suspected) as suspected FROM report1 GROUP BY date_format(time,'%Y-%d-%m') ,report_sender_domain_id ORDER BY spam desc ,report_sender_domain_id ,date_format(time,'%Y-%d-%m') LIMIT 10; That will give you their total stats for each day. Shawn Green Database Administrator Unimin Corporation - Spruce Pine - OK, then what you want to do will take two steps and another table (unless you want to write application code) to do with MySQL; First step is to create a table where the intermediate results can be stored. What this table does is number each row for each day. Since it appears that you may want this information frequently (but only need to update it at the end of every day) I will make this a permanent table (not a temporary table). CREATE TABLE spam_stats ( report_date date not null, report_sender_domain_id int unsigned not null, rank int unsigned auto_increment, processed int unsigned, spam int unsigned, suspected int unsigned, PRIMARY KEY (report_date, rank), UNIQUE KEY (report_sender_domain_id, report_date), KEY (rank) ); The UNIQUE key ensures that the same spammer cannot have more than one entry per day while the PRIMARY KEY allows for a groupwize autonumber (each entry per day gets it's own number, rank, starting at 1). The last key is optional but will seriously speed up the returns for the report you wanted. Next we need to populate our new table with the spam report data (filled in from most spam to least spam per domain per day). INSERT spam_stats (report_date, report_sender_domain_id, processed, spam, suspected) SELECT date(`time`) ,report_sender_domain_id ,sum(processed) as processed ,sum(spam) as spam ,sum(suspected) as suspected FROM report1 GROUP BY date(`time`) ,report_sender_domain_id ORDER BY spam desc ,report_sender_domain_id ,date(`time`); What will happen is that the rank column will be automatically filled in for each day's spam statistics. Then to get your top ten list you just run: SELECT * FROM spam_stats WHERE rank = 10; Update spam_stats at the end
QUERY (TOP)
hi, here is table description report1 +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 || | report_rcpt_domain_id | int(10) unsigned | YES | MUL | NULL || | report_sender_domain_id | int(10) unsigned | YES | MUL | NULL || | report_ipaddress_id| int(10) unsigned | YES | MUL | NULL || | time| datetime | | MUL | -00-00 00:00:00 || | detected_spam | int(10) unsigned | | | 0 || | detected_virus | int(10) unsigned | | | 0 || | processed | int(10) unsigned | | | 0 || | allowed | int(10) unsigned | | | 0 || | suspected | int(10) unsigned | | | 0 || | blocked | int(10) unsigned | | | 0 || | spam| int(10) unsigned | | | 0 || | virus | int(10) unsigned | | | 0 || I WANT REPORT LIKE FOLLOWINGS datesenderprocessedspam suspected I want top 10 spam sender each day. QUery i'm using select date_format(time,'%Y-%d-%m'),report_sender_domain_id,processed ,spam from report1 order by spam desc ,report_sender_domain_id,date_format(time,'%Y-%d-%m') limit 10; Please suggest. thanks - Discover Yahoo! Find restaurants, movies, travel more fun for the weekend. Check it out!
TOP N record
Hi, how to get top N records from table ? columns of table id date1 process wip worm I need output date1 process wip worm 5/5/05 5/6/05 5/7/05 thanks - Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more.
RE: table optimisation
How to check whae are tables are having how many indexes on which columns ? Thomas Sundberg [EMAIL PROTECTED] wrote: -Original Message- From: Seena Blace [mailto:[EMAIL PROTECTED] Sent: den 11 maj 2005 23:58 To: mysql@lists.mysql.com Subject: table optimisation Hi, I have been noticing table performanace issue when # of rows grows more.How to tune that table? Adding index on the column or columns that are often used in queries could be a start. Performing full table scan on large, unindexed tables can take quite longtime when the number of rows are increasing. /Thomas - Yahoo! Mail Stay connected, organized, and protected. Take the tour
Re: Report(query)
ROLLUP is not working with current version.IS any way i can do? I have 1 column names time with data type datetime.I want to get report like -mm-dd format. Can I get by using date_format(nameofcolumn,'%Y-%m-%d')? Harald Fuchs [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Seena Blace writes: Hi, I want report like this date process pending wip 5/10/05 10 30 40 5/11/05 09 28 60 Summary 19 58 100 select date,sum(process),sum(pending),sum(wip) from tab group by date; What command I used to show heading and what command to show sub total and total ? The last row can be calculated by the ROLLUP modifier of GROUP (requires MySQL 4.1.1 or later). Nicely formatting the output with headings etc is not the business of a database engine and should be done by your application. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Discover Yahoo! Stay in touch with email, IM, photo sharing more. Check it out!
table optimisation
Hi, I have been noticing table performanace issue when # of rows grows more.How to tune that table? thanks -Seena - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.
Report(query)
Hi, I want report like this Table description is like as follows Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | id | int(10) unsigned | | PRI | NULL | auto_increment | | host_id | int(10) unsigned | | MUL | 0 || | time| datetime | | MUL | -00-00 00:00:00 || | process | int(10) unsigned | | | 0 | | | pending | int(10) unsigned | | | 0 | | | wip | int(10) unsigned | | | 0 | | date process pending wip 5/10/051030 40 5/11/05 09 28 60 Summary 19 58 100 select date,sum(process),sum(pending),sum(wip) from tab group by date; What command I used to show heading and what command to show sub total and total ? thanks -Seena - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone.
MIGRATION OF DATABASE FROM ONE BOX TO ANOTHER BOX
Hi, How to migrate mysql database from one box to another box ? thanks -Seena - Do you Yahoo!? vote.yahoo.com - Register online to vote today!
AUTO_INCREMENT
Hi, Is there any way AUTO_INCREMENT column cann't me Primary key ? One table has one column auto_increment which I want to convert into non primary key but I also want to maintain the column.How to do that? thanks - Do you Yahoo!? vote.yahoo.com - Register online to vote today!
MYSQL CONNECT ISSUE
I have been getting following error. [polaris] ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) How to fix that? What is default port for mysqlserver? thx -seena - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
Re: Database connectivity
Hi, I wanted to setup connectivity between mysql database and oracle database.I have one database in mysql from which all tables data I want to insert real time data into oracle database.How to connect mysql database with oracle database? thanks - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
Table dump into binary
how to take binary/ascii dump of table? [EMAIL PROTECTED] wrote:AFAIK, MySQL servers can only talk to other MySQL servers and that is only through the replication protocol/connections. Beyond that you will need to make your server-to-server connections through some kind of external client. Can Oracle act as a client to foreign databases? If it cannot, I believe you will need to write some code to develop a custom solution. It may be possible to use the MySQL source code to enable your custom client to behave as a MySQL replication slave then transform the binlog entries you receive into valid Oracle statements. Other than that, I think that you would need to periodically poll the MySQL server for changes and duplicate them into your Oracle server. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Seena Blace wrote on 09/01/2004 12:30:12 PM: Hi, I wanted to setup connectivity between mysql database and oracle database.I have one database in mysql from which all tables data I want to insert real time data into oracle database.How to connect mysql database with oracle database? thanks - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
Connectivity
Hi, I have one mysql database and one oracle database.I want to fetch data from mysql db to oracle db in realtime.How to do this? I also wanted to tarnsfer 14 tables from one mysql database to Oracle how to do this? thanks - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
Database connectivity
Hi, I wanted to copy setup some procedure which pickup data from mysql and load into oracle database.How to do this? I would also like to know how to establish a connection between mysql and oracle database? thanks - Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now.
MYSQLOUTPUT
Hi, I'm getting output like select a.hostid,a.hdesc,b.ipadd1,c.make,c.model,d.name,d.version from host a,ipdet_temp1 b,makemodel c,software d,hsdet e - where a.hostid=b.hostname2 and a.makemodel=c.makemodelid and a.hostid=e.host_id and e.software_id=d.softwareid and a.hostid='dstm-db01' and b.vflag='N' order by a.hostid; hostid| hdesc | ipadd1| make | model | name | version | +---++---+---+---+---+-+ | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R | Sun OS | 8 | | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R | Oracle8i | 8171| | box1 | Server1(DB01) | xxx.xxx..xxx| Sun Micro System Inc. | E420R | DataGuard | 817 | +---++---+---+---+---+- I want the output like +---++---+---+---+---+-+ | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R |Sun OS |8 |Oracle8i |8171 DataGuard | 817 | +---++---+---+---+---+- How to do this? thx - Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today
Re: MYSQLOUTPUT
Victor I want output like noname amt 1 10 20 instead of below noname amt 1 10 1 20 thx Victor Pendleton [EMAIL PROTECTED] wrote: Are you just wanting to remove the header information? If so, then try mysql --skip-column-names On Thu, 01 Apr 2004, Seena Blace wrote: Hi, I'm getting output like select a.hostid,a.hdesc,b.ipadd1,c.make,c.model,d.name,d.version from host a,ipdet_temp1 b,makemodel c,software d,hsdet e - where a.hostid=b.hostname2 and a.makemodel=c.makemodelid and a.hostid=e.host_id and e.software_id=d.softwareid and a.hostid='dstm-db01' and b.vflag='N' order by a.hostid; hostid | hdesc | ipadd1 | make | model | name | version | +---++---+-- -+---+---+-+ | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R | Sun OS | 8 | | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R | Oracle8i | 8171 | | box1 | Server1(DB01) | xxx.xxx..xxx| Sun Micro System Inc. | E420R | DataGuard | 817 | +---++---+-- -+---+---+- I want the output like +---++---+-- -+---+---+-+ | box1 | Server1(DB01) | xxx.xxx..xxx | Sun Micro System Inc. | E420R |Sun OS |8 |Oracle8i |8171 DataGuard | 817 | +---++---+-- -+---+---+- How to do this? thx - Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today
Re: ORDER BY WITH NO PRINT
Seena Blace [EMAIL PROTECTED] wrote:Hello, I want to show outpur like this? Group hostname details aa abababa aa abababababab aa anannanananna bb llololololool bb ssjjsjsjsjjsjsj Select group,hostname,details from table1 order by group; I want the output should be like Group hostname details aa abababa abababababab anannanananna bb llololololool ssjjsjsjsjjsjsj please advice. thx -seena - Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. - Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.
ORDER BY WITH NO PRINT
Hello, I want to show outpur like this? Group hostname details aa abababa aa abababababab aa anannanananna bbllololololool bbssjjsjsjsjjsjsj Select group,hostname,details from table1 order by group; I want the output should be like Group hostname details aa abababa abababababab anannanananna bbllololololool ssjjsjsjsjjsjsj please advice. thx -seena - Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.
How to prompt variable
Hi, i want to update couple of columns like update tablename set =value1 where columname=value2; I want to run query on mysql prompt each time and enter value1 and value2 for diffrent columnname ? Value1 and value2 will be diffrent. in oracle we use to prompt value. thx Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.
PHP and Mysql
Hi, Does any one help me in formating the output result in PHP with mysql? The code is here. form action=hostrep.php method=get /form ? $username=root; $password=; $database=databasename; $host=localhost; $today = date(F j, Y, g:i a); mysql_connect($host,$username,$password); @mysql_select_db($database) or die( Unable to select database); #echo Connected successfully; #$softwareid=$_GET['softwareid']; #$softwareid1=$_GET['softwareid1']; $query=SELECT hostid,hostname,cabinetnumber FROM host; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo bcenterHost Details $today/center/bbrbr; $i=0; while ($i $num) { $hostid=mysql_result($result,$i,hostid); $hostname=mysql_result($result,$i,hostname); $cabinetnumber=mysql_result($result,$i,cabinetnumber); echo b$hostid $hostname $cabinetnumber brbr; //echo b$softwareid $manufacturer/bbrname: $namebrVersion: $versionbrhrbr; Thanks - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.
COMPOSITE PRIMARY KEY?
Hi, I want to create a table with composite Primary key.How to do that? create table ipdet (IPaddress varchar (14) not null , hostid varchar (20) not null primary key (ipaddress,hostid), IP_DESC text , MAC text, interface text); thx-seena - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
Migration from windows to linux red hat
Hi, I have 10 tables which I want to migrate from windows mysql(V4.0.17) to red hat mysql(V3.23.54).How to do that pl? Some tables are having real data also. thx -seena - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
HOW TO RUN SQL and default value ?
Hi, How to run script at mysql prompt? Like if i want to create a table or select some query and I want to put those sql statement into one file ,how to run that and what would be the extention of that query? I want to create on column which contains only default value TRUE or False.how to do that? Create table test1 (no int, flag char (6) default ... thx -seena - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
HOW TO RUN SQL
how to run sql script like if i have mysql prompt mysql at above prompt I want to run sql script. how to do this? what will be extenstion of file? Remko Lodder [EMAIL PROTECTED] wrote: mysql -p -u -e that can be runned from any shell script. use enum to check Y/N TRUE/FALSE etc. CREATE TABLE testtest ( test ENUM( 'TRUE', 'FALSE' ) NOT NULL ); it automaticly sets true as default value with me. otherwise add: DEFAULT 'FALSE' after not null Hope this helps -- Kind regards, Remko Lodder Elvandar.org/DSINet.org www.mostly-harmless.nl Dutch community for helping newcomers on the hackerscene mrtg.grunn.org Dutch mirror of MRTG -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Seena Blace Verzonden: maandag 9 februari 2004 22:14 Aan: [EMAIL PROTECTED] Onderwerp: [Mysql-discussions] HOW TO RUN SQL and default value ? Hi, How to run script at mysql prompt? Like if i want to create a table or select some query and I want to put those sql statement into one file ,how to run that and what would be the extention of that query? I want to create on column which contains only default value TRUE or False.how to do that? Create table test1 (no int, flag char (6) default ... thx -seena - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
MYSQL (SQL ERROR)
Hi, I'm using Win2k,Apache,PHP(V4) and mysql . When I'm running php page ,noticing error Notice: Undefined variable. Let me know how to fix pl? thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
PHP AND MYSQL
Hi, Does any one develop any web pages with PHP,Apache,Win2k,Mysql ? If so,can please help me. When I 'm inserting data thru html FORM ,getting error Notice: Undefined variable: like this.Can some one please send some tips pl? Html code: form action=insert.php method=post Software id: input type=text name=softwareid Manufacturer: input type=text name=manufacturer Name: input type=text name=name Version: input type=text name=version input type=Submit /form ? PHP code ? $database=testdatabase; mysql_connect(localhost); @mysql_select_db($database) or die( Unable to select database); $query = INSERT INTO software1 VALUES ('','$softwareid','$manufacturer','$name','$version'); mysql_query($query); mysql_close(); ? Let me know what is wrong pl. thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: PHP AND MYSQL
Thank you very much to all. Jason Burfield [EMAIL PROTECTED] wrote:This is probably something for the php list, however, how is REGISTER_GLOBALS set on your server? On or off? It is off by default on newer version of PHP. (has been for a while.) If it is off you need to grab the vars from post like: $softwareid = $_POST[softwareid]; $manufacturer = $_POST[manufacture]; etc, etc... Plus...are you able to connect to the db server? Use: mysql_connectd($host, $username, $password); -- Jason On Mon, 2004-02-02 at 16:07, Seena Blace wrote: Hi, Does any one develop any web pages with PHP,Apache,Win2k,Mysql ? If so,can please help me. When I 'm inserting data thru html FORM ,getting error Notice: Undefined variable: like this.Can some one please send some tips pl? Html code: Software id: [input] Manufacturer: [input] Name: [input] Version: [input] [input] PHP code $database=testdatabase; mysql_connect(localhost); @mysql_select_db($database) or die( Unable to select database); $query = INSERT INTO software1 VALUES ('','$softwareid','$manufacturer','$name','$version'); mysql_query($query); mysql_close(); ? Let me know what is wrong pl. thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
SQL CONNECTIVITY
Hi all, I have been noticing following error message with PHP. Fatal error: Call to undefined function: mysql_connect() Let me know how to fix that.I have installed linux9,apache 2.0, php. thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
RE: [Mysql-discussions] SQL CONNECTIVITY
I installed php. what is linux9? =RED HAT 9 aCTUALLY i WANT TO develop smal webbased application.I was thinking PHP,MYSQL,APACHE AND LINUX WOULD BE good,but any other combination would be great if you guyes suggest. Remko Lodder [EMAIL PROTECTED] wrote: your php is not configured to use mysql? perhaps? and just what is linux9? please install php with mysql support. -- Kind regards, Remko Lodder Elvandar.org/DSINet.org www.mostly-harmless.nl Dutch community for helping newcomers on the hackerscene -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Seena Blace Verzonden: vrijdag 30 januari 2004 17:12 Aan: [EMAIL PROTECTED] Onderwerp: [Mysql-discussions] SQL CONNECTIVITY Hi all, I have been noticing following error message with PHP. Fatal error: Call to undefined function: mysql_connect() Let me know how to fix that.I have installed linux9,apache 2.0, php. thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
RE: [Mysql-discussions] SQL CONNECTIVITY
Remko, is any parameters value do you want me change in php.ini file? which package do you want to install from redhat pl? Remko Lodder [EMAIL PROTECTED] wrote: That would be good, But installing php does not mean that mysql features are also added. Please checkout your php configuration if it is included, otherwise install the appropiate packages from redhat -- Kind regards, Remko Lodder Elvandar.org/DSINet.org www.mostly-harmless.nl Dutch community for helping newcomers on the hackerscene -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Seena Blace Verzonden: vrijdag 30 januari 2004 17:44 Aan: [EMAIL PROTECTED] Onderwerp: RE: [Mysql-discussions] SQL CONNECTIVITY I installed php. what is linux9? =RED HAT 9 aCTUALLY i WANT TO develop smal webbased application.I was thinking PHP,MYSQL,APACHE AND LINUX WOULD BE good,but any other combination would be great if you guyes suggest. Remko Lodder wrote: your php is not configured to use mysql? perhaps? and just what is linux9? please install php with mysql support. -- Kind regards, Remko Lodder Elvandar.org/DSINet.org www.mostly-harmless.nl Dutch community for helping newcomers on the hackerscene -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Seena Blace Verzonden: vrijdag 30 januari 2004 17:12 Aan: [EMAIL PROTECTED] Onderwerp: [Mysql-discussions] SQL CONNECTIVITY Hi all, I have been noticing following error message with PHP. Fatal error: Call to undefined function: mysql_connect() Let me know how to fix that.I have installed linux9,apache 2.0, php. thx -seena - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: MYSQL Database
Which version of PHP would be good for Red hat 7.3? can someone send URL from where I can download the php pl? Jochem van Dieten [EMAIL PROTECTED] wrote:Douglas Sims wrote: You should check out: http://onlamp.com/ L.A.M.P. (Linux/Apache/MySQL/Perl(or PHP) Or Linux/Apache/Middleware/PostgreSQL ;-) Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
SELECT
Hi, How to see all tables in connected database? thx -seena - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
MYSQL Database
Hi, I'm new to this group.I would like to know which frontend tools be good tuned with Mysql database like php,perl etc? I want to develop one application on linux on mysql database which eventually would be webbased.Please suggest what combination would be good. thx -Seena - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
MYSQL Database
Hi, I'm new to this group.I would like to know which frontend tools be good tuned with Mysql database like php,perl etc? I want to develop one application on linux on mysql database which eventually would be webbased.Please suggest what combination would be good. thx -Seena - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes