April 30, 200818 yr I'm following lynda.com's php and MYSQL essential training. Well, I was setting up a MYSQL password, and typing exactly what the guy say's to type in the video, but it keeps giving me an error. I typed in this: >use mysql it returns: Database Changed. I type in this: >UPDATE user >SET Password=PASSWORD<'mypasshere'> >WHERE user='root'; It's supposed to say query okay etc. but instead it says: "error 1064: (42000) you have an error in your SQL syntax." I tried uninstalling, reinstalling, blah blah blah, I've tried EVERYTHING I can think of, and it still gives the error... I need to get my PHP training on, but I can't get past the 2nd step So can anyone solve this? -AgentMES
April 30, 200818 yr Afaik you should be entering this instead: UPDATE user SET Password='YOURPASSWORD' WHERE user='root';
April 30, 200818 yr Afaik you should be entering this instead: UPDATE user SET Password='YOURPASSWORD' WHERE user='root'; Personally i would use W3schools to start off! You will learn the fundimentals of Php & mysql alot quicker! Also download a good text editor like Jedit to practise with! Good luck.
April 30, 200818 yr Author YES!!!! ROB!! YOU'VE DONE IT AGAIN! WOOHOO! I can't believe that... Your a genius. lol @Andy08 Personally I learn faster with videos. W3 schools is a good place to go to though...
May 1, 200818 yr >UPDATE user>SET Password=PASSWORD<'mypasshere'> >WHERE user='root'; I think the tutorial here was suggesting you use the mysql PASSWORD() function. This function returns an encrypted string so that you are not storing your password as plain text in your database. The PASSWORD() function is used by the authentication system in MySQL Server so I think you are required to use it when changing a password. However, dont use it in your own applications, you can use MD5 or somthing else. It seems either you or the site used "<" instead of "(" as the correct syntax is exactly the same but using parenthesis (curved brackets) This should work: UPDATE user SET Password=PASSWORD('mypasshere') WHERE user='root'; You can find out more about the MySQL password function here: http://dev.mysql.com/doc/refman/5.0/en/enc...nction_password
Create an account or sign in to comment