{"id":10744,"date":"2023-11-29T05:02:05","date_gmt":"2023-11-29T05:02:05","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=10744"},"modified":"2024-03-26T10:07:14","modified_gmt":"2024-03-26T10:07:14","slug":"how-to-create-a-new-user-and-grant-permissions-in-mysql","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/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":"<p><a href=\"https:\/\/www.mysql.com\/\">MySQL<\/a> is a widely used and free database tool known for its excellent performance with large datasets. It allows its users to manipulate data according to their needs. Furthermore, one can create a user, assign them to full control or specific privileges, and remove a user. Many developers are considering MySQL because of its reliability and simplicity.<\/p>\n<p>This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Make sure MySQL is already installed (Follow our <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-working-with-databases\/\">guide<\/a> to Install MySQL on your Ubuntu 22.04 system).<\/p>\n<h2>How to Create a New User and Grant Permissions in MySQL in Ubuntu 22.04?<\/h2>\n<p>In the following, there are some useful steps to create a new user, grant permissions, and remove a user from MySQL.<\/p>\n<h3><strong>How to Create a New User in MySQL?<\/strong><\/h3>\n<p>Here are the steps to create a new user in MySQL:<\/p>\n<h4>Step 1: Check MySQL Version<\/h4>\n<p>Before proceeding, verify your MySQL installation and the version number using the command:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>mysql --version<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img fetchpriority=\"high\" decoding=\"async\" width=\"945\" height=\"77\" class=\"wp-image-10745\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-1.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-1.png 945w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-1-300x24.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-1-768x63.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-1-155x13.png 155w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/pre>\n<p>The command will return the output showing the package name and its currently installed version, such as <strong>8.0.35<\/strong>.<\/p>\n<h4>Step 2: Access MySQL Shell<\/h4>\n<p>Use the one-liner command to access the MySQL Shell as the root user:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>sudo mysql -u root -p<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img decoding=\"async\" width=\"969\" height=\"366\" class=\"wp-image-10746\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-2.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-2.png 969w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-2-300x113.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-2-768x290.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-2-155x59.png 155w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/pre>\n<p>You have entered the MySQL environment. Now, you can easily interact with MySQL and execute commands.<\/p>\n<h4>Step 3: Create a New User<\/h4>\n<p>Execute the command to create a new MySQL user named <strong>new_user<\/strong> with the password <strong>Password@123<\/strong>. This command confines the new user&#8217;s connection to solely the local machine:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'Password@123';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img decoding=\"async\" width=\"975\" height=\"104\" class=\"wp-image-10747\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-3.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-3.png 975w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-3-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-3-768x82.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-3-155x17.png 155w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/pre>\n<p>If you see the <strong>Query OK<\/strong> message on your screen, your command has been executed successfully. Do not forget to replace the <strong> &#8216;Password@123&#8217;<\/strong> with a strong password.<\/p>\n<h3><strong><span style=\"color: #2962ff;\"><span style=\"background-color: #d5d5d5;\">H<\/span><\/span>ow to Grant All Permissions in MySQL?<\/strong><\/h3>\n<p>In this section, we will explore how to grant all permissions to a user in MySQL.<\/p>\n<h4>Step 1: Grant All Privileges<\/h4>\n<p>If you want to provide access and permissions to a specific user like <strong>new_user<\/strong>, you can use the command to grant them full control over all databases and tables in MySQL:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"102\" class=\"wp-image-10748\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4.png 971w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4-768x81.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4-960x102.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-4-155x16.png 155w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/pre>\n<p>The asterisk (*) used in the command indicates <strong>All<\/strong>. This command grants <strong>new_user<\/strong> permission to access all databases and tables within the MySQL server.<\/p>\n<h4>Step 2: Apply the Changes<\/h4>\n<p>This step is necessary to apply the changes you have made and reload the local server without restarting the system:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>FLUSH PRIVILEGES;<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"100\" class=\"wp-image-10749\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5.png 907w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5-768x85.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5-900x100.png 900w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-5-155x17.png 155w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><\/pre>\n<p>When the command runs, any changes made to the privileges of <strong>new_user<\/strong> are applied immediately.<\/p>\n<h3><strong>How to Grant Specific Permissions in MySQL?<\/strong><\/h3>\n<p>If you want to grant specific permissions to a user in MySQL, follow these instructions.<\/p>\n<h4>Step 1: Create a Database<\/h4>\n<p>In MySQL, you can easily create databases according to your needs. For instance, use the following command to create a database named <strong>Test_DB<\/strong>. You can Include <strong>IF NOT EXISTS<\/strong> in the command to avoid duplicates database:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>CREATE DATABASE IF NOT EXISTS Test_DB;<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"101\" class=\"wp-image-10750\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6.png 967w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6-300x31.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6-768x80.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6-960x101.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-6-155x16.png 155w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/pre>\n<h4>Step 2: Grant Specific Permissions<\/h4>\n<p>Within MySQL, it&#8217;s possible to grant particular privileges to a user for a specific database. For instance, execute the following command to grant the <strong>new_user<\/strong> permissions to insert data and select data from all tables within the <strong>Test_DB<\/strong> database:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>GRANT INSERT, SELECT ON Test_DB . * TO 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"98\" class=\"wp-image-10751\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7.png 966w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7-300x30.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7-768x78.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7-960x98.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-7-155x16.png 155w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/pre>\n<h4>Step 3: View Granted Permissions<\/h4>\n<p>To view the details of privileges granted to the user <strong>new_user<\/strong>, execute the command in the MySQL shell:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>SHOW GRANTS FOR 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"306\" class=\"wp-image-10752\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-8.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-8.png 974w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-8-300x94.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-8-768x241.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-8-155x49.png 155w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"535\" class=\"wp-image-10753\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-9.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-9.png 972w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-9-300x165.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-9-768x423.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-9-155x85.png 155w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"564\" class=\"wp-image-10754\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-10.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-10.png 979w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-10-300x173.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-10-768x442.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-10-155x89.png 155w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/pre>\n<p>On your screen, you can see detailed information regarding privileges granted to the user <strong>new_user<\/strong>.<\/p>\n<h3><strong>How to Delete Users on MySQL?<\/strong><\/h3>\n<p>You can remove all permissions granted to a user with the help of these stepwise instructions.<\/p>\n<h4>Step 1: Revoke Privileges<\/h4>\n<p>Before dropping any user, run the provided command to remove all permissions previously granted to the user <strong>new_user<\/strong> within the MySQL environment:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>REVOKE ALL PRIVILEGES ON * . * FROM 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"102\" class=\"wp-image-10755\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11.png 969w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11-768x81.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11-960x102.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-11-155x16.png 155w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/pre>\n<h4>Step 2: Delete the User<\/h4>\n<p>Run the <strong>DROP USER<\/strong> in MySQL Shell to delete a specific user account from the MySQL local server:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>DROP USER 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"102\" class=\"wp-image-10756\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12.png 967w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12-768x81.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12-960x102.png 960w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-12-155x16.png 155w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/pre>\n<p>This command will remove the <strong>new_user<\/strong> and remove all associated privileges. While executing this command, also keep in mind that this command will completely delete the user.<\/p>\n<h4><span style=\"color: #2962ff;\"><span style=\"background-color: #d5d5d5;\">S<\/span><\/span>tep 3: Confirm Granted User<\/h4>\n<p>You can confirm about the user using the <strong>SHOW GRANTS<\/strong> command in your MySQL Shell:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\n<pre>SHOW GRANTS FOR 'new_user'@'localhost';<\/pre>\n<\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"96\" class=\"wp-image-10757\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-13.png\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-13.png 978w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-13-300x29.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-13-768x75.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/word-image-10744-13-155x15.png 155w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/pre>\n<p>If you see the message, \u201cThere is no such grant defined for user \u2018new_user\u2019 on host \u2018localhost\u2019, it means the DROP USER command has been executed successfully.<\/p>\n<h2>Conclusion<\/h2>\n<p>In Ubuntu 22.04, you can create a new user in MySQL. You can also grant specific privileges or all privileges to a user using simple commands including <strong>CREATE USER, GRANT ALL PRIVILEGES, <\/strong>and<strong> DROP USER<\/strong>. With the help of this learning-based article, you can manage and control user accounts in MySQL.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>MySQL is a widely used and free database tool known for its excellent performance with large datasets. It allows its users to manipulate data according to their needs. Furthermore, one can create a user, assign them to full control or specific privileges, and remove a user. Many developers are considering MySQL because of its reliability [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":10758,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[250,224],"class_list":["post-10744","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-mysql","tag-ubuntu-22-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a New User and Grant Permissions in MySQL - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/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 - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-29T05:02:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T10:07:14+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Create a New User and Grant Permissions in MySQL\",\"datePublished\":\"2023-11-29T05:02:05+00:00\",\"dateModified\":\"2024-03-26T10:07:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\"},\"wordCount\":754,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg\",\"keywords\":[\"MySQL\",\"Ubuntu 22.04\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\",\"name\":\"How to Create a New User and Grant Permissions in MySQL - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg\",\"datePublished\":\"2023-11-29T05:02:05+00:00\",\"dateModified\":\"2024-03-26T10:07:14+00:00\",\"description\":\"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Create a New User and Grant Permissions in MySQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a New User and Grant Permissions in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a New User and Grant Permissions in MySQL - Greenwebpage Community","description":"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.","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:\/\/greenwebpage.com\/community\/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 - Greenwebpage Community","og_description":"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","og_site_name":"Greenwebpage Community","article_published_time":"2023-11-29T05:02:05+00:00","article_modified_time":"2024-03-26T10:07:14+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Create a New User and Grant Permissions in MySQL","datePublished":"2023-11-29T05:02:05+00:00","dateModified":"2024-03-26T10:07:14+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"},"wordCount":754,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg","keywords":["MySQL","Ubuntu 22.04"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","url":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/","name":"How to Create a New User and Grant Permissions in MySQL - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg","datePublished":"2023-11-29T05:02:05+00:00","dateModified":"2024-03-26T10:07:14+00:00","description":"This educational article aims to empower you with the knowledge of creating new users and granting permissions within MySQL.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/11\/How-to-Create-a-New-User-and-Grant-Permissions-in-MySQL.jpg","width":1020,"height":600,"caption":"How to Create a New User and Grant Permissions in MySQL"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-create-a-new-user-and-grant-permissions-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Create a New User and Grant Permissions in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=10744"}],"version-history":[{"count":3,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10744\/revisions"}],"predecessor-version":[{"id":11196,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/10744\/revisions\/11196"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/10758"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=10744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=10744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=10744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}