helpmeplease2 Posted February 8, 2007 Share Posted February 8, 2007 Hi, I am new to MySQL so this is probably an easy fix for you. I am running Windows XP Professional SP2 with PHP 5.2, the newest MySQL and the newest Apache. I have started up mysqld through the command prompt but when entering in "mysql" I get the error "Access denied for user 'ODBC'@'localhost' (using password: NO)". I do not have a password so whats wrong? Do I need to do anything else before I can start creating databases? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 8, 2007 Share Posted February 8, 2007 Are you sure there's no password? Check the grants table. Quote Link to comment Share on other sites More sharing options...
helpmeplease2 Posted February 8, 2007 Author Share Posted February 8, 2007 Well I never set one. I do not know how to check the grants table, nothing works. Quote Link to comment Share on other sites More sharing options...
fenway Posted February 8, 2007 Share Posted February 8, 2007 The root password should. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 8, 2007 Share Posted February 8, 2007 Don't use the mysql command on its own. You should provide at least 1 or two paramters mainly the username (-u username here) followed by the -p parameter. So the command will look something like this: mysql -u root -p If the root user has a password set mysql will prompt for a password then you just enter in your password and hit enter again (if the user doesn't have a password it will skip asking for the password). If the password is correct your will be logged into MySQL. If you use the mysql command on its own it will use the defaults set in the my.ini Quote Link to comment Share on other sites More sharing options...
helpmeplease2 Posted February 9, 2007 Author Share Posted February 9, 2007 C:\Program Files\MySQL\MySQL Server 5.2\bin>mysql -u root -p Enter password: ******** ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y ES) Well now I've got the password correct but still an error. Any ideas? Quote Link to comment Share on other sites More sharing options...
fenway Posted February 9, 2007 Share Posted February 9, 2007 Then the password is definitely incorrect. Quote Link to comment Share on other sites More sharing options...
helpmeplease2 Posted February 9, 2007 Author Share Posted February 9, 2007 I just did this: # To install the server as a Windows service manually, execute this in a # command line shell, e.g. # mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" # # And then execute this in a command line shell to start the server, e.g. # net start MySQLXY But its still not working. I dont know what to do. Quote Link to comment Share on other sites More sharing options...
helpmeplease2 Posted February 9, 2007 Author Share Posted February 9, 2007 I just did this: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html And I did a bunch of stuff which I'm not sure did what. But its now working! Thanks all for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.