Post by ebtech » Tue Nov 20, 2007 12:01 pm

I've been wrestling with Opencart for 2 weeks now on my local machine. Been installing/reinstalling many times on two different debian based distros. A few times I got it to install. Many more times (90%) I kept getting this error after the database user/password entering page.

Error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using password: NO) in /home/user/public_html/library/database/database.php on line 16
Error: Could not make a database connection using @


Update:
I think I may have found the answer  ???  at least it installed this time. Evidently debian (Kubuntu,Mint) has www-data as the "system" apache user account or something. I had to create a user named www-data with no password and all privileges in mysql. I deleted the previously unsuccessful install of opencart 0.7.7 and re-extracted it to my chosen folder, changed permissions, and ran the install again. It was successful this time.

The really strange and curious thing is----I've been playing with Zencart at the same time. Reinstalled it many times BEFORE I created the www-data mysql user and it installed perfectly everytime. Is there possibly something odd in the Opencart install config that causes this error on debian based systems? I don't know enough about it to tell but I can say it has been a frustrating experience.

Update 2:

Well it seems I may have spoken too soon. The successful install above was on the Mint partition. I tried last night to reinstall on the Kubuntu partition after taking the above steps and I'm getting the same error. Both are running identical Apache2, Mysql, PHP5 servers. If I were to try reinstalling on the Mint partition right now I'll bet it wouldn't work. I don't get it. It seemed like Mysql Administrator was acting a little squirrly so I tried adding the www-data user with both phpmyadmin and with Webmin just to be sure. Maybe there is a bug with mysql and the add user process or something.

I'm at my wits end with this but at least I have a successful install of Opencart I can play with  ;D
Last edited by ebtech on Wed Nov 21, 2007 2:35 am, edited 1 time in total.

Newbie

Posts

Joined
Mon Nov 12, 2007 7:59 am
Who is online

Users browsing this forum: No registered users and 4 guests