webdevdea Posted July 31, 2013 Share Posted July 31, 2013 Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /Applications/XAMPP/xamppfiles/htdocs/HeadfirstPHP/report.php on line 29 Error connecting to MYSQL serve line 29>>>>>>>>>>>$dcb = mysqli_connect('localhost','root', 'root', 'aliendatabase') or die('Error connecting to MYSQL server.'); Quote Link to comment Share on other sites More sharing options...
requinix Posted July 31, 2013 Share Posted July 31, 2013 mysqli_connect_error Your username or password is wrong. I can say that outright because you should NEVER connect to your database as root. Make a new user just for your PHP scripts. Quote Link to comment Share on other sites More sharing options...
webdevdea Posted July 31, 2013 Author Share Posted July 31, 2013 Yeah that did not work it still has the same issue going on.. now I have a bunch of extra users in my php admin.. I am sure its a simple fix I just have no Idea how to do it.. I have looked at the php site and done everything it has suggested and it still is not working.. ?????? Quote Link to comment Share on other sites More sharing options...
jazzman1 Posted July 31, 2013 Share Posted July 31, 2013 Open up the mysql console and run mysql_secure_installation and change the root password from there. Quote Link to comment Share on other sites More sharing options...
webdevdea Posted July 31, 2013 Author Share Posted July 31, 2013 Console, do you mean the terminal or MAMP PHPMYADMIN? Quote Link to comment Share on other sites More sharing options...
jazzman1 Posted July 31, 2013 Share Posted July 31, 2013 (edited) Console or terminal is just a program that gives you access to different "shells" on the same or not machine. That's my understanding about that Yea, open up a terminal and try to run this program-http://dev.mysql.com/doc/refman/5.0/en/mysql-secure-installation.html Edited July 31, 2013 by jazzman1 Quote Link to comment Share on other sites More sharing options...
webdevdea Posted July 31, 2013 Author Share Posted July 31, 2013 when I put it in my terminal it says no such file, should I sudo it? Quote Link to comment Share on other sites More sharing options...
jazzman1 Posted July 31, 2013 Share Posted July 31, 2013 (edited) Hm..... can you give me the output of: locate mysql_secure_installation Does your database server is up? Edited July 31, 2013 by jazzman1 Quote Link to comment Share on other sites More sharing options...
webdevdea Posted July 31, 2013 Author Share Posted July 31, 2013 already loaded? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.