mwbouwkamp 0 Report post Posted September 18, 2006 I installed the new version of both php and mysql on my computer and I am trying to work on a database. The problem is the following. Even though I have the latest version of both php and mysql, and I have created users in the new mysql version, I still get the problem that I get an error message about authentication problems. I have no clue what I am doing wrong. It did work for a short period of time, but somehow it is no longer working. Is there anyone who has a tutorial on how to install both php and mysql? I have the feeling that there are a lot of settings in my.ini and php.ini that are hard to find and hard to understand. Any help would be highly appreiciated.Marco Share this post Link to post Share on other sites
shadowx 0 Report post Posted September 18, 2006 (edited) it could be one of two things, either an error in the code you are using to connect to the database or a problem with the installation, what installation of php and swl are you using?I suggest xampp if you arent already using it as ive never had or heard of any problems with it and i find it very easy to use.If your distribution came with phpmyadmin then it should be easy enough to find and sort the problem providing it is something silly like a type or that a user's privillages arent right. IF you have already used phpmaydmin and couldnt find the problem then i would double check any code you are using to connect and use the database (this only applies if you have errors when running some kind of sql code using php) feel free to post the code in this thread if you are unsure about it, many people can quickly find any problems there might be. (PS i appologise if you have been using php and sql for years but i dont know how experienced you are!)using phpmyadmin you can just go into the users are and set the priveleges for all users, for testing purposes i would say to have the user you use in the scripts to have all privileges and once the script is complete take out any which you dont need, that will make it very easy to develop and have added security from preventing a hacker using that user to destroy your database! PS as you said it did work i think it most likely to be with some code you have written or maybe you accidentally changed a user or a table name or something small that could cause big problems. It depends when you get the message, when using php/sql code or when trying to use some kind of admin tool like phpmyadmin. Also any information like the actual error message could be helpful.Againh sorry if i sound patronising or anything but i have no idea if youve been doing this for years or minutes and want to try to cover both angles Edited September 18, 2006 by shadowx (see edit history) Share this post Link to post Share on other sites
electron 0 Report post Posted September 19, 2006 Well i feel you should rather use EasyPHP as it is better compared to XAMPP.It has all that XAMPP has and the main thing is that it is PATH indepedent. Meaning if you have EasyPHP on D:\ drive in windows and shift it to C:\ it will still work but not XAMPP.Also i think that you dont need to do changes to my.ini or php.ini .There might be a error with the code or your MySQL server might not be on. Both the PHP and the MySQL servers must be on.Please post your code that you used to connect to MySQL. Share this post Link to post Share on other sites
mwbouwkamp 0 Report post Posted September 19, 2006 Well i feel you should rather use EasyPHP as it is better compared to XAMPP.It has all that XAMPP has and the main thing is that it is PATH indepedent. Meaning if you have EasyPHP on D:\ drive in windows and shift it to C:\ it will still work but not XAMPP.Also i think that you dont need to do changes to my.ini or php.ini .There might be a error with the code or your MySQL server might not be on. Both the PHP and the MySQL servers must be on.Please post your code that you used to connect to MySQL. I can assure you that it is necessary to change things in both ini files. There are a lot of setting incorrect or not set when you try to run php and mysql on a windows machine. As far as mistakes in the code is concerned, I basically copy-pasted the code I used from a website, and as I told you it used to work. I was trying to play around with using a web-page to create new users when I noticed that a user that I already made earlier did not have the permission to make new users even though I granted all to that particular user. Then I decided to delete the user and try again. That's when the problems started. It doesn't work anymore when I creat the user with both the mysql command line and with the mysql administrator.Marco Share this post Link to post Share on other sites
shadowx 0 Report post Posted September 19, 2006 When you say you deleted the user what user did you delete? If you deleted the only user then you might have problems when trying to create a new user as you dont have a user you can log in with to create hte new user...i think...If you copied and pasted the code then you might need to change it slightly to fit your environment, such as the host, username, password, table name etc...sounds to me kinda like you deleted the only user, or have no users which have the right privileges to create a new user which could lead to a re-install i think (im not entirely sure how phpmyadmin works in relation to wether you need to be logged in as a user to create a new user. I think you do though)and as electron said make sure you switch on both php and sql services, im not sure how you do that with your installation but normally there is a central control program that lets you turn on and off the services installed or you have programs/batch files for php and sql, something like "start_php.bat" etc... make sure you run both sql and php.the code you are using would be very helpfull, only the parts where you include sql details and commands though. Share this post Link to post Share on other sites
masterio 0 Report post Posted September 20, 2006 Hi mwbouwkamp,your problem seems to abstract to me, can you post the error message such as ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) Just for advice, personally i dont like use both XAMPP or Easy PHP. It's better if you understand how to install the server (PHP, MySQL, Apache, phpMyAdmin) manual. Just read file "install.txt" on PHP direktori that you've extracted. That information is enough to run your server.Once again, pls post your error code provide by MySQL. Share this post Link to post Share on other sites
mwbouwkamp 0 Report post Posted September 20, 2006 This is the error message:Unable to connect to the database because: Client does not support authentication protocol requested by server; consider upgrading MySQL clientI do still have a user (root) and I am still able to create new users (both using the mysql command line and by using mysql administrator). Also both services are up and running.M Share this post Link to post Share on other sites
kdr_98 0 Report post Posted September 20, 2006 Have you changed anything to firewalls (Windows firewall or an other).Otherwise try to disable them and then try again to connect.If the connection works it must be some firewall settings. Share this post Link to post Share on other sites
shadowx 0 Report post Posted September 20, 2006 ok i see something interestin which is that the script you are using is attempting to use an unknown protoco and it gives one suggestion. consider upgrading MySQL client Its unlikley to be that but hey, who knows! so i reccomend checking you have the latest version of the installation you wish to use and upgrade it if you dont. if the problems persists i feel it could be something to do with the installation itself being faulty, possibly the code you are using to connect and interact with the database or possibly as saidm the security of your pc. I recomend also as said trying without the firewalls as they can be paranoid about loopback address (http://forums.xisto.com/no_longer_exists/ etc...) so try disabling them and trying again. can i ask if you have put "or die(mysql_error();" after any of your sql queries/commands? if not cvonsider putting it in as it might give more details of the error that you are having. put it just after you finish a query egmysql_query($QUERY, $LINK) or die(mysql_error();); if you do have this then any chance of showiung us the line of code you belive is causing the problem? it could be a problem with the code if its none of the above. Share this post Link to post Share on other sites
mwbouwkamp 0 Report post Posted September 20, 2006 I installed the new version of both php and mysql on my computer and I am trying to work on a database. The problem is the following. Even though I have the latest version of both php and mysql, and I have created users in the new mysql version, I still get the problem that I get an error message about authentication problems. I have no clue what I am doing wrong. It did work for a short period of time, but somehow it is no longer working. Is there anyone who has a tutorial on how to install both php and mysql? I have the feeling that there are a lot of settings in my.ini and php.ini that are hard to find and hard to understand. Any help would be highly appreiciated.Marco If you read the beginning of my original post... I did install the latest version... Share this post Link to post Share on other sites
mwbouwkamp 0 Report post Posted September 20, 2006 OK, problem solved: Don't install php and mysql, but instead install easyphp. This way most of the settings are already correct and you don't have to dig into the php.ini and the me.ini! Share this post Link to post Share on other sites
CrazyRob 0 Report post Posted September 20, 2006 What i would recomend is installing Netserver https://sourceforge.net/projects/netserver/it incorporates MySQL and PHP i use it on my pc and is very simple to use it also comes with PHPMyAdmin which should sort out your database problem if you get it again. Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 13, 2009 Error Code 1045 upon trying to run mysql from command line.Mysql Authentication ProblemsPlease Help!, After installing Xampp 1.7.2 on my Windows Vista with Service Pack 2 installed, I can access the Xampp CP. In fact, both MySQL and Apache are running. However, on trying myscq on C:windows/system32 command line. ie: C:windows/system32>mysql I get this error: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) Please help! -question by Joe Atabe Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 8, 2010 Problem starting MySQL in EasyPHPMysql Authentication ProblemsIve installed, uninstalled and installed again EasyPHP but MySQL does not load. The EasyPHP FAQ (below link) tells me that it might be the my.Ini file storing information from previous version so advises to rename the file, which I have and searched for any hidden ones and renamed those as well, still not working. Has anyone faced a similar problem and solved it? Your help is deeply appreciated. Pedro O. -question by PedroO Share this post Link to post Share on other sites