mysqli_connect with phpmyadmin
Posted by: Rds (---.as13285.net)
Date: September 24, 2011 09:19PM

Hi I’m hopping that someone can help me sort out a problem. I have created my database and a table and am not able to connect to the database using WAMP servers phpmyadmin and FireFox. The error shows in an orange box:


( ! ) Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'Brian47'@'localhost' (using password: YES) in C:\wamp\www\GuitarWars\index.php on line 19
Call Stack
# Time Memory Function Location
1 0.0019 375176 {main}( ) ..\index.php:0
2 0.0050 375944 mysqli_connect ( )
..\index.php:19


This is the index file for the respective site ‘c:\wamp\www\guitarwars\index.php’ I have this working on my webspace but I cannot get it to work from localhost. I’m thinking that I have not set up the connections correctly or that I have not configured the correct files. The actual code I have used is: ‘$dbc = mysqli_connect('localhost', 'Brian_47', 'Keep_73', 'gwdb');’. The database details are all correct so I can only think it is the correct naming/call to the ‘localhost’. I will be most grateful for any help that you can supply.





Edited by Moderator:
Please, check my comment below



Edited 1 time(s). Last edit at 09/25/2011 01:01AM by yfastud.

Options: ReplyQuote
Re: mysqli_connect with phpmyadmin
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: September 24, 2011 10:15PM

please dont post so much stuff on the forum for such a simple error

( ! ) Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'Brian47'@'localhost' (using password: YES) in C:\wamp\www\GuitarWars\index.php on line 19



you didnt make a user called BRIAN47 in mysql on wamp.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: mysqli_connect with phpmyadmin
Posted by: yfastud (Moderator)
Date: September 25, 2011 01:02AM

You need to setup DB account before running the script

You should setup Backup right after setup Wamp successful, so you can go back if something wrong later
To setup Backup, follow this
[blog.jlbn.net]

To setup Password, follow this
[blog.jlbn.net]

To setup Database Account, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: mysqli_connect with phpmyadmin
Posted by: Rds (---.as13285.net)
Date: September 26, 2011 10:44PM

Hi,Thanks for the advice. I have followed it to the letter but to no avail as the fault remains the same. I cannot help thinking that I have missed some part of the setup out. I have my file setup as C:\wamp\www\index.php. I can start the Wamp server and run the info.php. I have the db setup and runningwith the user 'Brian47' and password correct. I can only think this is the connection to the local host call from the line of the scrip: $dbc = mysqli_connect('localhost', 'Brian47', 'Keep_1973', 'gwdb') or die('Error connecting to MySQL server.');. I have tried localhost:80 and 8080 and 3306. Using localhost:3306 has given me an improvement that I now have the page I want with errors on every entry to the page. One thing I can think of is that I have NetBeans on my computer and I'm thinking that htis may have a coppy of apache. Does any one know if this may cause probems as I would like a finite answer befor I go ahead and delete NetBeans.
Thanks again for any help you can give.
BFN
RDS

Options: ReplyQuote
Re: mysqli_connect with phpmyadmin
Posted by: yfastud (Moderator)
Date: September 27, 2011 12:55AM

You guess it right; if you setup NetBeans after install wamp successful then you can run Java on wamp, but if you've already had if before installing wamp, most likely your wamp does not run properly sad smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.