Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 2007-10-22, 03:57 PM
Junior Member
 
Join Date: Oct 2007
Posts: 2
mcskins is on a distinguished road
Default mysql php connection issue

I am new to php and mysql. I am running debian etch php5 and mysql5.
I created some test php scripts to talk to mysql. Everything worked initially, but after about the 5th connection the php mysql connects did not work anymore.

Here is the error message I get now:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using password: YES) in /var/www/apache2-default/select.php on line 6
Unable to select database

I rebooted my box and it still does not work.

Thanks for your help!
Bill
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2007-10-23, 03:44 AM
Junior Member
 
Join Date: Oct 2007
Posts: 22
celon_php_master is on a distinguished road
Default

that becoz u don't have aceess permisions .create a user or use user as root with blank password
Reply With Quote
  #3 (permalink)  
Old 2007-10-23, 11:24 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,096
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

to expound, create a user in the database, in the user table in the mysql database.

You can just use a query, or use a tool like phpmyadmin. Just make sure the password field uses the password function.

MySQL AB :: MySQL 5.0 Reference Manual :: 5.8.2 Adding New User Accounts to MySQL
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
  #4 (permalink)  
Old 2007-10-23, 11:34 AM
Junior Member
 
Join Date: Oct 2007
Posts: 22
celon_php_master is on a distinguished road
Default

use this tool mysqlcc-0.9.2-linux-glibc22.tar.gz

i have work with this at office

194.65.100.43/pub/mysql/Downloads/MySQLCC/ - FTP Browser


create a user and start connect to mysql
Reply With Quote
  #5 (permalink)  
Old 2007-12-27, 09:56 AM
Junior Member
 
Join Date: Oct 2007
Posts: 22
celon_php_master is on a distinguished road
Default

create a user like this type in the mysql prompt

grant all privileges on *.* to nameofthe_ user@"localhost" identified by 'userpassword'
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.0 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.0 (a popular PHP IDE) and NuCoder 1.4 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:04 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.