User Tools

Site Tools


info:mysql:user:create
Please note, that this is an old archived version of this site. Check out the new version at andunix.net!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
info:mysql:user:create [2015-09-24 19:19]
andunix
info:mysql:user:create [2016-01-25 11:49] (current)
andunix
Line 26: Line 26:
  
 GRANT ALL PRIVILEGES ON `{db}` . *  TO '{user}'@'%'; GRANT ALL PRIVILEGES ON `{db}` . *  TO '{user}'@'%';
 +</code>
 +
 +Simpler Alternative:
 +
 +<code sql>
 +CREATE DATABASE IF NOT EXISTS `dbname` DEFAULT CHARACTER SET = 'utf8';
 +GRANT ALL ON `dbname`.* TO 'dbuser'@'dbhost' IDENTIFIED BY 'dbpass';
 </code> </code>
  
 {{tag>admin database mysql sql}} {{tag>admin database mysql sql}}
info/mysql/user/create.1443122366.txt.gz · Last modified: 2015-09-24 19:19 by andunix