Connect to mysql

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 16
Joined: Thu Sep 04, 2003 1:31 am

Connect to mysql

Postby Steff » Fri Sep 19, 2003 8:20 am


I works under windows 2000 server. Default web site port 8082, mysql port 3036, and for the host I put localhost value.
When I try to do mysql_connect I obtain this error

Access denied for user username@localhost (using password: Yes)

Can you explain me thanks?

User avatar
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India


Postby ruturajv » Fri Sep 19, 2003 9:56 pm

go to the command prompt

get into the directory where the mysql.exe resides

type mysql
if you get the

Code: Select all


then you are not using any password and allowing annonymous logins as well
read the mysql manual and then assign a root password

then connect to mysql using this command

Code: Select all

mysql -u root -p
Password: *****

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 5 guests