Please my html files in the ftp say there’s access denied to my sql db.Please help me
access denied means the connection has invalid password. is the password same with your cpanel?
or have you changed your password
Please also read this:
okay i solved that but now it’s saying,no such file or directory
From the same article I posted:
No such file or directoryis shown when you’re trying to use
localhostas your database hostname. Using
localhostmeans your script will look for the database on the same server as your website, which will not work on InfinityFree.
The database hostname should look like
sql123.epizy.com, but the exact value depends on your account. You can find your database hostname in your control panel under MySQL Databases.
sorry for the late reply,my connection variable in my php points to the sql hostname sql103.epizy.com
I suggest you define the connection details in different variables, for example:
define("DBHOST", "your database host"); define("DBUSER", "your database username"); define("DBPASS", "your database password"); define("DBNAME", "your database name");
and then connect to the database by creating a variable called
$conn that equals to calling
mysqli_connect or calling a new mysqli object with the defined variables
DBNAME. So you know easily what database details are to be inserted, and not commit any errors while inserting them.
I’ll try that but do i have to grant some privilege to the db using the sql commands since the phpmyadmin of xampp doesnt require that much given its simple interface in granting user privelege
You don’t need to grant any priviledge on the database for the user, seen that the user can access all databases created from the “MySQL Databases” section of the Control Panel.
oh okay im defining the connection variables,ill get back to you thanks for the response
okay i just defined them but its still saying no such file or directory
What is your website URL?
And what is the code you used to connect to the database?
willies.rf.gd/willies/includes/db.php or you want me to paste the whole code?
I want you to paste the whole code, because like so I can’t see it.
sql1O3.epizy.com is not the correct database host; the O is a 0, according to me!
And don’t share the password to anyone! Change it to something else, before they can access your account or things without the permissions, but don’t use the password you now have leaked!
thanks i did that but im getting the same error,
I didn’t see you did that, according to my visits.
sql1O3.epizy.com is NOT
yes please, i changed it too 103