Re: MySQL log in issues

2009-02-22 Thread 黄镜
Method 1(install mysql): /usr/local/mysql/bin/: ./mysqladmin -u root password 'new_password' Method 2 mysql>UPDATE user SET password=PASSWORD('new_password') WHERE user='root'; mysql>FLUSH PRIVILEGES; Method 3: mysql>SET PASSWORD FOR root=PASSWORD('new_password'); On Mon, Feb 23, 2009 at 11:38 A

Re: MySQL log in issues

2009-02-22 Thread Jim Lyons
You should have typed " ... set password = password('newpass')" You've set root's password to the encypted value of some other string. You ought to be able to get around this by starting mysql (the server process, not the client) using the --skip-grant-tables option and resetting the password. O

MySQL log in issues

2009-02-22 Thread Tim DeBoer
Hi everyone, I'm having some problems getting logged in to mysql to create a new database. I have to admit, my overall skill level with mysql is 'Entry level noob'. I just haven't ever had much need to mess with it in general, so if you want to laugh, feel free. I'll understand ;) At any rate, as

Re: book categories

2009-02-22 Thread PJ
Claudio Nanni wrote: > Hi Phil, > relax you are on track! > First a little theory. > In this case you have the so called N-to-M relationship. > While if you need to relate one book to one author(given only one author per > book!) > you have the so called 1-to-N relationship, in this case you have t

Re: book categories

2009-02-22 Thread Claudio Nanni
Hi Phil, relax you are on track! First a little theory. In this case you have the so called N-to-M relationship. While if you need to relate one book to one author(given only one author per book!) you have the so called 1-to-N relationship, in this case you have the N-to-M relationship. If you are

Problem using deterministic stored function

2009-02-22 Thread Peter Thomassen
Hi, I am using MySQL 5.0.51a. I've got a problem with a stored function. It reads as follows: CREATE FUNCTION `_contractRoot`(temp INT) RETURNS int(11) READS SQL DATA BEGIN DECLARE _parent_id INT; REPEAT SET _parent_id = temp; SEL

book categories

2009-02-22 Thread PJ
Here's a tough one... In my library I have some 62 categories where a number of books can be in several categories. Now, to relate the "categories" table(AS c) to the "book" table (AS a), I assume that I need an intermediate table "book_category" (AS d) linking d.bookID to the b.bookID and d.catego

HOW TO QUERY(SELECT) and display MULTIPLE AUTHORS

2009-02-22 Thread PJ
"SELECT b.title, b.sub_title, b.descr, b.comment, b.bk_cover, b.copyright, b.ISBN, c.publisher, CONCAT_WS(' ', first_name, last_name) AS Author FROM book AS b LEFT JOIN book_author AS ab ON b.id = ab.bookID LEFT JOIN author AS a ON ab.authID=a.id LEFT JOIN book_publisher AS abc ON b.id = abc.book

Re: left joins & concat

2009-02-22 Thread PJ
Thank you gentlemen. Questions &/or comments annotated below: Walter Heck wrote: > The 'AS' keyword for tables is just to give a table an alias by which > you can then use it in the rest of the query. In your case, when you > say 'book as b' in your query, it means that you can use b in places > w

Re: Best RAID for a DB + LVM?

2009-02-22 Thread Michael Dykman
I work for a high-volume web site and we use nothing but RAID 10 on all databases which requires a minimum of 4 disks. The write penalty for raid 5 is just too high for our application. Much of that space goes unused, but we need the stripe to keep up with the I/O. - michael dykman On Sun, Feb

Re: left joins & concat

2009-02-22 Thread Walter Heck
The 'AS' keyword for tables is just to give a table an alias by which you can then use it in the rest of the query. In your case, when you say 'book as b' in your query, it means that you can use b in places where you need to refer to the book table. eg. 'b.id' refers to the 'id' field of the 'book

Re: left joins & concat

2009-02-22 Thread PJ
Gentlemen, and all those who care, THE PROBLEM SEEMS TO BE SOLVED (for now, NEXT is HOW TO QUERY(SELECT) MULTIPLE AUTHORS AND DISPLAY THAT and then HOW TO DEAL WITH MULTIPLE CATEGORIES (heh... heh... heh ;-) : "SELECT b.title, b.sub_title, b.descr, b.comment, b.bk_cover, b.copyright, b.ISBN, c.pu

Re: left joins & concat

2009-02-22 Thread PJ
Claudio Nanni wrote: > Hi Phil, > you seem quite a bit confused! > > I would not step to use joins before understanding the 'simple' logic > behind, > otherwise you will be always confused by the syntax. > There are many, many, many resources (thanks to Tim!) > > I will try to give you a simple ove

Best RAID for a DB + LVM?

2009-02-22 Thread Waynn Lue
I currently have a RAID 5 setup for our database server. Our space is running out, so I'm looking to increase the disk space. Since I'm doing that anyway, I decided to re-evaluate our current disk array. I was told that RAID 5 isn't a good choice for databases since it's slower to write. In addi

Re: moving data to MySQL

2009-02-22 Thread Claudio Nanni
Well, it is just to have a console that is able to connect to every database, ODBC and videogames are one of the few things good about microsoft! I used it to import export data from/to access/sql server/mysql/oracle. Cheers Claudio 2009/2/22 Haidong Ji > Hi, > > Never thought of the MS Acces

Re: left joins & concat

2009-02-22 Thread Claudio Nanni
Hi Phil, you seem quite a bit confused! I would not step to use joins before understanding the 'simple' logic behind, otherwise you will be always confused by the syntax. There are many, many, many resources (thanks to Tim!) I will try to give you a simple overview of joins but please get more co