Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Mysql Authentication Problems
mwbouwkamp
post Sep 18 2006, 06:11 PM
Post #1


Newbie [Level 1]
*

Group: Members
Posts: 22
Joined: 18-September 06
Member No.: 30,189



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
Go to the top of the page
 
+Quote Post
shadowx
post Sep 18 2006, 09:20 PM
Post #2


Look around, what do you see? Incorrect.
***********

Group: [HOSTED]
Posts: 1,118
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719
myCENT:47.88



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 smile.gif

This post has been edited by shadowx: Sep 18 2006, 09:22 PM
Go to the top of the page
 
+Quote Post
electron
post Sep 19 2006, 03:16 AM
Post #3


Premium Member
********

Group: Members
Posts: 162
Joined: 10-May 06
Member No.: 23,375
myCENT:NEGATIVE[-4.47]



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.
Go to the top of the page
 
+Quote Post
mwbouwkamp
post Sep 19 2006, 06:25 AM
Post #4


Newbie [Level 1]
*

Group: Members
Posts: 22
Joined: 18-September 06
Member No.: 30,189



QUOTE(electron @ Sep 19 2006, 05:16 AM) *

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
Go to the top of the page
 
+Quote Post
shadowx
post Sep 19 2006, 04:10 PM
Post #5


Look around, what do you see? Incorrect.
***********

Group: [HOSTED]
Posts: 1,118
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719
myCENT:47.88



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.
Go to the top of the page
 
+Quote Post
masterio
post Sep 20 2006, 05:22 AM
Post #6


Newbie [Level 3]
***

Group: Members
Posts: 49
Joined: 25-August 06
Member No.: 28,897



Hi mwbouwkamp,

your problem seems to abstract to me, can you post the error message such as

QUOTE
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: N
O)


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. ph34r.gif
Go to the top of the page
 
+Quote Post
mwbouwkamp
post Sep 20 2006, 06:25 AM
Post #7


Newbie [Level 1]
*

Group: Members
Posts: 22
Joined: 18-September 06
Member No.: 30,189



This is the error message:

Unable to connect to the database because: Client does not support authentication protocol requested by server; consider upgrading MySQL client


I 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

Go to the top of the page
 
+Quote Post
kdr_98
post Sep 20 2006, 08:38 AM
Post #8


Super Member
*********

Group: Members
Posts: 219
Joined: 30-October 05
Member No.: 13,574



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.
Go to the top of the page
 
+Quote Post
shadowx
post Sep 20 2006, 01:08 PM
Post #9


Look around, what do you see? Incorrect.
***********

Group: [HOSTED]
Posts: 1,118
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719
myCENT:47.88



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.

QUOTE
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 wit