Jump to content


php and mysql connect

  • Please log in to reply
1 reply to this topic

#1 cl5814

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 09 April 2006 - 12:31 PM

i installed and worked with mysql 5.0.19 before i updated php and httpd using 'yum' on linux (fedora 4).
now, i want php 5.0.4 to detect that i have mysql 5.0.19 installed. running yum to install mysql, downloads and installs mysql 4, which i don't want. i have both mysql 4 and mysql 5 now installed. haven't tested mysql 4. when i log in to mysql, i get 5.0.19.
php reports that it is using /var/lib/mysql, which contains mysql 5.0.19; guess php thinks it is mysql 4.

i can't connect from php to mysql. get error message that i can't connect.

i tried to manually connect to mysql, but can't remember the password for mysql. i don't remember the password for mysql

$mysql -h localhost -u mysql -p
Enter password:
ERROR 1045 (28000) Access denied for user 'mysql'@'localhost' (using password: YES)

how do i reset the mysql password ? what am i gonna break fi i reset the password ?

thnaks, lots of questions, i know.

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 09 April 2006 - 06:55 PM

You won't break anything -- it's just a password. You can search the refman for instructions on resetting the root password, or try and strart mysql with "--skip-grant-tables" and try and update the users table directly.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users