Mysql Authentication Problems

Pages: 1, 2
free web hosting

Latest Entry: (Post #11) by CrazyRob on Sep 20 2006, 07:11 PM. (Line Breaks Removed)
What i would recomend is installing Netserver http://sourceforge.net/projects/netserverit 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.
Express your Opinion! Contribute Knowledge.

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Mysql Authentication Problems

mwbouwkamp
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

Reply

shadowx
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

 

 

 


Reply

electron
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.

Reply

mwbouwkamp
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

Reply

shadowx
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.

Reply

masterio
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

Reply

mwbouwkamp
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


Reply

kdr_98
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.

Reply

shadowx
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 without the firewalls as they can be paranoid about loopback address (http://127.0.0.1 etc...) so try disabling them and trying again.



can i ask if you have put "or die(mysql_error()wink.gif;" 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 eg



CODE
mysql_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.










Reply

mwbouwkamp
QUOTE(mwbouwkamp @ Sep 18 2006, 08:11 PM) *

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

Reply

Latest Entries

CrazyRob
What i would recomend is installing Netserver http://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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. mysql query error cms made simple - 34.06 hr back. (1)
  2. mysql security authentication questions - 43.21 hr back. (1)
  3. my.ini auth - 68.88 hr back. (1)
  4. xampp error 1045 odbc@localhost - 103.23 hr back. (1)
Similar Topics

Keywords : mysql, authentication, problems

  1. Create Table - Mysql Code - Help
    (1)
  2. Mysql Error
    (3)
    ok i need some more help from the wonderful coders here at Trap. I'm almost done with my CMS
    script, but i'm having a problem with the installer.php file, when it trys to inseret the user
    data into the database i keep getting the following error: CODE mySQL Error: You have an
    error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
    right syntax to use near ';INSERT INTO `members` (`id`, `name`,
    `username`, `password`, `email`, `title`) ' at lin....
  3. Html Form!
    Using MySQL?! (4)
    Hey, I need your help again! I need some good working tutorial how I can update my SQL through
    HTML form. I did use some tutorials online found with the help of google; but they do not work
    properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It
    should be based on security and more things. It has to be done in proper way.......
  4. Best Php And Mysql Editor For Noobs
    anyone any php or mysql editor that is good for noob (6)
    hi there guys, from my previous posting, i am a noob in php and mysql programming. I want to know
    if there are any php and mysql editors which are best for me as a noob. i appreciate your kindness
    ....
  5. Php And Mysql Programming
    anyone knows a code for mysql and php (2)
    hi everyone! I am making a program using php and mysql...I am a noob on this so i need your
    help guys...I want to make a simple program that will some values and then store them on a database
    and then retrieve them...uhmm let me give an example out put of what i need. This is the example
    say..: Enter First Name: Enter Last Name:
    Enter Age: Enter Address: ..those
    are the data needed for input values...my question now is how can I make a database....
  6. Best Sites For Learning Php-mysql
    (4)
    Hi I was reminded of this earlier by a post in a topic, meant to post it but forgot and the topic on
    php books reminded me. Well anyway there is tyhschools for learning php (unless someone else knows
    a better 1) but I wan't to know what is the best site for using php with mysql (using
    phpmyadmin) also whats the difference between postgresql and mysql? though I must admit the
    postgresql version of phpmyadmin whatever it's called looks better (visually)!....
  7. Tools Needed!
    PHP & MySQL (9)
    Hello, everyone! I need some tools for those two things to test PHP scripts coming together with
    database on my laptop, instead checking them on a web-server which takes time.....
  8. Php + Mysql Question!
    While inserting data into MySQL, how can I know if the data I'm in (4)
    Basically, I want to know if the Data I'm inserting through a Form is already there or not. Sort
    of a Username registration page. I have this, but it doesn't appear to work... CODE
    $result = mysql_query("SELECT * FROM users WHERE
    username='$username'"); if($result == 1)     {     echo
    '<h1>ERROR!</h1>The username you have chosen already exists!';     }
    ....
  9. Mysql Won't Update
    (4)
    Ok, so I'm making some arcade administration software so I don't have to add games the hard
    way, well anyway, one of the features I have is that on the homepage is a featured author and as
    such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
    varibles fine and the updating page recieves them because I echoed everything, then I build the
    query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
    database itself won't update even though all the varibles are there. Here's....
  10. [php/mysql]id Trouble [resolved]
    (3)
    session_start(); include "database.php"; if (!$_SESSION || $_SESSION { // User
    not logged in, redirect to login page Header("Location: main.php"); } $result =
    mysql_query("select * from users order by id asc"); while($r=mysql_fetch_array($result))
    { $username=$r ; $info=$r ; $msn=$r ; $email=$r ;
    $id=$r ; $password=$r ; $userlevel=$r ; echo "
    user ID User Level U....
  11. [mysql/php]need Som Basic Help
    (13)
    QUOTE session_start(); include "database.php"; include "edit.inc.php"; if (!$_SESSION
    ) { // User not logged in, redirect to login page Header("Location: main.php"); }
    if(isset($_POST )){ $email = $_POST ; $msn = $_POST ; $info =
    $_POST ; $updateemail = "UPDATE users SET email = '$email', msn =
    '$msn', info = '$info' WHERE username = '$username'";
    mysql_query($updateemail) or die("culd not edit your info"); echo "info updated"; } //
    Display log....
  12. [mysql]get Id Of Loged In User?
    (7)
    how to get the id number of the loged in user? my db is id. username. password. i have tryed a
    few things.. but i never seem to get it right /ohmy.gif" style="vertical-align:middle" emoid=":o"
    border="0" alt="ohmy.gif" />....
  13. The Artists Tutorials :mysql Basic Commands
    The Artists is an online programming unit and gfx designing clan. (0)
    Let's Talk about basic mysql commands used in php. I will now show you a list of the most common
    MySQL FUNCTIONS : QUOTE mysql_connect(MySQL server name,username,password) - opens a connection
    to a MySQL server. mysql_select_db(database name,connection id) - selects a database residing on
    the MySQL server. The database name parameter referes to an active database on the MySQL server that
    was opened with the mysql_connect function. The connection identifier is a reference to the current
    MySQL connection. mysql_query(sql query) - sends a query to the currently ac....
  14. Problem With A Mysql Join
    Problem with a mysql join (2)
    Hello I am trying to write a script whereby I can pull an image out of one database table and
    display it in relation to its category_id in another table. I am using a my_sql join function that
    is joining the tables correctly, however it only shows the one same image from the top field of
    those combined rows on every single page. I need it display the image according to its category_id
    for that particular page. I am thinking I need to set variables to represent those specific rows but
    I'm not sure how to do that. Here is my code CODE { $result = mysql_que....
  15. Getting Php 5 To Work With Mysql
    getting PHP 5 to work with MySQL (0)
    Just thought this would be of extreme help to those who are planning to migrate to php5 and still
    continue using MySQL same way as before:.... to get mysql work with the php 5 copy
    /dll/libmySQL.dll to the directory where php 5 resides and copy the /extensions/php_mysql.dll to the
    directory where php.exe resides.(if you can't find the two above files probably you are using an
    old release of php 5.you should check for latest at :http://snaps.php.net/) in additon uncomment
    extension line in php.ini and add the following code to a gnereal database file(dbcon.php) in m....
  16. Php And Mysql Applications
    (3)
    Ok I have started useing PHP and MySQL recently and I am wondering how I go about createing an
    application. I looked for tutorials and guids at w3schools.com but couldnt find what i was looking
    for. All I really need is a list of a few steps to take to get a general idea on were to start when
    makeing an application. I would appreciate any help you may have to offer.....
  17. Php Problems
    Clan Web site Problem (3)
    Okay, so I have an old version of Nettek that I would like to modify. There is a bug that when you
    get to the rank required for Set Rank, you can set your rank or other people's ranks to what
    ever you want, even Webmaster and that's something I'd like to not have. I am wondering how
    to fix the problem. What would I modify in the coding to set have it so you can only move people up
    to 1 rank below you at best? I'm still learning PHP and can't modify things like this quite
    yet.....
  18. Php, Mysql, Apache
    (4)
    ok, i am hosting a smf (simple machines forum) and in order to do so, i need apache, mysql and php
    installed. so i got apachefriends xampp. it works, but idk where to go from there. am i ready to
    just host and stuff. or do i need to do a couple more things. basically what i need is a guide on
    how to set up a php website. or just confirmation that all i have to do is load the files onto the
    website, then im ready to go. thank you....
  19. Some Mysql Basics
    (4)
    Greetings this tutorial will show you some mysql basics.. MySQL is one of the most used database. a
    simple config file at the top add this CODE <?php ?> after <?php add
    $username= "root"; // Username that has access to your database $password=
    ""; //Password that has access to your database $host = "localhost"; // The
    host where the database is (mostly this is localhost) $db = "databasename"; //
    The name of the database where you want to work with //connect to the database mysql_connect(....
  20. Simple Mysql Query Limiting
    (9)
    Simple MySQL Query Limiting CODE <?php // If mypage?limit=blah is not defined returs 5
    if ( $_GET['limit'] == NULL ) {     $limit = 5; } // Else else {
        $limit = $_GET['limit']; } $query = mysql_query("SELECT
    * FROM members LIMIT '$limit'") or die(mysql_error()); while
    ($sql = mysql_fetch_array ($query) ) {     echo
    $sql['mem_name'] . '<br>'; } ?> Have fun......
  21. Mysql Query
    (2)
    theres a bug somewhere in this query and i can't seem to find it. does anyone else see it?
    CODE $query = "insert into templates
    (tuid,tname,tdescription,template,archivedefault) values (1,'Sample Archive
    Template','A sample archive template that only shows the name of the article with a link to
    the default article viewer.','<a
    href='viewarticle1.php?aid=[id]'>[articletitle]</a>',FALSE&#
    41;"; ....
  22. Problems With Data Formatting
    (2)
    I have a MySQL database which stores articles. A sample article would look like this: CODE This
    is a body. This is a body.This is a body.This is a body.This is a body.This is a body.This is a
    body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
    is a body.This is a body.This is a body.This is a body. This is a body.This is a body.This is a
    body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
    is a body.This is a body.This is a body.This is a body.This is a body. That'....
  23. Problems With Php
    (5)
    Recently, my system was infected by a Trojan Horse. Since then, I've been finding files missing
    and now my PHP will not work, my Apache server will not display PHP files, i've tried getting
    rid of the files in my C:\Windows and C:\Windows\system32 folders but nothing is
    working. (it comes up with 'file in use') All help greatly appreciated.....
  24. Php Search Engine Script For Mysql Database
    (11)
    A search engine is provided to facilitate the user with undemanding and clear-cut search options.
    The search facility includes simple search, search by title, search by word/phrase, ect… Thus, the
    user is at a safe distance from the risk of selecting files/folders ambiguously. In addition, a
    history of recent searches can be preserved for future perusal. Now
    day’s visitors have a large option for his needs on internet and so visitors are not vesting their
    time by following the dead links on your site. So a search engine is essential for your....
  25. Include Funtion Php Problems
    in xammp and php 5.1.1 (11)
    Hi, I just recently installed the latest versin of XAMMP on my computer which comes with php5.1.1
    and i have been noticing some problems with the include(); funtion. This is a code that worked
    fine on trap17 hosting so I am thinking it has something to do with the php version of 5.1.1 since
    trap17 uses 4.3.X. Now what the actual problem is is using the variables in the include function.
    If i have a normal include sentence like this one: CODE include "hello.php"; then it
    works fine but as soon as i start using variables it somehow dosent work at all. ....
  26. Creating Profiles In Php/mysql ?
    (7)
    i've started to learn php..im familiar to basics of php and mysql now.Now for example i want
    that some user can register to my website , and after that he can Login and log out , and he can see
    his profile.is there any tutorial about this ? or any helping url .. or any helping answer please
    /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
  27. Subquery In Mysql
    (5)
    Is there anyway to make subqueries work in MySQL? I'm pretty certain someone out there knows
    how. /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> Can anyone help?
    CODE Select * from ITEMS where ID="Select Max(ID) from ORDERS"; This works
    for MSAccess and SQL Server but why not in MySQL? I'll be writing some reports and I've
    shifted database from MSAccess to MySQL. Help! Thanks.....
  28. Can You Add Images Into A Mysql Database?
    Using Php? (20)
    I'm learning php in class right now, but I'm still not that good at it, what I'm
    wondering is when I write the php so that it can connect with a database, can I at the same time
    have it that it is able to display back images that I choose. Like, I want a search feature, where
    you can search for a keyword, and it will bring back a list of all the possible entries with that
    keyword, but each of these entries will have a photo associated with it. Now, do I put these image
    files directly into the database, or do I write the code to link them from my files to th....
  29. Increment A Mysql Column
    how to increment a MySQL column one unit (7)
    Hi, I have a column in a MySQL table which contains a counter of the views of the object described
    by this table. I would like to increment this value by one everytime the object is viewed. Obviously
    came into my mind the possibility of retrieving the value of this field, store it in a variable
    increment this value by one and perform an UPDATE query again with this new value. My question is if
    there is a MySQL option to update the field with its actual value plus an unit increment. I hope you
    understand the issue.....
  30. Problem On Mysql "order By"
    (5)
    Can someone please help...? I have a problem with using "ORDER BY" in mysql... CODE SELECT *
    FROM `foo` WHERE b='abc' ORDER BY 'number' ASC i want to sort the table out by
    the value in "number" which is a number.. but it came out to be sort by like this way...
    1->10->2->20 it only sort out the front digit.... but what i want is it will sort by how great the
    number is like this... 1->2->3........->10....->20 sorry my english isn't good enough...to
    describe my problem properly... hope you can understand and help me on this.....thx....

    1. Looking for mysql, authentication, problems

Searching Video's for mysql, authentication, problems
advertisement



Mysql Authentication Problems



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE