<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Permissions Archives - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/tag/permissions/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/tag/permissions/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Thu, 04 Jan 2024 06:06:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>Permissions Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/tag/permissions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Creating a New User and Granting Permissions in MySQL on ServerStadium</title>
		<link>https://serverstadium.com/knowledge-base/creating-a-new-user-and-granting-permissions-in-mysql-on-serverstadium/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Thu, 04 Jan 2024 06:06:11 +0000</pubDate>
				<guid isPermaLink="false">https://serverstadium.com/?post_type=epkb_post_type_1&#038;p=11830</guid>

					<description><![CDATA[<p>Introduction Managing user access and permissions is a critical aspect of database administration in MySQL. Whether you&#8217;re running a MySQL server on a ServerStadium VM or dedicated server, it&#8217;s essential to understand how to create new users and define their privileges securely. Creating a New User and Granting Permissions in MySQL on ServerStadium Prerequisites A&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/creating-a-new-user-and-granting-permissions-in-mysql-on-serverstadium/">Creating a New User and Granting Permissions in MySQL on ServerStadium</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Managing user access and permissions is a critical aspect of database administration in MySQL. Whether you&#8217;re running a MySQL server on a ServerStadium VM or dedicated server, it&#8217;s essential to understand how to create new users and define their privileges securely.</p>
<h2>Creating a New User and Granting Permissions in MySQL on ServerStadium</h2>
<h3>Prerequisites</h3>
<ul>
<li>A ServerStadium VM or dedicated server running MySQL. Explore ServerStadium&#8217;s offerings at <a href="https://serverstadium.com/pricing/" target="_new" rel="noopener">VM Pricing</a> and <a href="https://serverstadium.com/dedicated-server/" target="_new" rel="noopener">Dedicated Servers</a>.</li>
<li>Access to the MySQL server as a user with administrative privileges.</li>
</ul>
<h3>Step 1: Access the MySQL Server</h3>
<ol>
<li><strong>Log in to MySQL</strong>:
<div class="shortcode-code">
<p> mysql -u root -p </p></div>
<p>Enter the root password when prompted.</li>
</ol>
<h3>Step 2: Create a New User</h3>
<ol>
<li><strong>Create a New User</strong>:
<p>Execute the following command in MySQL, replacing <code>'newuser'</code> and <code>'password'</code> with your chosen username and password.</p>
<div class="shortcode-code">
<p> CREATE USER &#039;newuser&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039;; </p></div>
<p>This command creates a new user who can connect to the MySQL server from the localhost.</li>
</ol>
<h3>Step 3: Grant Permissions to the User</h3>
<ol>
<li><strong>Grant Permissions</strong>:
<p>After creating the new user, you need to grant them specific privileges based on their role.</p>
<p>To grant all privileges to the user on all databases:</p>
<div class="shortcode-code">
<p> GRANT ALL PRIVILEGES ON &lt;em&gt;.&lt;/em&gt; TO &#039;newuser&#039;@&#039;localhost&#039;; </p></div>
<p>For specific privileges:</p>
<div class="shortcode-code">
<p> GRANT SELECT, INSERT ON &lt;code&gt;mydb&lt;/code&gt;.* TO &#039;newuser&#039;@&#039;localhost&#039;; </p></div>
<p>Replace <code>mydb</code> with the name of your database and adjust the privileges (<code>SELECT</code>, <code>INSERT</code>, etc.) as needed.</li>
<li><strong>Apply the Privileges</strong>:
<p>After granting the privileges, you need to flush the privileges to apply the changes:</p>
<div class="shortcode-code">
<p> FLUSH PRIVILEGES; </p></div></li>
</ol>
<h3>Conclusion</h3>
<p>Your new MySQL user is now set up with the specified privileges on your ServerStadium server. Managing MySQL users and their permissions is crucial for maintaining the security and integrity of your databases. For more information on server and database management, visit our <a href="https://serverstadium.com/knowledge-base/" target="_new" rel="noopener">knowledge base</a> or contact our support team.</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/creating-a-new-user-and-granting-permissions-in-mysql-on-serverstadium/">Creating a New User and Granting Permissions in MySQL on ServerStadium</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
