Equi93 Posted March 29, 2021 Posted March 29, 2021 (edited) when i am trying to connect mysql base this is what i am getting > mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) what i have to do? this is the code i am using https://pastebin.com/TnRLZXrm pls some solutions... Edited March 29, 2021 by Equi93
0 iTopZ Posted April 1, 2021 Posted April 1, 2021 (edited) funny, you only need to set the host of user that the user is allowed to connect from to. 44.2.56.12 -> you try to connect into mysql with user/pass 33.2.11.24 -> server says no this user/pass is only allowed from 127.0.0.1 or localhost you need to allow it from 44.2.56.12 simple as hell side note the problem is on server, and if you use live data not cached each user who opens your website will also open database connection meaning you ddos your server all by your self. imagine you run like hell and hit your head into a wall get up and run again into the wall. learn how to cache database data ffs its 2021 what is most amazing tho is all this answers a guy even told you to use a function that has been deprecated in 2013 and removed from php in 2015 another gives half commands that probably dont even know what it does. Access denied for user 'root'@'localhost' Edited April 1, 2021 by iTopZ
0 Equi93 Posted March 29, 2021 Author Posted March 29, 2021 (edited) 9 minutes ago, Irrelevant said: sql port is open ? yes it is, wait can sql port be closed? yes its open 3306 is port, i just checked .. Edited March 29, 2021 by Equi93
0 Irrelevant Posted March 30, 2021 Posted March 30, 2021 13 hours ago, Equi93 said: yes it is, wait can sql port be closed? yes its open 3306 is port, i just checked .. make sure the table in your navicat are named exactly the same. go to https://phpcodechecker.com/ and check the code if is that correct
0 dramaa93 Posted March 30, 2021 Posted March 30, 2021 4 hours ago, Irrelevant said: make sure the table in your navicat are named exactly the same. go to https://phpcodechecker.com/ and check the code if is that correct I have stupid question cus idk, if code is correct navicat shouldn't make table automatically? If not and if you have time can you write me table parameters?
0 tazerman2 Posted March 30, 2021 Posted March 30, 2021 (edited) first of all you need allow connect IP from website -> machine and after make a user and pass for this and check website what php rev use maybe can't read mysqli_connect() and need mysql_connect() Edited March 30, 2021 by tazerman2
0 Red-Hair-Shanks Posted March 30, 2021 Posted March 30, 2021 open workbench and run this command with the exist password you have or other. ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
0 Rootware Posted March 31, 2021 Posted March 31, 2021 Who is a owner of this table, what the privileges of owner and who owner of this PHP script file? In all cases you will get this error.
Question
Equi93
when i am trying to connect mysql base this is what i am getting >
mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES)
what i have to do? this is the code i am using
https://pastebin.com/TnRLZXrm
pls some solutions...
Edited by Equi939 answers to this question
Recommended Posts