{"id":19,"date":"2013-08-05T14:40:00","date_gmt":"2013-08-05T14:40:00","guid":{"rendered":"http:\/\/ibcloud.com.br\/blog\/criar-usuario-no-mysql\/"},"modified":"2014-05-13T02:54:50","modified_gmt":"2014-05-13T02:54:50","slug":"criar-usuario-no-mysql","status":"publish","type":"post","link":"https:\/\/humanizati.com.br\/blog\/2013\/08\/05\/criar-usuario-no-mysql\/","title":{"rendered":"Criar usu\u00e1rio no Mysql"},"content":{"rendered":"<p><span style=\"font-family: Arial, Helvetica, sans-serif;\"><b>Para criar usu\u00e1rio no Mysql \u00e9 necess\u00e1rio:<\/b><\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><b><br \/><\/b><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">1 &#8211; Logar no servidor mysql&nbsp;<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9cb9c;\"><br \/><\/span><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9cb9c;\">mysql -u root -pSenha<\/span> &nbsp; &nbsp;&#8212; &nbsp; (trocar root e senha pelos seus respectivos usu\u00e1rio e senha)<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">2 &#8211; Executar o comando de cria\u00e7\u00e3o do usu\u00e1rio<\/span><br \/><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\">mysql&gt; CREATE USER &#8216;teste&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;teste12345&#8217;;<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">3 &#8211; Executar de comando de configura\u00e7\u00e3o de permiss\u00f5es<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9cb9c;\"><br \/><\/span><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9cb9c;\">mysql&gt; GRANT ALL PRIVILEGES ON *.* TO &#8216;teste&#8217;@&#8217;localhost&#8217; WITH GRANT OPTION<\/span><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: #f9cb9c;\">;<\/span><\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">Nesse exemplo acima no item 2 \u00e9 criado o usu\u00e1rio que tem acesso apenas pelo localhost, no item 3 \u00e9 atribu\u00eddo a este usu\u00e1rio a permiss\u00e3o de acessar tudo por\u00e9m somento do localhost.<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">Para permitir que o usu\u00e1rio acesse tudo de qualquer host basta alterar a defini\u00e7\u00e3o de usu\u00e1rio e host no caso:<\/span><br \/><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\">&#8216;teste&#8217;@&#8217;localhost&#8217;<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">muda para<\/span><br \/><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"background-color: #f9cb9c; font-family: Arial, Helvetica, sans-serif;\">&#8216;teste&#8217;@&#8217;%&#8217;<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">tanto no item 2 quanto no 3.<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">Eras isso!<\/span><br \/><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><\/span><span style=\"font-family: Arial, Helvetica, sans-serif;\">Valew!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Para criar usu\u00e1rio no Mysql \u00e9 necess\u00e1rio:1 &#8211; Logar no servidor mysql&nbsp;mysql -u root -pSenha &nbsp; &nbsp;&#8212; &nbsp; (trocar root e senha pelos seus respectivos&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,35],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-criar-usuario-mysql","tag-mysql-usuario"],"_links":{"self":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/19\/revisions\/79"}],"wp:attachment":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}