Grants
Hi, I juste installed mysq. 5.1 (alpha) and i guess i am facing some really stupid issue :) I logged in as root without probleme create a database xoops which shows when i do a show databases Now i try to give grants to a user on that datase via grant all on xoops.* to [EMAIL PROTECTED] identified by 'something'; But i keep getting this error ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'xoops' Usually this works well, unless i am too sleepy to see my mistake :) What could be the probleme ? Thanks Yann -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Grants
Well i think i found a bug or a change un behavior between mysql 5.0.0 ans mysql 5.0.1 The behavior i describe does not happen. Can anybody else confirm this ? Thanks Yann On September 22, 2004 21:51, Yann Larrivée wrote: Hi, I juste installed mysq. 5.1 (alpha) and i guess i am facing some really stupid issue :) I logged in as root without probleme create a database xoops which shows when i do a show databases Now i try to give grants to a user on that datase via grant all on xoops.* to [EMAIL PROTECTED] identified by 'something'; But i keep getting this error ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'xoops' Usually this works well, unless i am too sleepy to see my mistake :) What could be the probleme ? Thanks Yann -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complex mysql query
Thanks for the answer but it is a bit more complexe, i actually creates these sample table for the example. Here is an attachement of the structure dump. Hummm you got me to think more about my database structure withc is really good. The idea you bourght up seems really good. I am a junior developper, actually only been 2 month i really program soi now have more experience then i used to have spacially when people like yuo give me tricks , this really helps me out :-) CREATE TABLE produits ( My product table PID varchar(5) NOT NULL, Product ID titre tinytext NOT NULL, Title description text, product descrition artiste tinyint(3) NOT NULL, Artiste reference number see the artiste table image varchar(5) NOT NULL,Image name num_page smallint(5), Number of page if a book duree smallint(4), Lengthif video or cd, tape ... format tinyint(3) NOT NULL, Format of the product hardcover softcover, tape , cd, dvd ISBN smallint(10), ISBN number or serial number quantite tinyint(3) NOT NULL, Stock quantity fournisseur tinyint(4) NOT NULL, Provider ID number prix float NOT NULL, Our sales prices retail float NOT NULL, Retail Price UNIQUE PID (PID) UNIQUE PID (PID)); CREATE TABLE artiste ( ID smallint(5) unsigned NOT NULL auto_increment, artiste ID number nom varchar(15) NOT NULL,artiste name UNIQUE ID (ID)); CREATE TABLE fournisseurs ( My provider table ID tinyint(5) unsigned NOT NULL auto_increment,Provider ID Nom varchar(20) NOT NULL, Provider Name adresse1 varchar(50) NOT NULL, addresse1 adresse2 varchar(50), address2 ville varchar(20) NOT NULL, city province varchar(20) NOT NULL, state/province pays varchar(30) NOT NULL, country telephone varchar(20) NOT NULL,phone number fax varchar(20), fax email varchar(25), site_web varchar(30), website pers_ressources varchar(40), person to contact num_compte varchar(20) NOT NULL,account number code_postal varchar(7) NOT NULL, Postal code UNIQUE ID (ID)); I got more tables but the others are not interesting in the specific query i want to make. What do you think about this structure. If you want teh files are also attatched in txt format so you can take a look at it in TextPad. :-) Thanks for your comments i really appreciate :-) Yann - Original Message - From: "Bob Hall" [EMAIL PROTECTED] To: "Yann Larrivée" [EMAIL PROTECTED] Sent: Wednesday, March 28, 2001 6:14 AM Subject: Re: Complex mysql query Sorry i think this is my mistake the format that i gave did not get reoected by the mailing liste so my structure is provider books music video provider_id title title title provider_name provider_id provider_id provider_id I am making a smal search engine for the site. people can look up all the books, cd, video from a specific provider. So i need to out put all the title that correspond to the "keyword they entered" witch would be the providers name right ... and the providers name Yann - Original Message - From: "Bob Hall" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 8:26 AM Subject: Re: Complex mysql query Hi everybody. I got a complexe question well according to me. I am working with PHP and i am making some queries to some database. here is a description of the tables. provider book video music provider_id title title titlename provider_id provider_id provider_id I need to select all the title from book, video, music that matches a provider name and not a provider id. I know i can make 2 queries to do it but i am shure i can do a complexe join somewhere that would allow me only to connect once. I want to do it this one because to connect twince to a db could slow down the performance. This problem goes beyound my knowledge of MySQL a bit of help would be appreciated :-) Thanks Yann Larrivée www.ProtonicDesign.Com Sir, I doubt that you have a table with three columns with the same name. If I am wrong, then your copy is MySQL is broken. If your table structure is what I think it is (It's impossible to be sure from your description), it's going to cause you a lot of problems. Get a book on relational database design and learn to normalize tables. In the interim, if you post a description of what you are trying to do, there are a number of active contributors here who can make suggestions for a schema. Sir, I apologize for mis-reading your schema. The textbook way of describing a table structure is table_name(column1_name, column2_name, ...) A more common representation on the list is table_name column1_name, column2_name, ... or to
Re: MySQL books
I got the PaulDubois book , but i made a mistake i bought the transaltion in french. An advice to all others who are thinking of buying it in french if you can buy it in englis , Yann - Original Message - From: [EMAIL PROTECTED] To: "Lindsay Adams" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, March 28, 2001 11:22 PM Subject: RE: MySQL books I was at the store tonight. Did not see an O'Reilly book but believe I saw the book by Paul DuBois. There was also a book, one of the Teach Yourself (MySQL) in 21 Days, series. Anybody familiar with that one? John Jackson [EMAIL PROTECTED] -Original Message- From: Lindsay Adams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 7:29 PM To: [EMAIL PROTECTED] Subject: Re: MySQL books The O'Reilly MySQL msql book is not bad, but then I bought Paul DuBois' book, and now I only use the command reference at the back of the O'Reilly book for quick lookups. I like the way it is layed out. Every other question relating to MySQL has been answered by Paul's book. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Complex mysql query
Hi everybody. I got a complexe question well according to me. I am working with PHP and i am making some queries to some database. here is a description of the tables. provider book video music provider_id title title title name provider_id provider_id provider_id I need to select all the title from book, video, music that matches a provider name and not a provider id. I know i can make 2 queries to do it but i am shure i can do a complexe join somewhere that would allow me only to connect once. I want to do it this one because to connect twince to a db could slow down the performance. This problem goes beyound my knowledge of MySQL a bit of help would be appreciated :-) Thanks Yann Larrive www.ProtonicDesign.Com Sorry if this is the second post i got a problem while sending it...
Re: Complexe query ....
But could i use something like a subselect ... I know they are not supported by mysql but i see in my book that there is a substitute for it. Also i am not to familiar with LEFT JOIN ... and all those ... can you give me explanation ? So really would it make what would be the real answer to my problem , make 2 databse query, make a LEFT OUTER JOIN or the substitute for subselect withch i have noclue of... ? To make 2 queries seems more simple i would record the result from the first one in a varaible then use the variable in the other query. But this is not really optimised this way. Thanks Yann - Original Message - From: "Cal Evans" [EMAIL PROTECTED] To: "Ren Tegel" [EMAIL PROTECTED]; "Amazing-Books.Com" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 10:53 AM Subject: RE: Complexe query Wouldn't using LEFT OUTER JOINs in your query work instead of just a where clause? It still wouldn't give the optimum response but it would probably give a usable one. Unfortunately, I don't see a way to do what the user really wants to do in MySQL. In MySQL, the UNION clause does not mean what it means in other implementations of SQL. In M$ SQL you could use the UNION to aggregate 3 different select's into a single result set, thus giving him 1 result set with all books, movies and music from a single provider. I usually add a field at the end of each SELECT that contains a constant representing the source for that record. Cal http://www.calevans.com -Original Message- From: Ren Tegel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 9:43 AM To: Ren Tegel; Amazing-Books.Com; [EMAIL PROTECTED] Subject: Re: Complexe query excuse me, this just wouldn't work. and excuse last unfinished message. if one on of the tables matches none, the query will return no match, which is maybe not what you want. else it'll return all data matched against each other, which is again not likely what you want (since you get multiple results for each table). guess you'll have to query each of the music, video and book tables seperate to return sensefull results (read: presentable results). only circumstance when this give nice results is when each book/video/music table contains exactly one match. sorry for too rapid answering... regards, rene - Original Message - From: "Ren Tegel" [EMAIL PROTECTED] To: "Amazing-Books.Com" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 5:16 PM Subject: Re: Complexe query select book.title, video.title, music.title from provider, book, video, music where provider.name='providername' and book.provider_id=provider.provider_id and video.provider_id=provider.provider_id and music.provider_id=provider.provider_id; - Original Message - From: "Amazing-Books.Com" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 10:39 AM Subject: Complexe query Hi everybody. I got a complexe question well according to me. I am working with PHP and i am making some queries to some database. here is a description of the tables. provider book video music provider_id title title title name provider_id provider_id provider_id I need to select all the title from book, video, music that matches a provider name and not a provider id. I know i can make 2 queries to do it but i am shure i can do a complexe join somewhere that would allow me only to connect once. I want to do it this one because to connect twince to a db could slow down the performance. This problem goes beyound my knowledge of MySQL a bit of help would be appreciated :-) Thanks Yann Larrive www.ProtonicDesign.Com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php