Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problem: SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost' (using password: NO)' #2

Closed
captainwasabi opened this issue Apr 30, 2015 · 6 comments

Comments

@captainwasabi
Copy link

I think this is saying it can't access the mysql database. Does the database need a user www-data with no password?

[Thu Apr 30 08:59:22.715398 2015] [:error] [pid 2737] [client 192.168.2.145:53860] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost' (using password: NO)' in /usr/share/wallacepos-master/library/wpos/models/db/DbConfig.php:79\nStack trace:\n#0 /usr/share/wallacepos-master/library/wpos/models/db/DbConfig.php(79): PDO->__construct('mysql:host=loca...', '', '')\n#1 /usr/share/wallacepos-master/library/wpos/models/DbUpdater.php(28): DbConfig->__construct()\n#2 /usr/share/wallacepos-master/library/installer/index.php(33): DbUpdater->DbUpdater()\n#3 {main}\n\nNext exception 'PDOException' with message 'Failed to connect to database.' in /usr/share/wallacepos-master/library/wpos/models/db/DbConfig.php:89\nStack trace:\n#0 /usr/share/wallacepos-master/library/wpos/models/DbUpdater.php(28): DbConfig->__construct()\n#1 /usr/share/wallacepos-master/library/installer/index.php(33): DbUpdater->DbUpdater()\n#2 {main}\n thrown in /usr/share/wallacepos-master/library/wpos/models/db/DbConfig.php on line 89

@captainwasabi
Copy link
Author

Ok, I created user www-data and ran the install script. I got this output:

Setup Completed Successfully!
Please remove the install/index.php file after installing, leaving it after installation is dangerous

Nothing in the error.log

However, I go in with phpmyadmin and there are no tables created.

Looked in the install.sql file and it seems to indicate that the database is named 'dev' so I created that and gave the www-data all privs on it. No dice, same results, it runs fine but no tables.

@captainwasabi
Copy link
Author

ok, got it. In library/wpos/models/db/DbConfig.php you have to set the username, password, and database for mysql.

@micwallace
Copy link
Owner

FYI You should use the method in the new readme.

Your usage has the same result but DbConfig.php may be replaced when updating.

@ferrites
Copy link

hello command to install wallacePos database schema in my localhost

@ferrites
Copy link

how can i install wallacePos database schema in my localhost phpmyadmin

@micwallace
Copy link
Owner

Follow installation guide.

Repository owner locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants