Creare utenti MySql

Un piccolo post molto banale ma che mi รจ spesso molto utile per dei rapidi copia-incolla.

Creare un utente MySql con relativo database e permessi corretti.

CREATE USER 'uid'@'localhost' IDENTIFIED BY 'pwd';
GRANT USAGE ON * . * TO 'uid'@'localhost' IDENTIFIED BY 'pwd';
CREATE DATABASE IF NOT EXISTS dbname;
GRANT ALL PRIVILEGES ON dbname . * TO 'uid'@'localhost';

i parametri da personalizzare sono:

  • uid: nome utente
  • pwd: password
  • dbname: nome del database

Leave a Reply

Your email address will not be published. Required fields are marked *

*


5 × 8 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>