« Unix::mariadb » : différence entre les versions

De wiki_pcwiki2
Aller à la navigationAller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 18 : Ligne 18 :
     GRANT ALL PRIVILEGES ON *.* TO `root`@`srv18.pcstreet.org` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
     GRANT ALL PRIVILEGES ON *.* TO `root`@`srv18.pcstreet.org` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
     GRANT ALL PRIVILEGES ON *.* TO `root`@`sd-116794` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
     GRANT ALL PRIVILEGES ON *.* TO `root`@`sd-116794` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
     FLUSH PRIVILEGES;
     FLUSH PRIVILEGES;
     ''NB: le password écrit ici correspond à 'fr...ce'''
     ''NB: le password écrit ici correspond à 'fr...ce'''


  #5) Vérifier:
  #5) Vérifier:
     SELECT host,user,password, grant_priv from user where user='root';
     SELECT Host,User,Password, Grant_priv from user where user='root';
     Tous les grant_priv doivent être à 'Y'
     Tous les Grant_priv doivent être à 'Y'


  #6) Terminer:
  #6) Terminer:
       #1) Éditer '''/etc/mysql/mariadb.conf.d/50-server.cnf'''
       #1) Éditer '''/etc/mysql/mariadb.conf.d/50-server.cnf'''
       et supprimer ''''skip-grant-tables'''' sous ['''mysqld''']
       et supprimer ''''skip-grant-tables'''' sous ['''mysqld''']

Version du 25 juillet 2023 à 08:04

KEYWORDS: MARIADB

Le 24/07/2023:
Encore une fois, je suis ennuyé avec les droits mysql.
Je pense avoir trouvé une solution:
#1) Éditer /etc/mysql/mariadb.conf.d/50-server.cnf
    et ajouter 'skip-grant-tables' sous [mysqld]
#2) Lancer mariadb: systemctl start mariadb
#3) Se connecter: mysql -u root --password=fr...ce mysql
#4) Lancer les ordres:
    GRANT ALL PRIVILEGES ON *.* TO `root`@`debian9-test` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`xps13` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`xps13.pcstreet.org` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`srv18.pcstreet.org` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`sd-116794` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*75699F1346D8ABC6D739E7A22DAF2F90835181D1' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    NB: le password écrit ici correspond à 'fr...ce'
#5) Vérifier:
    SELECT Host,User,Password, Grant_priv from user where user='root';
    Tous les Grant_priv doivent être à 'Y'
#6) Terminer:
     #1) Éditer /etc/mysql/mariadb.conf.d/50-server.cnf
     et supprimer 'skip-grant-tables' sous [mysqld]