Computing.Net > Forums > Web Development > cannot work with mysql using php

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

cannot work with mysql using php

Reply to Message Icon

Name: ajinkyakarande
Date: October 16, 2009 at 23:53:39 Pacific
OS: Windows Vista
Subcategory: PHP
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: jgalty
Date: October 17, 2009 at 01:52:40 Pacific
Reply:

How did you install this. I'm guessing you also installed apache. The easiest way to install all that stuff is to use WAMP http://www.wampserver.com/en/ Which install apache, php and mysql

Good luck

Midland Website Hosting


0

Response Number 2
Name: ajinkyakarande
Date: October 17, 2009 at 06:48:15 Pacific
Reply:

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.


0

Response Number 3
Name: shutat
Date: October 17, 2009 at 13:52:53 Pacific
Reply:

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 OPTION;


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

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_connect(...)
mysql_query("grant all privileges on *.* to 'test1'@'localhost' with grant option;") or die(mysql_error());

Something like that.

HTH


1

Response Number 4
Name: ajinkyakarande
Date: October 17, 2009 at 14:42:22 Pacific
Reply:

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.


0

Response Number 5
Name: andrue
Date: November 4, 2009 at 03:47:10 Pacific
Reply:

You have more easier tools like xamp.
You can find lot of freelance worker here who generally preffer to use XAMP rather than others.
http://www.freelance4free.com


0

Related Posts

See More



Response Number 6
Name: salnaz
Date: November 9, 2009 at 10:46:05 Pacific
Reply:

Hello ajinkyakarande,

You must put in ur mysql username and password.

Thats it

Mail me: salnazi@gmail.com


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: cannot work with mysql using php

Help with mysql and php? www.computing.net/answers/webdevel/help-with-mysql-and-php/4031.html

cannot connect to mysql with php www.computing.net/answers/webdevel/cannot-connect-to-mysql-with-php/2968.html

Error Running MySQL Query With PHP www.computing.net/answers/webdevel/error-running-mysql-query-with-php/960.html