Cougar Posted November 29, 2009 Report Share Posted November 29, 2009 Sorry for the wrong title, but I had a bunch of questions, most of which I resolved by searches and other things. What's left makes me crazy in that it's so basic. So when I originally posted this post I forgot to change the title, and for whatever reason, I'm not seeing the button or other control to delete the post and start over. I apologize in advance for my lack of what may be common information. I'm a newbie on a huge programming mission that will take me several years, I don't work as an IT professional, and my time is limited by being a caregiver for a disabled person. I've done the CRUD tutorial on the NetBeans site and the first half of PHP for Dummies, so I have a UniServer v5 Nano system that's working--from within NetBeans. Now I'm working my way through the O'Reilly Learning PHP, MySQL, and JavaScript book. I have four more PHP books as well, but none of these helps me with real simple questions that I'm supposed to be smart enough to figure out. The O'Reilly book wants me to learn how to access MySQL as root from the command line with no password. However, this doesn't work. {ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)} When I try to use the common passwords that I would normally use, it doesn't work as well. When I go into phpMyAdmin, I find a place to change my password as root, but I'm afraid to do so for fear that I'll break all the things that are working right now. I've verified my password at C:\PHP\UniServer\htpasswd\home\admin\www\.htpasswd and C:\PHP\UniServer\htpasswd\home\ssl\.htpasswd. How can I log into MySQL from the command line without breaking the system that I've put together that is working for all other things? This seems like sort of basic information. Sorry for being such a non-techie. Quote Link to comment Share on other sites More sharing options...
Cougar Posted November 29, 2009 Author Report Share Posted November 29, 2009 Oh, yeah, when I first tried to sign in from the command line as root with no password as suggested in the O'Reilly book, I was no more successful. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Quote Link to comment Share on other sites More sharing options...
Ric Posted November 29, 2009 Report Share Posted November 29, 2009 Hi Cougar To save a bit of typing I would recommend adding this batch file to folder UniServer: Create a text fie named Start_Console.bat with the following content:cd usr\local\mysql\bin start "UNIFORM SERVER MySQL Command prompt" cmd.exe /k "COLOR B0"Start the servers and then run the above batch file. It opens a command widow allowing you to run a MySQL prompt. To log into MySQL from a command line type the following mysql –uroot –proot -u stands for user name. Uniform Servers default is root-p stands for password. Uniform Servers default is root To exit the mysql prompt type exit Note: After experimenting if you think the MySQL password has become broken use the MySQL password restore. Click on UniTrary > Advanced > click MySQL password restore This restores defaults, name=root and password=root This page is a little dated however it may be worth a read:http://wiki.uniformserver.com/index.php/MySQL_Console If you want to start a command prompt at same time as the servers check out this page:http://wiki.uniformserver.com/index.php/5.0-Nano:_Control All the bestRic Quote Link to comment Share on other sites More sharing options...
Cougar Posted December 4, 2009 Author Report Share Posted December 4, 2009 Thanx. That worked. 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.