{"id":9060,"date":"2026-04-13T13:10:00","date_gmt":"2026-04-13T07:40:00","guid":{"rendered":"https:\/\/www.veeble.com\/kb\/?p=9060"},"modified":"2026-04-13T12:56:57","modified_gmt":"2026-04-13T07:26:57","slug":"mysql-error-1045-access-denied-for-user","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/mysql-error-1045-access-denied-for-user\/","title":{"rendered":"How to Fix MySQL ERROR 1045: Access Denied for User (2026)"},"content":{"rendered":"\n<p>&#8220;<code>MySQL ERROR 1045 access denied for user<\/code>&#8221; is one of the most common errors encountered when connecting to <a href=\"https:\/\/www.mysql.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a> or <a href=\"https:\/\/mariadb.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">MariaDB<\/a>. It appears at the command line, in application logs, and inside WordPress <code>wp-config.php<\/code> connection failures when the server rejects the client&#8217;s authentication request.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-1024x546.jpg\" alt=\"\" class=\"wp-image-9068\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-1024x546.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-300x160.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-768x410.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-1536x819.jpg 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1-2048x1092.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This article covers the most common causes of ERROR 1045 and walks through the exact commands to fix each one on Linux servers running MySQL 5.7, MySQL 8.0, and MariaDB.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#what-is-my-sql-error-1045\">What Is MySQL ERROR 1045?<\/a><\/li><li><a href=\"#common-causes\">Common Causes<\/a><\/li><li><a href=\"#fix-1-wrong-password\">Fix 1: Wrong Password<\/a><\/li><li><a href=\"#fix-2-reset-a-lost-root-password\">Fix 2: Reset a Lost Root Password<\/a><\/li><li><a href=\"#fix-3-missing-or-incorrect-user-privileges\">Fix 3: Missing or Incorrect User Privileges<\/a><\/li><li><a href=\"#fix-4-host-mismatch\">Fix 4: Host Mismatch<\/a><\/li><li><a href=\"#fix-5-authentication-plugin-mismatch-my-sql-8-0\">Fix 5: Authentication Plugin Mismatch (MySQL 8.0+)<\/a><\/li><li><a href=\"#prevention-tips\">Prevention Tips<\/a><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-my-sql-error-1045\">What Is MySQL ERROR 1045?<\/h2>\n\n\n<p>The full error message takes this form:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background has-link-color wp-elements-92e3b2d4a1692857d5f54aabf96a5a3e\"><code>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-green-cyan-color has-black-background-color has-text-color has-background has-link-color wp-elements-9db23efc58e45c07d30c72daa8e7ed1d\"><code>ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)<\/code><\/pre>\n\n\n\n<p>MySQL rejected the connection because the combination of <strong>username<\/strong>, <strong>host<\/strong>, and <strong>password<\/strong> did not match any authorized entry in the <code>mysql.user<\/code> table. The <code>(using password: YES\/NO)<\/code> part tells you whether a password was supplied at all \u2014 useful for narrowing down the cause immediately.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"common-causes\">Common Causes<\/h2>\n\n\n<ul class=\"wp-block-list\">\n<li>Incorrect password or username<\/li>\n\n\n\n<li>Root password was never set after installation<\/li>\n\n\n\n<li>The user account does not exist in <code>mysql.user<\/code><\/li>\n\n\n\n<li>The user exists but is not allowed to connect from the current host<\/li>\n\n\n\n<li>MySQL 8.0 changed the default authentication plugin, breaking older clients<\/li>\n\n\n\n<li><code>skip-grant-tables<\/code> was previously used and privileges were not re-flushed<\/li>\n<\/ul>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-1-wrong-password\">Fix 1: Wrong Password<\/h2>\n\n\n<p>The most frequent cause. Verify you are using the correct credentials before anything else.<\/p>\n\n\n\n<p><strong>1.1 \u2014 Attempt login with explicit host:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-69f005a8c94dd3d7766c20e533808ee0\"><code>mysql -u root -p -h 127.0.0.1<\/code><\/pre>\n\n\n\n<p>Using <code>-h 127.0.0.1<\/code> instead of <code>-h localhost<\/code> forces a TCP connection rather than a Unix socket. If this succeeds while <code>localhost<\/code> fails, the issue is socket-based authentication, not the password itself.<\/p>\n\n\n\n<p><strong>1.2 \u2014 Check if the user exists:<\/strong><\/p>\n\n\n\n<p>Log in as a privileged user (or use the root recovery method below) and run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-d76e921b9542cc7202a8be053ec94782\"><code>SELECT user, host, authentication_string FROM mysql.user WHERE user = 'your_username';<\/code><\/pre>\n\n\n\n<p>If no row is returned, the user does not exist \u2014 create it (see Fix 3).<\/p>\n\n\n\n<p><strong>1.3 \u2014 Verify credentials in your application config:<\/strong><\/p>\n\n\n\n<p>For WordPress, open <code>wp-config.php<\/code> and confirm these values are accurate:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-320201a844d048576d6db85e1a832e37\"><code>define('DB_USER', 'your_db_user');\ndefine('DB_PASSWORD', 'your_db_password');\ndefine('DB_NAME', 'your_db_name');\ndefine('DB_HOST', 'localhost');<\/code><\/pre>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-2-reset-a-lost-root-password\">Fix 2: Reset a Lost Root Password<\/h2>\n\n\n<p>If you cannot log in to MySQL at all, use the <code>--skip-grant-tables<\/code> method to bypass authentication temporarily.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Warning:<\/strong> <code>skip-grant-tables<\/code> disables authentication for all users while active. Only use this on a server you control and revert it immediately.<\/p>\n<\/blockquote>\n\n\n\n<p><strong>Step 1 \u2014 Stop the MySQL service:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-c784a90a6e35ae3f029cfa4994024d37\"><code># systemd (Ubuntu 16.04+, CentOS 7+)\nsudo systemctl stop mysql\n\n# For MariaDB\nsudo systemctl stop mariadb<\/code><\/pre>\n\n\n\n<p><strong>Step 2 \u2014 Start MySQL with grant tables disabled:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-660bba1c203f1000c496ec2b4c2eab5d\"><code>sudo mysqld_safe --skip-grant-tables --skip-networking &amp;<\/code><\/pre>\n\n\n\n<p><code>--skip-networking<\/code> prevents remote connections while the server is unprotected.<\/p>\n\n\n\n<p><strong>Step 3 \u2014 Connect without a password:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-6cd53226bed0260412cdd9835964eed7\"><code>mysql -u root<\/code><\/pre>\n\n\n\n<p><strong>Step 4 \u2014 Flush privileges and reset the password:<\/strong><\/p>\n\n\n\n<p>For <strong>MySQL 5.7<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-dd716114ce8a1b1e84aeffed7fd78163\"><code>FLUSH PRIVILEGES;\nALTER USER 'root'@'localhost' IDENTIFIED BY 'NewStrongPassword!';<\/code><\/pre>\n\n\n\n<p>For <strong>MySQL 8.0<\/strong> and <strong>MariaDB 10.4+<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-34346e2236c41b5ba8f5af6ab90a6ed2\"><code>FLUSH PRIVILEGES;\nALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NewStrongPassword!';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p><strong>Step 5 \u2014 Stop the temporary instance and restart MySQL normally:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-3669b400835e38fffd7cac6d61c93329\"><code>sudo kill $(sudo cat \/var\/run\/mysqld\/mysqld.pid)\nsudo systemctl start mysql<\/code><\/pre>\n\n\n\n<p><strong>Step 6 \u2014 Test the new password:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-6332fef97307b304793b973e0390aeb1\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-3-missing-or-incorrect-user-privileges\">Fix 3: Missing or Incorrect User Privileges<\/h2>\n\n\n<p>If the user account is missing entirely, or it exists but lacks the necessary privileges, MySQL returns ERROR 1045.<\/p>\n\n\n\n<p><strong>3.1 \u2014 Create a new user and grant privileges:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-d1dac0c547c293971ce05eb27f3b8de4\"><code>CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'StrongPassword!';\nGRANT ALL PRIVILEGES ON your_database.* TO 'dbuser'@'localhost';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>To grant access from any host (use with caution on public-facing servers):<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-3fb84477446edb8e4f11cd7d42f3bb70\"><code>CREATE USER 'dbuser'@'%' IDENTIFIED BY 'StrongPassword!';\nGRANT ALL PRIVILEGES ON your_database.* TO 'dbuser'@'%';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p><strong>3.2 \u2014 Check current privileges for a user:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-8ceb5154dbad9f9bef5f8fbe950ea021\"><code>SHOW GRANTS FOR 'dbuser'@'localhost';<\/code><\/pre>\n\n\n\n<p><strong>3.3 \u2014 Grant missing privileges to an existing user:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-82ef0486ba0ba47fce30fb1e9319fab6\"><code>GRANT SELECT, INSERT, UPDATE, DELETE ON your_database.* TO 'dbuser'@'localhost';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-4-host-mismatch\">Fix 4: Host Mismatch<\/h2>\n\n\n<p>MySQL stores user accounts as <code>'username'@'host'<\/code> pairs. A user created for <code>localhost<\/code> cannot connect from <code>127.0.0.1<\/code> or a remote IP unless a separate account exists for that host.<\/p>\n\n\n\n<p><strong>4.1 \u2014 Check which hosts are defined for a user:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-d9b3d116260c726ee97e663ac05f9e5b\"><code>SELECT user, host FROM mysql.user WHERE user = 'dbuser';<\/code><\/pre>\n\n\n\n<p>Example output showing a host mismatch:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-2d37f8e8397a60abd4e49f45ec6d4bf8\"><code>+--------+-----------+\n| user   | host      |\n+--------+-----------+\n| dbuser | localhost |\n+--------+-----------+<\/code><\/pre>\n\n\n\n<p>If your application connects from <code>192.168.1.50<\/code> or via <code>127.0.0.1<\/code>, this account will not match.<\/p>\n\n\n\n<p><strong>4.2 \u2014 Add the correct host:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-6038af057a7d5ed1c2f91ac5aa31fb9c\"><code>CREATE USER 'dbuser'@'192.168.1.50' IDENTIFIED BY 'StrongPassword!';\nGRANT ALL PRIVILEGES ON your_database.* TO 'dbuser'@'192.168.1.50';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>Or use a wildcard for a subnet:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-f6d32165d5a5cebfdc500bbbff30e261\"><code>CREATE USER 'dbuser'@'192.168.1.%' IDENTIFIED BY 'StrongPassword!';\nGRANT ALL PRIVILEGES ON your_database.* TO 'dbuser'@'192.168.1.%';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p><strong>4.3 \u2014 Verify the connecting IP:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-47dcc463f2f7e0dd0ab97bbf8a1626a5\"><code># From the client machine\ncurl -s https:\/\/api.ipify.org<\/code><\/pre>\n\n\n\n<p>Or on the server, check recent connection attempts:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-532f5ce6ccfef10c1d0cfdabd55b7538\"><code>sudo grep \"Access denied\" \/var\/log\/mysql\/error.log | tail -20<\/code><\/pre>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-5-authentication-plugin-mismatch-my-sql-8-0\">Fix 5: Authentication Plugin Mismatch (MySQL 8.0+)<\/h2>\n\n\n<p>MySQL 8.0 changed the default authentication plugin from <code>mysql_native_password<\/code> to <code>caching_sha2_password<\/code>. Many older clients, PHP versions, and applications do not support the new plugin, resulting in ERROR 1045 or a related <code>Client does not support authentication protocol<\/code> error.<\/p>\n\n\n\n<p><strong>5.1 \u2014 Check the current plugin for a user:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-67e4be2030452a14092de8aec301e2e9\"><code>SELECT user, host, plugin FROM mysql.user WHERE user = 'root';<\/code><\/pre>\n\n\n\n<p><strong>5.2 \u2014 Switch to <code>mysql_native_password<\/code> for compatibility:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-131000405b485c6c7690a0925bb77609\"><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourPassword';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p><strong>5.3 \u2014 Set it as the global default (optional):<\/strong><\/p>\n\n\n\n<p>Add the following to <code>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code> (or <code>\/etc\/my.cnf<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-3c897efdfae26bb81d478c139207165a\"><code>&#091;mysqld]\ndefault_authentication_plugin=mysql_native_password<\/code><\/pre>\n\n\n\n<p>Then restart MySQL:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-3d18f3142de4706573c3cfc4baea8056\"><code>sudo systemctl restart mysql<\/code><\/pre>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"prevention-tips\">Prevention Tips<\/h2>\n\n\n<p><strong>Use separate database users per application.<\/strong> Never connect your web applications using the root account. Create a dedicated user with the minimum privileges required for each application.<\/p>\n\n\n\n<p><strong>Run <code>FLUSH PRIVILEGES<\/code> after manual user table edits.<\/strong> If you ever edit the <code>mysql.user<\/code> table directly with <code>UPDATE<\/code> instead of using <code>ALTER USER<\/code> or <code>GRANT<\/code>, MySQL will not read the changes until you run:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-a59d3d54f27474874c1f544639361f33\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p><strong>Restrict remote access.<\/strong> Only allow remote MySQL connections from specific IP addresses. In <code>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code>, set:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-f5c79ee5bba2836e6f2e7f8d688ed193\"><code>bind-address = 127.0.0.1<\/code><\/pre>\n\n\n\n<p>This limits MySQL to listen on localhost only, unless you explicitly need remote access.<\/p>\n\n\n\n<p><strong>Keep authentication plugins consistent.<\/strong> When upgrading MySQL from 5.7 to 8.0, audit user authentication plugins beforehand to avoid breaking existing connections.<\/p>\n\n\n\n<p><strong>Log failed access attempts.<\/strong> Enable the general query log temporarily when troubleshooting to see what credentials are being used:<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-4-color has-black-background-color has-text-color has-background has-link-color wp-elements-63f3f9cfeacb11419c26b1078deaaf12\"><code>SET GLOBAL general_log = 'ON';\nSET GLOBAL general_log_file = '\/var\/log\/mysql\/general.log';<\/code><\/pre>\n\n\n\n<p>Disable it after troubleshooting \u2014 it is not suitable for production use under load.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n<p>MySQL ERROR 1045 always comes down to one of five issues: a wrong password, a missing user account, a privilege gap, a host mismatch, or an authentication plugin conflict in MySQL 8.0. Work through the fixes in order \u2014 most cases are resolved by Fix 1 or Fix 3 without needing the <code>skip-grant-tables<\/code> recovery procedure.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;MySQL ERROR 1045 access denied for user&#8221; is one of the most common errors encountered when connecting to MySQL or MariaDB. It appears at [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":9067,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[11,15,5],"tags":[34,69,67,65,66,70,68],"class_list":["post-9060","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","category-developers-stuff","category-linux","tag-cpanel","tag-database","tag-linux","tag-mysql","tag-mysql-errors","tag-server-administration","tag-vps"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-scaled.jpg",2560,1365,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-300x160.jpg",300,160,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-768x410.jpg",768,410,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1024x546.jpg",1024,546,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-1536x819.jpg",1536,819,true],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2026\/04\/mysql-access-denied-for-user-root-localhost-2048x1092.jpg",2048,1092,true]},"uagb_author_info":{"display_name":"Nasarul Naseer","author_link":"https:\/\/www.veeble.com\/kb\/author\/nasarulnaseer\/"},"uagb_comment_info":0,"uagb_excerpt":"&#8220;MySQL ERROR 1045 access denied for user&#8221; is one of the most common errors encountered when connecting to MySQL or MariaDB. It appears at [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=9060"}],"version-history":[{"count":8,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9060\/revisions"}],"predecessor-version":[{"id":9071,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/9060\/revisions\/9071"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/9067"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=9060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=9060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=9060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}