Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Connecting MySQL DB to AMPPS



Threaded Mode | Print  

 Connecting MySQL DB to AMPPS, I am unable to get it to connect correctly (5 Replies, Read 25879 times)
BrandonJacobs
Group: Member
Post Group: Newbie
Posts: 4
Status:
My DB is not connecting to my sites. I am able to navigate to the localhost and when I try to login it gives these errors. I have the code into the www. folder. The db was imported into the mysql/data folder, and I have changed the PW for the mysql login to match what is in our code. Warning:  mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\Program Files (x86)\Ampps\www\dashboard\index.php on line 47

Warning:  mysqli::real_escape_string() [mysqli.real-escape-string]: Couldn't fetch mysqli in C:\Program Files (x86)\Ampps\www\dashboard\index.php on line 54

Warning:  mysqli::real_escape_string() [mysqli.real-escape-string]: Couldn't fetch mysqli in C:\Program Files (x86)\Ampps\www\dashboard\index.php on line 55

Warning:  mysqli::close() [mysqli.close]: Couldn't fetch mysqli in C:\Program Files (x86)\Ampps\www\dashboard\index.php on line 86 I wasn't with the company when the code was written. Please help.
IP: --   

Connecting MySQL DB to AMPPS
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Try connecting to database manually from Command Prompt, because it looks like your script is not able to connect to the database.

Code
C:\> "C:\Program Files (x86)\Ampps\mysql\bin\mysql" -u root -p'root-pass'


How did you change you mysql root password ?

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Connecting MySQL DB to AMPPS
BrandonJacobs
Group: Member
Post Group: Newbie
Posts: 4
Status:
I changed it in the MySQL configuration ini file and then restarted apache and mysql. I also tried changing it at AMPPS Home.
IP: --   

Connecting MySQL DB to AMPPS
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Were you able to change root password from AMPPS Home ? Default password is "mysql".

What was the output of the command above which I mentioned ?

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

Connecting MySQL DB to AMPPS
BrandonJacobs
Group: Member
Post Group: Newbie
Posts: 4
Status:
Password changed successsfully. I have attached a screenshot.
IP: --   

Connecting MySQL DB to AMPPS
BrandonJacobs
Group: Member
Post Group: Newbie
Posts: 4
Status:
I restarted the Apache server and I am able to log in just as I should be able to. The db must bne connecting now. Thanks!!!
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 16, 2024, 11:58 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.023