MySQL Can't connect, please help me

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pleo
Forum Newbie
Posts: 1
Joined: Sun Sep 01, 2002 6:25 pm

MySQL Can't connect, please help me

Post by pleo »

Every time i try to connect to my MySQL database via a php script I get this error:


Warning: Access denied for user: 'weston@localhost' (Using password: YES) in /var/net-x/sql/dataman.php on line 71

Warning: MySQL Connection Failed: Access denied for user: 'weston@localhost' (Using password: YES) in /var/net-x/sql/dataman.php on line 71


Can anyone direct me on how to fix this?

I am running Redhat 7.3 with the newest versions of Php and MySQL.

-thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

wrong user/password-combination for mysql_connect
User avatar
gite_ashish
Forum Contributor
Posts: 118
Joined: Sat Aug 31, 2002 11:38 am
Location: India

Post by gite_ashish »

for debugging, befor trying into php, you can try to connect to mysql server from command line, something like:

Code: Select all

mysql -u <username> -p

and see even if this works or not !?!?
Tzicha
Forum Newbie
Posts: 8
Joined: Wed Sep 04, 2002 9:54 am

Post by Tzicha »

User weston does not have permission to login. This may be for a variety of reasons:
1. No permission granted to login from the host
2. No permission to access the database specified
3. No permission to access the MySQL server.

Read the MySQL manual on security and user permissions
http://www.mysql.com/doc/
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

It is also possible that weston has not been added as a user.

Mac
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

gite_ashish wrote:for debugging, befor trying into php, you can try to connect to mysql server from command line, something like:

Code: Select all

mysql -u <username> -p

and see even if this works or not !?!?
Do you use those type of actions in a Command prompt environment? Because I've seen that type of commands everywhere.
Image Image
Post Reply