{"id":1447,"date":"2021-06-15T12:30:48","date_gmt":"2021-06-15T17:30:48","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1447"},"modified":"2021-06-23T08:10:32","modified_gmt":"2021-06-23T13:10:32","slug":"how-to-create-a-new-user-and-grant-permissions-in-mysql","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","title":{"rendered":"How To Create a New User and Grant Permissions in MySQL"},"content":{"rendered":"\r\n<div id=\"linux-1298498982\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>MySQL is one of the most popular and open-source relational database management systems around the world. It provides a lot of management options like creating and managing a user with specific permissions to databases and tables.<\/p>\r\n<p><img decoding=\"async\" class=\"size-medium wp-image-1454 alignright\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/06\/how-to-create-a-new-user-and-grant-permissions-in-mysql-300x200.png\" alt=\"how to create a new user and grant permissions in mysql\" width=\"300\" height=\"200\" \/><\/p>\r\n<p>When you hire a new developer to manage MySQL databases then you may need to grant specific permission to manage those databases such as deleting or modifying the information. In that case, it is essential for your to know how to grant specific privileges to the MySQL user account.<br \/><!--more--><\/p>\r\n<p>In this post, we will show you how to create a MySQL user and grant specific permissions<\/p>\r\n\r\n\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>A Linux VPS with MySQL server installed.<\/li>\r\n<li>Access to the root user account (or access to an admin account with root privileges)<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Log in to the Server &amp; Update the Server OS Packages<\/h2>\r\n\r\n\r\n\r\n<p>First, log in to your Debian 10 server via SSH as the root user:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">ssh root@IP_Address -p Port_number<\/pre>\r\n\r\n\r\n\r\n<p>You will need to replace &#8216;IP_Address&#8217; and &#8216;Port_number&#8217; with your server\u2019s respective IP address and SSH port number. Additionally, replace &#8216;root&#8217; with the username of the admin account if necessary.<\/p>\r\n\r\n\r\n\r\n<p>Before starting, you have to make sure that all OS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt-get update -y\r\napt-get upgrade -y<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Create a New MySQL User<\/h2>\r\n\r\n\r\n\r\n<p>First, you will need to connect to the MySQL shell using the MySQL root user. You can connect it using the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\r\n\r\n\r\n\r\n<p>You will be asked to provide your MySQL root password. Once you are connected to the MySQL shell, you should see the following output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">Welcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 8\r\nServer version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)\r\n\r\nCopyright (c) 2000, 2021, Oracle and\/or its affiliates.\r\n\r\nOracle is a registered trademark of Oracle Corporation and\/or its\r\naffiliates. Other names may be trademarks of their respective\r\nowners.\r\n\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\r\nmysql&gt; \r\n<\/pre>\r\n\r\n\r\n\r\n<p>Now, create a new MySQL user with the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; CREATE USER 'username'@'localhost' IDENTIFIED BY 'userpassword';<\/pre>\r\n\r\n\r\n\r\n<p><strong>Where:<\/strong><\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>username<\/strong> is the name of the MySQL user you want to create.<\/li>\r\n<li><strong>userpassword<\/strong> is the password of the MySQL user.<\/li>\r\n<li><strong>localhost<\/strong> is a host from where you want to connect to MySQL.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>You will need to replace the <strong>localhost<\/strong> with the remote server IP address if you want to connect the MySQL from the remote server. In that case, you can create a new MySQL user with the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; CREATE USER 'username'@'192.168.0.100' IDENTIFIED BY 'userpassword';<\/pre>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>192.168.0.100<\/strong> is the IP address of the remote server.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Grant Privileges to a MySQL User Account<\/h2>\r\n\r\n\r\n\r\n<p>There are multiple types of permissions available in MySQL that you can provide to the MySQL user account. Some of the most commonly used permissions are shown below:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>ALL PRIVILEGES: &#8211;<\/strong> This will allow MySQL users to run any query on the specified database.<\/li>\r\n<li><strong>CREATE: &#8211;<\/strong> This will allow MySQL users to create databases and tables.<\/li>\r\n<li><strong>DELETE: &#8211;<\/strong> This will allow MySQL users to delete rows from the table.<\/li>\r\n<li><strong>DROP: &#8211;<\/strong> This will allow MySQL users to drop databases and tables.<\/li>\r\n<li><strong>INSERT: &#8211;<\/strong> This will allow MySQL users to insert rows to a specific table.<\/li>\r\n<li><strong>SELECT: &#8211;<\/strong> This will allow MySQL users to read a database.<\/li>\r\n<li><strong>UPDATE: &#8211;<\/strong> This will allow MySQL users to update table rows.<\/li>\r\n<li><strong>GRANT OPTION: &#8211;<\/strong> This will allow MySQL users to grant or remove other users\u2019 privileges.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>To grant all privileges to the MySQL user account on a specific database, run the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost';<\/pre>\r\n\r\n\r\n\r\n<p>To grant all privileges to the MySQL user on a specific table from a database, run the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; GRANT ALL PRIVILEGES ON dbname.tablename TO 'username'@'localhost';<\/pre>\r\n\r\n\r\n\r\n<p>To grant multiple privileges like, SELECT, INSERT, DELETE to the MySQL user on a specific database, run the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; GRANT SELECT, INSERT, DELETE ON dbname.* TO username@'localhost';<\/pre>\r\n\r\n\r\n\r\n<p>You will need to run the flush privileges command for the changes to take effect.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; FLUSH PRIVILEGES;<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">View MySQL User Account Privileges<\/h2>\r\n\r\n\r\n\r\n<p>If you want to view the privileges assigned to the MySQL user account, run the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; SHOW GRANTS FOR 'username'@'localhost';<\/pre>\r\n\r\n\r\n\r\n<p>You should see the following output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">+--------------------------------------------------------------+\r\n| Grants for username@localhost                                |\r\n+--------------------------------------------------------------+\r\n| GRANT USAGE ON *.* TO `username`@`localhost`                 |\r\n| GRANT ALL PRIVILEGES ON `dbname`.* TO `username`@`localhost` |\r\n+--------------------------------------------------------------+\r\n2 rows in set (0.00 sec)\r\n<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Remove MySQL User Account Privileges<\/h2>\r\n\r\n\r\n\r\n<p>You can use the <strong>REVOKE<\/strong> command to remove the permission of the MySQL user from the specific database or table.<\/p>\r\n\r\n\r\n\r\n<p>For example, to remove <strong>ALL PRIVILEGES<\/strong> from the database, run the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; REVOKE ALL ON *.* FROM 'username'@'localhost';<\/pre>\r\n\r\n\r\n\r\n<p>Next, you will need to run the flush privileges command for the changes to take effect.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysql&gt; FLUSH PRIVILEGES;<\/pre>\r\n\r\n\r\n\r\n<p>Of course, you don\u2019t have to manage MySQL server if you use one of our <a href=\"https:\/\/rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Managed Hosting<\/a> services, in which case you can simply ask our expert Linux admins to manage the MySQL server for you. They are available 24\/7 and will take care of your request immediately.<\/p>\r\n<p><img decoding=\"async\" class=\"wp-image-1454 alignleft\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/06\/how-to-create-a-new-user-and-grant-permissions-in-mysql-300x200.png\" alt=\"how to create a new user and grant permissions in mysql\" width=\"240\" height=\"160\" \/><\/p>\r\n<p style=\"text-align: left;\">If you liked this post on How to Create a New User and Grant Privileges in MySQL, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p><div id=\"linux-15172659\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\r\n\r\n\r\n","protected":false},"excerpt":{"rendered":"<p>MySQL is one of the most popular and open-source relational database management systems around the world. It provides a lot of management options like creating and managing a user with specific permissions to databases and tables. When you hire a new developer to manage MySQL databases then you may need to grant specific permission to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1451,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[77,192,7],"class_list":["post-1447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-mysql","tag-new-user","tag-open-source"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Create a New User and Grant Permissions in MySQL | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Create a New User and Grant Permissions in MySQL\" \/>\n<meta property=\"og:description\" content=\"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-15T17:30:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-23T13:10:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How To Create a New User and Grant Permissions in MySQL\",\"datePublished\":\"2021-06-15T17:30:48+00:00\",\"dateModified\":\"2021-06-23T13:10:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/\"},\"wordCount\":742,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg\",\"keywords\":[\"mysql\",\"new user\",\"open source\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/\",\"name\":\"How To Create a New User and Grant Permissions in MySQL | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg\",\"datePublished\":\"2021-06-15T17:30:48+00:00\",\"dateModified\":\"2021-06-23T13:10:32+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg\",\"contentUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to create a new user and grant permissions in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-create-a-new-user-and-grant-permissions-in-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Create a New User and Grant Permissions in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Create a New User and Grant Permissions in MySQL | LinuxHostSupport","description":"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How To Create a New User and Grant Permissions in MySQL","og_description":"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2021-06-15T17:30:48+00:00","article_modified_time":"2021-06-23T13:10:32+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How To Create a New User and Grant Permissions in MySQL","datePublished":"2021-06-15T17:30:48+00:00","dateModified":"2021-06-23T13:10:32+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"},"wordCount":742,"commentCount":1,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg","keywords":["mysql","new user","open source"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","name":"How To Create a New User and Grant Permissions in MySQL | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg","datePublished":"2021-06-15T17:30:48+00:00","dateModified":"2021-06-23T13:10:32+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"When you hire a developer to manage MySQL databases you might have to create a new user and grant permissions. Wondering how to do that? Check out our guide.","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/05\/how-to-create-a-new-user-and-grant-permissions-in-mysql.jpg","width":742,"height":372,"caption":"how to create a new user and grant permissions in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Create a New User and Grant Permissions in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1447"}],"version-history":[{"count":11,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1447\/revisions"}],"predecessor-version":[{"id":1478,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1447\/revisions\/1478"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1451"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}