mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Updated MySQL tips (markdown)
parent
9249dfc02c
commit
4955d5bbf6
1 changed files with 5 additions and 8 deletions
|
|
@ -100,17 +100,14 @@ This tips were prepared for [[Install Tracks 2.5 on Ubuntu 20.10]]
|
|||
<p>>mysql -u daniel -p tempe < ~/tracks.sql</p>
|
||||
</blockquote>
|
||||
<h3>Assign privileges for a user on a database</h3>
|
||||
<p> <a href="https://dev.mysql.com/doc/refman/8.0/en/grant.html#grant-privileges">refman/8.0/ grant-privileges</a></p>
|
||||
<p>These are examples on how to grant some privileges</p>
|
||||
<blockquote>
|
||||
|
||||
mysql> GRANT USAGE ON *.* TO <em> <strong>thisuser/strong> </em>@localhost;<br/>
|
||||
mysql> GRANT ALL PRIVILEGES ON <em> <strong>thisdb</strong> </em>.* TO <em> <strong>thisuser/strong> </em>@localhost;<br/>
|
||||
mysql> GRANT GRANT OPTION ON <em> <strong>thisdb</strong> </em>.* TO <em> <strong>thisuser/strong> </em>@localhost; # Enables you to grant to or revoke from other users those privileges that you yourself possess.<br/>
|
||||
mysql> GRANT USAGE ON *.* TO <em> <strong>user_name</strong> </em>@localhost;<br/>
|
||||
mysql> GRANT ALL PRIVILEGES ON <em> <strong>thisdb</strong> </em>.* TO <em> <strong>user_name</strong> </em>@localhost;<br/>
|
||||
mysql> GRANT GRANT OPTION ON <em> <strong>thisdb</strong> </em>.* TO <em> <strong>user_name</strong> </em>@localhost; # Enables you to grant to or revoke from other users those privileges that you yourself possess.<br/>
|
||||
mysql>GRANT PROCESS ON *.* TO <em> <strong>user_name</strong> </em>@localhost;<br/>
|
||||
mysql>quit;
|
||||
</blockquote>
|
||||
<p>Note: for the dump of the database (using mysqldump) you need to add the <strong>global</strong> PROCESS privilege to the user running the command</p>
|
||||
<blockquote>
|
||||
mysql>GRANT PROCESS ON *.* TO <em> <strong>thisuser/strong> </em>@localhost;
|
||||
</blockquote>
|
||||
<p>
|
||||
<br/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue