+ 1
How to connect server?
3 Antworten
+ 2
Depends what you're talking about. If you're trying to log directly into your server so you can change things, you may want to use something like phpMyAdmin, which is a nice web interface for your database server.
If you're talking about from your code, then you can do this via PHP:
<?php
define('DB_NAME', 'databaseName');
define('DB_USER', 'root');
define('DB_PASSWORD', 'yourPassword');
define('DB_HOST', 'localhost');
$databaseConnection = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if ($databaseConnection->connect_error)
{
die("Database selection failed: " . $databaseConnection->connect_error);
}
?>
That's just an example. You're really vague with what you're asking, and didn't provide what you're actually using, so it's hard to answer specifically. If you want to clarify, I'll be more than happy to assist.
+ 1
thanks
0
database server