-5

Although I successfully connected to wamp server facing the problem as above when uploaded the data and php file using FTP on a remote server.

I tried all password/username combination.

I used with this web hosting but in-vain. Please suggest something that may be obvious but not getting.

mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'uname'@'localhost' (using password: YES) in /all_pts.php on line 16

Meenesh Jain
  • 2,532
  • 2
  • 19
  • 29
  • 3
    Check for username/password and if it's correct then check for database privilege for username. – Disha V. Aug 17 '15 at 06:13
  • Thanks Disha, How could i possibly check the privilege for the remote database that i access using web-browser after entering username and password. – Aaron Waghmare Aug 17 '15 at 06:21
  • You need to login cPanel and check privileges inside `MySQL Databases` link – Disha V. Aug 17 '15 at 06:38
  • The question asked previously may be same but answer doesn't reflect about the cPanel. Besides i did not use a query through C:.......MySQL.... – Aaron Waghmare Aug 17 '15 at 09:01

1 Answers1

0

You need to create database and database user via control panel of your hosting account. Mostly cPanel is used for it. Then you need to put information of the database and database user into all_pts.php

See How to create a MySQL database in cPanel

Muhammad Hassaan
  • 7,296
  • 6
  • 30
  • 50
  • Thanks Hassan, but afraid to say that username i used to get acccess to remote database(FTP) is different that i use to get direct access in web-browser. But i will give a try. – Aaron Waghmare Aug 17 '15 at 06:19
  • @AaronWaghmare what you are using `cPanel` of any other? – Muhammad Hassaan Aug 17 '15 at 06:21
  • Yeah, i am using other cPanel for the service – Aaron Waghmare Aug 17 '15 at 06:25
  • @AaronWaghmare I have updated my answer. – Muhammad Hassaan Aug 17 '15 at 06:30
  • Yeah Hassan, i used cPanel for the service and created database from that only. Then directly copied credentials to Excel sheet along with links so i can use in all_pts.php, then replaced excel info in php file. End result is this. Thanks i will repeat the procedure so if any space or special character if added will be sorted. Will get back you soon. Thanks again – Aaron Waghmare Aug 17 '15 at 06:38
  • I got the access using same credentials to create the database in phpMyadmin. Not sure whats wrong. – Aaron Waghmare Aug 17 '15 at 06:43