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

Next revision
Previous revision
info:mysql:user:create [2013-02-04 22:17]
127.0.0.1 external edit
info:mysql:user:create [2016-01-25 11:49] (current)
andunix
Line 23: Line 23:
   MAX_USER_CONNECTIONS 0 ;   MAX_USER_CONNECTIONS 0 ;
  
-CREATE DATABASE IF NOT EXISTS '{db};+CREATE DATABASE IF NOT EXISTS `{db}`;
  
-GRANT ALL PRIVILEGES  +GRANT ALL PRIVILEGES ON `{db}. *  TO '{user}'@'%'; 
-ON '{db}. *  +</code> 
-TO '{user}'@'%';+ 
 +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.1360016247.txt.gz · Last modified: 2015-09-24 19:17 (external edit)