Posted by:
RiggsFolly
(---.dynamic.dsl.as9105.com)
Now Now calm down,
The usual answer to a question about cannot connect to mysql is that people do not bother to take a quick look at the MySQL site to find out about the default configuration of the root user account.
Lets start at the beginning - There is a Sticky post called
READ THIS BEFORE YOU ASK A QUESTION please do, and if you would not mind answering these questions it will help us in identifying your actual problem.
Then if you were to post your
1. PHP code.
2. The actual error message you are recieving.
3. Anything else that might be useful to someone who is trying to help but is not looking over your shoulder at what you are actually doing.
4. Explain what
so that the result is exactly what I need? exactly means?
If you have setup a database and a user account that is allowed access to it then the PHP code to connect to that MySQL database with the mysqli extension with the user and password you have created is :-
$mysqli = new mysqli('127.0.0.1', 'USERID', 'PASSWORD', 'DATABASENAME');
if ($mysqli->connect_error) {
die('Connect Error (' . $mysqli->connect_errno . ') '
. $mysqli->connect_error);
}
If that is basically what you have done then please supply the above requested info.
PS:
This site prime function is to help people get WAMPServer ( thats Apache/MySQL/PHP ) running.
It is not I am afraid a PHP prgramming tutorial site.
But we aim to help where we can.
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-