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

Can't access database #104

Open
Helen300 opened this issue Jun 18, 2019 · 11 comments
Open

Can't access database #104

Helen300 opened this issue Jun 18, 2019 · 11 comments

Comments

@Helen300
Copy link

Hello, I'm a beginner programmer trying to set up the MySQL database with the php server, but I'm having trouble accessing the database. Whenever I go to http://localhost:8080/gpstracker/php/updatelocation.php

I get this error and I'm not sure how to debug this.

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'gpstracker_user'@'localhost' (using password: YES) in /opt/lampp/htdocs/gpstracker/php/dbconnect.php:24 Stack trace: #0 /opt/lampp/htdocs/gpstracker/php/dbconnect.php(24): PDO->__construct('mysql:host=loca...', 'gpstracker_user', 'gpstracker') #1 /opt/lampp/htdocs/gpstracker/php/updatelocation.php(2): include('/opt/lampp/htdo...') #2 {main} thrown in /opt/lampp/htdocs/gpstracker/php/dbconnect.php on line 24

@coose2018
Copy link

I'm curious does it function yet?

@brentfraser
Copy link
Collaborator

I think Nick considers this project to be archived and he may not be monitoring it anymore, but I'll try to help.

The obvious question is can you access your database using the user name and password stored in dbconnect.php?

@coose2018
Copy link

coose2018 commented Jan 27, 2020 via email

@brentfraser
Copy link
Collaborator

I'm confused. Does the "gpstracker_user" in your MySQL database have a password? Did you follow the instructions on https://www.websmithing.com/2014/01/20/quick-start-guide-for-gpstracker-3/ ?

@coose2018
Copy link

coose2018 commented Jan 27, 2020 via email

@coose2018
Copy link

coose2018 commented Jan 27, 2020 via email

@brentfraser
Copy link
Collaborator

The zip file is fine. There are two parts to GPSTracker: one is the mobile phone app (you can install it from the Play Store). The other is the server code. You install it on your server by unzipping the zip file and configuring it by modifying the dbconnect.php file to point to your server.

The Quick Start Guide says you must create a username and password for your MySQL database. Did you do that?

@coose2018
Copy link

coose2018 commented Jan 27, 2020 via email

@coose2018
Copy link

coose2018 commented Jan 28, 2020 via email

@brentfraser
Copy link
Collaborator

It works fine if you follow the instructions to set up your server.

@coose2018
Copy link

coose2018 commented Jan 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@brentfraser @Helen300 @coose2018 and others