barry6628 Posted July 15, 2007 Share Posted July 15, 2007 Hi Very new to PHP MYSQL APACHE with WINDOWS xp Pro setting up a DATA BASE almost there I get this error Access denied for user 'SYSTEM'@'localhost' (using password: NO) any help please. regards Barry Link to comment Share on other sites More sharing options...
Illusion Posted July 15, 2007 Share Posted July 15, 2007 so u need to set a password for that account. Link to comment Share on other sites More sharing options...
barry6628 Posted July 15, 2007 Author Share Posted July 15, 2007 Hi thanks for your help I have trid to set password did this at mysql> mysql -u root mysql >SET PASSWORD FOR root@localhost=PASSWORD('24086628'); >FLUSH PRIVILEGES; I still get the same problem. Am I setting the wrong password?? Regards Barry Link to comment Share on other sites More sharing options...
fenway Posted July 16, 2007 Share Posted July 16, 2007 you sure that actually worked? Like there's something in the user tables? Link to comment Share on other sites More sharing options...
barry6628 Posted July 16, 2007 Author Share Posted July 16, 2007 Hi thanks again for etting back to me. Im sorry for being dumb with this. Ive set a new data base called it company Ive created a table called it employee with the following (and this was out of the book) empID a firstname a lastname an email a phone and a PRIMARY KEY. I granted all rights to barrymd@localhost and checked that had registered . I dont understand Access denied for user 'SYSTEM'@'localhost' (using password: NO) why does this denial talk about SYSTEM@localhost when Im tring to access barrymd@localhost Regards Barry Link to comment Share on other sites More sharing options...
fenway Posted July 17, 2007 Share Posted July 17, 2007 Not sure, but that's obviously the problem... are you sure you're actually connecting as this user? Link to comment Share on other sites More sharing options...
barry6628 Posted July 17, 2007 Author Share Posted July 17, 2007 I think as I learn more Im gettin nearee the answer. I switched on Display_startup_erroes = on Restarted Apache and got the following: Unable to load dynamic library C:\php5\ext\c:\php5\ext\ The specified module could not be found. Were is this set?? Also c:\php5\ext php_sqlite.dll The specified module could not be found. Regards Barry Link to comment Share on other sites More sharing options...
fenway Posted July 17, 2007 Share Posted July 17, 2007 php.ini file. Link to comment Share on other sites More sharing options...
barry6628 Posted July 17, 2007 Author Share Posted July 17, 2007 Hi thanks thats stoped the start up problems but ive still got the original problem about connecting Access denied for user 'SYSTEM'@'localhost' (using password: NO) The bit I dont get is the SYSTEM how do I put a pssword on to the SYSTEM?? Thanks agin for staying with me I know together we will win. Regards Barry Link to comment Share on other sites More sharing options...
solinent Posted July 17, 2007 Share Posted July 17, 2007 post the code you're using to connect? Link to comment Share on other sites More sharing options...
barry6628 Posted July 18, 2007 Author Share Posted July 18, 2007 Hi here is the code Ive tried. <?php $username = "barrymd@localhost"; $password = "24086628"; $hostname = "localhost"; mysql_connect($hostname,$username,$password) or die("Could not connect to server:<br />" . mysql_error()); echo "connected"; mysql_select_db("company") or die( "Unable to select database:<br />" . mysql_error()); echo "selected db"; $query = "INSERT INTO employee VALUES ('','$first','$last','$phone','$mobile','$fax','$email','$web')"; mysql_query($query) or die( "Unable to run query (<tt>$query</tt>:<br />" . mysql_error()); mysql_close(); echo "all done"; ?> Regards Barry Link to comment Share on other sites More sharing options...
fenway Posted July 18, 2007 Share Posted July 18, 2007 I don't think you're supposed to have the @localhost in the username. Link to comment Share on other sites More sharing options...
barry6628 Posted July 18, 2007 Author Share Posted July 18, 2007 Hi Ive taken that out ie @localhost and its still the same Regards Barry Link to comment Share on other sites More sharing options...
fenway Posted July 18, 2007 Share Posted July 18, 2007 Are you in "SQL safe mode"? Link to comment Share on other sites More sharing options...
prcollin Posted July 19, 2007 Share Posted July 19, 2007 Hi Ive taken that out ie @localhost and its still the same Regards Barry I am in the same boat as you man i have tried everything with no success Link to comment Share on other sites More sharing options...
barry6628 Posted July 19, 2007 Author Share Posted July 19, 2007 Hi again Hope you have a good day. I dont think im in safe mode ; ; Safe Mode ; safe_mode = off Thats from my php.ini Regards and thanks again for your patients . Barry Link to comment Share on other sites More sharing options...
fenway Posted July 20, 2007 Share Posted July 20, 2007 Well, it seems strange that you're getting SYSTEM as your username. Link to comment Share on other sites More sharing options...
barry6628 Posted July 20, 2007 Author Share Posted July 20, 2007 Hi any idea what could be causing this problem Regards Barry Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2007 Share Posted July 20, 2007 Thread Locked. Answer posted here. Link to comment Share on other sites More sharing options...
Recommended Posts