cannot work with mysql using php

October 16, 2009 at 23:53:39
Specs: Windows Vista
I am not able to connect to http://localhost/mysql
I have installed easy PHP but the red dot in the system tray doesnt blink. I have followed all the steps that were needed to setup PHP. PHP scripts are working but i m not able to do anything with MySQL.
Help appreciated..

See More: cannot work with mysql using php

Report •

October 17, 2009 at 06:48:15
I installed normal easy PHP setup I had some problem with sql server and it wasn't working but later on i made it work. Now if I see the log files for mysql then it says Plugin "federated" failed. I am not much aware of this thing. I even tried using wamp server but when I try running my sql statements like connecting to database it gives an error.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'test1'@'localhost' (using password: NO) in C:\wamp\www\dbtest.php on line 6
Error connecting to mysql

This is what get if I use wamp server. If anybody has solved the problem please help. Thanks in advance.

Report •

October 17, 2009 at 13:52:53
If you've got the command line client or administrator tool, login as the root user (admin account) and try

GRANT ALL PRIVILEGES ON your_database_name.*
TO 'test1'@'localhost' IDENTIFIED
BY 'some_password_if you_want_one' WITH

GRANT ALL PRIVILEGES ON your_database_name.*
TO 'test1'@'*' IDENTIFIED BY
'some_password_if you_want_one' WITH

The first line *should* create an account with full access rights for user1 when connecting from localhost

The second line *should* allow full access rights to user1 when connecting from another domain.

If you wish access to all databases, then replace your_data_base_name.* to just *.*

You can *probably* do the same thing from a php script as well... just make it a query. connect as the admin.

mysql_query("grant all privileges on *.* to 'test1'@'localhost' with grant option;") or die(mysql_error());

Something like that.


Report •

October 17, 2009 at 14:42:22
Thanks I got it working!! on wamp server. I made a mistake where the username is asked we are supposed to put root by default. But I m still looking for fixing up the easy php thing. Easy PHP 5.3.0 doesn't have internal support for mysql. Anyway thanks a lot for the help. I will post the reply once I get the solution for Easy PHP.

Report •

Related Solutions

November 4, 2009 at 03:47:10
You have more easier tools like xamp.
You can find lot of freelance worker here who generally preffer to use XAMP rather than others.

Report •

November 9, 2009 at 10:46:05
Hello ajinkyakarande,

You must put in ur mysql username and password.

Thats it

Mail me:

Report •

Ask Question