MySQL Forums
Forum List  »  Install & Repo

Re: Error Connecting to DataBase!: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Posted by: Peter Brawley
Date: October 10, 2017 11:44AM

> innodb_buffer_pool_size | 12884901888

70% of RAM is the innodb_buffer_pool_size recommendation. You're now close to that.

> sort_buffer_size = 10G

See https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_sort_buffer_size
for tips on setting sort_buffer_size, which is per session, so with 16G RAM it's bound to induce swapping to the virtual memory swap file, which will slow performance to a crawl, as you observe.

One more item though it's off-topic for this forum. The connect code you posted has issues ...

Quote

$mysqli = mysqli_connect($server, $user, NULL, $database);
if (!$mysqli) {
die('Could not connect: ' . mysql_error());
}
try { $pdom = new PDO("mysql:host=$server;dbname=$database", $user, $password); }
catch (PDOException $e) { print "Error Connecting to DataBase!: " . $e->getMessage() . "<br>"; die(); }
//echo 'Connected successfully';
//mysql_select_db($database);
?>

If you're using the mysqli API, there's no need for PDO. And for mysqli, mysql_select_db() must be mysqli_select_db(), but it's entirely unnecessary since your mysqli_connect() call already connected to that db.

For the rest, we're now off-topic for the Install forum, so I'm going to take us back to the original Newbie forum thread at https://forums.mysql.com/read.php?10,661291,661291#msg-661291

Options: ReplyQuote


Subject
Written By
Posted
Re: Error Connecting to DataBase!: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
October 10, 2017 11:44AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.