Greetings everyone, I am having a problem with PHP and mysql I have copied a script exactly off a website to open the database and insert a new user I try to access the mysql database using the root user, and enter information into the user table, this is the PHP I am using
<? include 'library/config.php'; include 'library/opendb.php'; $query = "INSERT INTO user (host, user, password, select_priv, insert_priv, update_ priv) ". "VALUES ('localhost', 'phpcake', PASSWORD('mypass'), 'Y', 'Y', 'Y')"; mysql_query($query) or die('Error, insert query failed'); $query = "FLUSH PRIVILEGES"; mysql_query($query) or die('Error, insert query failed'); include 'library/closedb.php'; ?> When I try this I get the access for user [EMAIL PROTECTED] host denied, it is driving me nuts no matter what I try I get the same thing other scripts I have tried do the same thing, have tried messing around with the config.php and opendb.php included scripts but nothing works if I run php -f opendb.php I get no errors which I think means it is working, then again I don't know. Anyone have any ideas ?? Thanks in advance Visit our websites: http://www.dailysnack.com “bite size news and gossip” http://www.express.co.uk The Worlds Greatest Newspaper http://www.dailystar.co.uk Simply The Best 7 Days A Week http://www.happymagazine.co.uk The One Stop Shopping Magazine http://www.ok.co.uk First For Celebrity News http://www.northernandshell.co.uk The Mark Of Excellence http://www.expresspictures.com Express Newspapers and OK Magazine online picture archive Also visit: The NMA: Opening Up Newspapers http://www.nmauk.co.uk ###2004### ________________________________________ Any views or opinions are solely those of the author and do not necessarily represent those of Express Newspapers ________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.If you are not the intended recipient of this message please do not read ,copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. E-mail communications may be monitored. **************************************************************************** ##EXN2000##