On 21-Oct-2002 porcupine wrote: > > Hello guys > Here is the problem. You may find it trivial, but it is a serious > obstacle for me. I make a database, a table in mysql and it goes fine. > Then I try to view my table with PHP. I am pretty sure that I can't > connect to the database. > In particular "$db = mysql_connect("localhost", "root", "") or die;" > statement doesn't seem to be valid. > Should I use another username, password or both? Are there any suggestions? >
Why isn't 'root' password-ed ? And it's usually a 'bad idea' to run php/Perl scripts as root. Anyhoo; to see what's going on use: $db = mysql_connect("localhost", "root", "") or die(mysql_error() ."<BR>\n"); > > Trying to solve the previous problem I face a new one: My new username > is not anymore "root", but "root@localhost". This happened during a > phonecall assistant by a friend. How did this happen? How can I > generally change my username? > > If the previous explanation is not clear all I mean is: when I try to > access mysql the: "mysql -u root" command is not valid. Instead I get > this message: "access denied for user: 'root@localhost' (Using password: > NO). > mysql -u root -p[password] --and type in the password at the prompt. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) --------------------------------------------------------------------- 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