{"id":32713,"date":"2026-11-29T22:05:37","date_gmt":"2026-11-29T22:05:37","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32713"},"modified":"2026-11-29T22:05:37","modified_gmt":"2026-11-29T22:05:37","slug":"mysql-tutorials-how-to-grant-user-access-to-database","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/mysql-tutorials-how-to-grant-user-access-to-database\/","title":{"rendered":"MySql Tutorials: How to grant user access to Database?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To give a MySQL user access to one database, create the account with <code>CREATE USER<\/code>, then grant privileges on <code>database_name.*<\/code> with <code>GRANT<\/code>. The syntax in the example above, with <code>IDENTIFIED BY<\/code> inside <code>GRANT<\/code>, was removed in MySQL 8.0, so this page shows the current two-step method, how to check and revoke access, and how to fix the errors people run into most.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">To grant a user access to a specific database in MySQL, you can use the following GRANT statement:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">GRANT privileges ON database_name.* TO <span class=\"hljs-string\">'user_name'<\/span>@<span class=\"hljs-string\">'host'<\/span> &#91;IDENTIFIED BY <span class=\"hljs-string\">'password'<\/span>];\r\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>privileges<\/code>: the privileges you want to grant to the user. This can be a combination of SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, and other privileges.<\/li>\n\n\n\n<li><code>database_name<\/code>: the name of the database you want to grant the user access to.<\/li>\n\n\n\n<li><code>user_name<\/code>: the name of the user you want to grant the privileges to.<\/li>\n\n\n\n<li><code>host<\/code>: the host from which the user is connecting. This can be specified as a wildcard (e.g., <code>'%'<\/code>) to allow access from any host.<\/li>\n\n\n\n<li><code>password<\/code>: the password for the user (optional).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For example, to grant a user with the username <code>'john'<\/code> and password <code>'password'<\/code> the ability to select data from the database <code>'mydatabase'<\/code>, the following command can be used:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">GRANT SELECT ON mydatabase.* TO <span class=\"hljs-string\">'john'<\/span>@<span class=\"hljs-string\">'%'<\/span> IDENTIFIED BY <span class=\"hljs-string\">'password'<\/span>;\r\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">After executing the GRANT statement, you need to run the <code>FLUSH PRIVILEGES<\/code> command to reload the privileges and apply the changes:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">FLUSH PRIVILEGES;\r\n<\/code><\/span><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Corrected syntax for MySQL 8.0 and later<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In MySQL 5.7 and earlier, <code>GRANT ... IDENTIFIED BY<\/code> created the user and set its password in one statement. MySQL 5.7 deprecated this and MySQL 8.0 removed it. On current servers the statement in the example above fails with a syntax error (<code>ERROR 1064<\/code>). You now create the account first and grant privileges as a separate step:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">-- <span class=\"hljs-number\">1.<\/span> Create the account (once)\nCREATE USER <span class=\"hljs-string\">'john'<\/span>@<span class=\"hljs-string\">'%'<\/span> IDENTIFIED BY <span class=\"hljs-string\">'S7rong!Passw0rd#2026'<\/span>;\n\n-- <span class=\"hljs-number\">2.<\/span> Grant privileges on every table <span class=\"hljs-keyword\">in<\/span> one database\nGRANT SELECT ON mydatabase.* TO <span class=\"hljs-string\">'john'<\/span>@<span class=\"hljs-string\">'%'<\/span>;\n\n-- <span class=\"hljs-number\">3.<\/span> Confirm\nSHOW GRANTS FOR <span class=\"hljs-string\">'john'<\/span>@<span class=\"hljs-string\">'%'<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Expected output of <code>SHOW GRANTS<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">+--------------------------------------------------+\n| Grants <span class=\"hljs-keyword\">for<\/span> john@%                                |\n+--------------------------------------------------+\n| GRANT USAGE ON *.* TO <span class=\"hljs-string\">`john`<\/span>@<span class=\"hljs-string\">`%`<\/span>                 |\n| GRANT SELECT ON <span class=\"hljs-string\">`mydatabase`<\/span>.* TO <span class=\"hljs-string\">`john`<\/span>@<span class=\"hljs-string\">`%`<\/span>     |\n+--------------------------------------------------+<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><code>USAGE<\/code> means &quot;no global privileges&quot;. The account can log in, but it can only touch what it was explicitly granted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> <strong><code>FLUSH PRIVILEGES<\/code> is not needed here.<\/strong> <code>CREATE USER<\/code>, <code>GRANT<\/code>, <code>REVOKE<\/code> and <code>ALTER USER<\/code> update the in-memory grant tables immediately. You only need <code>FLUSH PRIVILEGES<\/code> if you edit the <code>mysql.user<\/code> or <code>mysql.db<\/code> tables directly with <code>INSERT<\/code>, <code>UPDATE<\/code> or <code>DELETE<\/code>, and you should avoid doing that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MariaDB still accepts <code>GRANT ... IDENTIFIED BY<\/code> and can create the user in the same statement unless the <code>NO_AUTO_CREATE_USER<\/code> SQL mode is on. Using <code>CREATE USER<\/code> followed by <code>GRANT<\/code> works on both MySQL and MariaDB, so it is the safer habit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-step: give an application its own database user<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Connect as an administrative account: <code>mysql -u root -p<\/code> (on Ubuntu or Debian with socket authentication, use <code>sudo mysql<\/code>).<\/li>\n\n\n<li>Create the database if it does not exist yet: <code>CREATE DATABASE IF NOT EXISTS appdb;<\/code><\/li>\n\n\n<li>Create the user, limited to the host it will connect from: <code>CREATE USER &#039;appuser&#039;@&#039;10.0.1.%&#039; IDENTIFIED BY &#039;S7rong!Passw0rd#2026&#039;;<\/code><\/li>\n\n\n<li>Grant only what the application needs: <code>GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO &#039;appuser&#039;@&#039;10.0.1.%&#039;;<\/code><\/li>\n\n\n<li>Check the result: <code>SHOW GRANTS FOR &#039;appuser&#039;@&#039;10.0.1.%&#039;;<\/code><\/li>\n\n\n<li>Test from the client machine: <code>mysql -h db.example.internal -u appuser -p appdb -e &quot;SELECT DATABASE(), CURRENT_USER();&quot;<\/code><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CURRENT_USER()<\/code> returns the account MySQL actually matched, for example <code>appuser@10.0.1.%<\/code>. This helps when several accounts share a username but have different host parts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choosing privileges and scope<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Use case<\/th><th>Statement<\/th><\/tr><\/thead><tbody><tr><td>Read-only reporting<\/td><td><code>GRANT SELECT ON appdb.* TO &#039;report&#039;@&#039;%&#039;;<\/code><\/td><\/tr><tr><td>Typical application (CRUD)<\/td><td><code>GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO &#039;appuser&#039;@&#039;10.0.1.%&#039;;<\/code><\/td><\/tr><tr><td>App that runs its own schema migrations<\/td><td>Add <code>CREATE, ALTER, DROP, INDEX, REFERENCES<\/code> to the CRUD list<\/td><\/tr><tr><td>Full control of one database only<\/td><td><code>GRANT ALL PRIVILEGES ON appdb.* TO &#039;dbowner&#039;@&#039;localhost&#039;;<\/code><\/td><\/tr><tr><td>Access to a single table<\/td><td><code>GRANT SELECT ON appdb.orders TO &#039;analyst&#039;@&#039;%&#039;;<\/code><\/td><\/tr><tr><td>Access to specific columns<\/td><td><code>GRANT SELECT (id, status) ON appdb.orders TO &#039;analyst&#039;@&#039;%&#039;;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><code>ON appdb.*<\/code> is a database-level grant and also covers tables created later. <code>ON *.*<\/code> is a global grant on every database, including the <code>mysql<\/code> system schema, so do not use it for application accounts. Add <code>WITH GRANT OPTION<\/code> only when the user really needs to pass its own privileges on to other accounts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> In database-level grants, <code>_<\/code> and <code>%<\/code> are wildcards. <code>GRANT ... ON my_db.*<\/code> also matches a database called <code>myxdb<\/code>. If you need an exact match, escape the underscore: `<code>GRANT SELECT ON <\/code>my\\_db<code>.* TO ...<\/code>`. Names that contain hyphens must be quoted with backticks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the host part works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A MySQL account is the pair <code>&#039;user&#039;@&#039;host&#039;<\/code>, so <code>&#039;john&#039;@&#039;localhost&#039;<\/code> and <code>&#039;john&#039;@&#039;%&#039;<\/code> are two separate accounts with separate passwords and grants.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>&#039;localhost&#039;<\/code>: connections over the Unix socket, or to the host name <code>localhost<\/code>.<\/li>\n\n\n<li><code>&#039;127.0.0.1&#039;<\/code>: TCP connections over loopback, for example <code>mysql -h 127.0.0.1<\/code>.<\/li>\n\n\n<li><code>&#039;10.0.1.%&#039;<\/code> or <code>&#039;10.0.1.0\/255.255.255.0&#039;<\/code>: any client in that subnet. Newer MySQL 8.0 releases also accept CIDR notation such as <code>&#039;10.0.1.0\/24&#039;<\/code>.<\/li>\n\n\n<li><code>&#039;%&#039;<\/code>: any host. This is convenient, but it exposes the account to every network that can reach port 3306.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For remote clients to connect at all, the server must also listen on a reachable address. Many Linux packages set <code>bind-address = 127.0.0.1<\/code> in the server config (for example <code>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code>). Change it to the server&#039;s private IP or <code>0.0.0.0<\/code>, restart MySQL, and allow port 3306 only from trusted networks in your firewall or security group.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using roles to manage access (MySQL 8.0+)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When several users need the same access, grant privileges to a role once and then assign the role to users:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">CREATE ROLE <span class=\"hljs-string\">'app_read'<\/span>, <span class=\"hljs-string\">'app_write'<\/span>;\nGRANT SELECT ON appdb.* TO <span class=\"hljs-string\">'app_read'<\/span>;\nGRANT INSERT, UPDATE, DELETE ON appdb.* TO <span class=\"hljs-string\">'app_write'<\/span>;\n\nGRANT <span class=\"hljs-string\">'app_read'<\/span>, <span class=\"hljs-string\">'app_write'<\/span> TO <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span>;\nSET <span class=\"hljs-keyword\">DEFAULT<\/span> ROLE ALL TO <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Without <code>SET DEFAULT ROLE<\/code>, roles are granted but not active when the user logs in, and queries fail with access-denied errors. The user would have to run <code>SET ROLE ALL;<\/code> in every session.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Revoking access and removing users<\/h2>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">-- Remove one privilege\nREVOKE INSERT ON appdb.* FROM <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span>;\n\n-- Remove everything the account was granted\nREVOKE ALL PRIVILEGES, GRANT OPTION FROM <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span>;\n\n-- Change a password\nALTER USER <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span> IDENTIFIED BY <span class=\"hljs-string\">'N3w!Passw0rd#2026'<\/span>;\n\n-- Delete the account\nDROP USER <span class=\"hljs-string\">'appuser'<\/span>@<span class=\"hljs-string\">'10.0.1.%'<\/span>;\n\n-- <span class=\"hljs-keyword\">List<\/span> all accounts\nSELECT user, host FROM mysql.user ORDER BY user;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">A revoked privilege applies to the user&#039;s next statement for table and column privileges, and from the next <code>USE<\/code> for database-level privileges. Sessions that are already open can keep their current default database until they reconnect, so kill those sessions if access must end immediately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common errors and fixes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Error<\/th><th>Cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>ERROR 1064 ... near &#039;IDENTIFIED BY&#039;<\/code><\/td><td><code>GRANT ... IDENTIFIED BY<\/code> on MySQL 8.0+<\/td><td>Run <code>CREATE USER<\/code> first, then <code>GRANT<\/code> without a password<\/td><\/tr><tr><td><code>ERROR 1410: You are not allowed to create a user with GRANT<\/code><\/td><td>The <code>&#039;user&#039;@&#039;host&#039;<\/code> in <code>GRANT<\/code> does not exist<\/td><td>Create that exact account, or fix the host part<\/td><\/tr><tr><td><code>ERROR 1396: Operation CREATE USER failed<\/code><\/td><td>The account already exists<\/td><td>Use <code>CREATE USER IF NOT EXISTS<\/code> or <code>ALTER USER<\/code><\/td><\/tr><tr><td><code>ERROR 1045: Access denied ... (using password: YES)<\/code><\/td><td>Wrong password, or the client matched a different host entry<\/td><td>Check <code>SELECT user, host FROM mysql.user<\/code> and reset with <code>ALTER USER<\/code><\/td><\/tr><tr><td><code>ERROR 1044: Access denied for user ... to database<\/code><\/td><td>Login worked but there is no grant on that database<\/td><td><code>GRANT<\/code> on the right database and check <code>SHOW GRANTS<\/code><\/td><\/tr><tr><td><code>ERROR 1130: Host ... is not allowed to connect<\/code><\/td><td>No account matches the client&#039;s host<\/td><td>Create the user for that host or subnet<\/td><\/tr><tr><td><code>Authentication plugin &#039;caching_sha2_password&#039; cannot be loaded<\/code><\/td><td>Old client or driver<\/td><td>Upgrade the client or connector, which is the preferred fix<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Security best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Give each application and each person a separate account. Never let an application connect as <code>root<\/code>.<\/li>\n\n\n<li>Grant the minimum privileges at database or table level. Avoid <code>ALL PRIVILEGES ON *.*<\/code> and <code>WITH GRANT OPTION<\/code>.<\/li>\n\n\n<li>Restrict the host part to a subnet or specific address instead of <code>&#039;%&#039;<\/code>, and firewall port 3306.<\/li>\n\n\n<li>Use strong, generated passwords stored in a secrets manager. The <code>validate_password<\/code> component can enforce password policy on the server.<\/li>\n\n\n<li>Require encrypted connections for remote users: <code>ALTER USER &#039;appuser&#039;@&#039;10.0.1.%&#039; REQUIRE SSL;<\/code><\/li>\n\n\n<li>Review accounts regularly with <code>SHOW GRANTS<\/code> and drop users you no longer need.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need to run FLUSH PRIVILEGES after GRANT in MySQL?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. <code>GRANT<\/code>, <code>REVOKE<\/code>, <code>CREATE USER<\/code> and <code>ALTER USER<\/code> take effect immediately. <code>FLUSH PRIVILEGES<\/code> is only needed after editing the grant tables directly with DML statements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does GRANT &#8230; IDENTIFIED BY give a syntax error?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL 8.0 removed the ability to create users or set passwords through <code>GRANT<\/code>. Create the account with <code>CREATE USER &#039;u&#039;@&#039;host&#039; IDENTIFIED BY &#039;...&#039;<\/code> and then run <code>GRANT<\/code> without the password clause.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I grant a user access to all tables in one database?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>database_name.*<\/code> as the target, for example <code>GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO &#039;appuser&#039;@&#039;%&#039;;<\/code>. The grant also covers tables created in that database later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How can I see what privileges a MySQL user has?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>SHOW GRANTS FOR &#039;user&#039;@&#039;host&#039;;<\/code>. To see your own privileges, run <code>SHOW GRANTS;<\/code> or <code>SHOW GRANTS FOR CURRENT_USER();<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why can a user connect locally but not remotely?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Either the account only exists for <code>localhost<\/code>, or the server is listening on <code>127.0.0.1<\/code> only. Create the user for the remote host or subnet, set <code>bind-address<\/code> correctly, and open port 3306 to trusted clients.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related tutorials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/database\/\">More Databases tutorials<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/senior-database-administrator-role-blueprint-responsibilities-skills-kpis-and-career-path\/\">Senior Database Administrator: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/database-platform-engineer-role-blueprint-responsibilities-skills-kpis-and-career-path\/\">Database Platform Engineer: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To give a MySQL user access to one database, create the account with CREATE USER, then grant privileges on database_name.* with GRANT. The syntax in the example&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[10975],"tags":[],"class_list":["post-32713","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=32713"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32713\/revisions"}],"predecessor-version":[{"id":80417,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32713\/revisions\/80417"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}