relecture commits précédents

This commit is contained in:
Daniel Jakots 2017-12-14 12:28:59 -05:00
parent 861a4a6331
commit 9435cf5b22
2 changed files with 8 additions and 8 deletions

View file

@ -1229,7 +1229,7 @@ Créer un utilisateur pour l'instance (il doit avoir un shell valide comme `/bin
# useradd mysql-foo # useradd mysql-foo
~~~ ~~~
Créer le dossier qui va accueillir le *datadir* et donner les bon droits : Créer le dossier qui va accueillir le *datadir* et donner les bons droits :
~~~ ~~~
# mkdir -p /srv/mysql-instances/foo # mkdir -p /srv/mysql-instances/foo

View file

@ -493,7 +493,7 @@ mysql> SET PASSWORD FOR 'jdoe'@'localhost' = PASSWORD('PASSWORD');
> *Note* : si vous remettez le même mot de passe que celui utilisé actuellement, cela va fonctionner, il n'y a pas de vérification > *Note* : si vous remettez le même mot de passe que celui utilisé actuellement, cela va fonctionner, il n'y a pas de vérification
## Connexion refusé après avoir créé une nouvelle instance mysql. ## Connexion refusée après avoir créé une nouvelle instance mysql.
Faire un *ps auwx*, pour récupérer toutes les options avec laquelle tourne l'instance MySQL: Faire un *ps auwx*, pour récupérer toutes les options avec laquelle tourne l'instance MySQL:
@ -505,13 +505,13 @@ Exemple:
root 34419 0.0 0.0 13720 3272 ? S Dec13 0:00 /bin/bash /usr/bin/mysqld_safe --user=mysqld2 --bind-address=0.0.0.0 --port=3308 --socket=/var/run/mysqld2/mysqld.sock --pid-file=/var/run/mysqld2/mysqld.pid --datadir=/srv/mysqld2/mysql --long_query_time=5 --slow_query_log=1 --slow_query_log_file=/var/log/mysqld2/slow.log --group_concat_max_len=10000 --max_connections=250 --back_log=100 --max_connect_errors=10 --key_buffer_size=512M --max_allowed_packet=64M --thread_stack=192K --thread_cache_size=80 --table_cache=4096 --table_open_cache=4096 --table_definition_cache=4096 --query_cache_limit=8M --query_cache_size=256M --query_cache_type=1 --max_heap_table_size=1G --tmp_table_size=1G --innodb_file_per_table --innodb_buffer_pool_size=29025M --innodb_additional_mem_pool_size=16M --innodb_thread_concurrency=16 --default-time-zone=-04:00 --tmpdir=/home/mysqld2tmp root 34419 0.0 0.0 13720 3272 ? S Dec13 0:00 /bin/bash /usr/bin/mysqld_safe --user=mysqld2 --bind-address=0.0.0.0 --port=3308 --socket=/var/run/mysqld2/mysqld.sock --pid-file=/var/run/mysqld2/mysqld.pid --datadir=/srv/mysqld2/mysql --long_query_time=5 --slow_query_log=1 --slow_query_log_file=/var/log/mysqld2/slow.log --group_concat_max_len=10000 --max_connections=250 --back_log=100 --max_connect_errors=10 --key_buffer_size=512M --max_allowed_packet=64M --thread_stack=192K --thread_cache_size=80 --table_cache=4096 --table_open_cache=4096 --table_definition_cache=4096 --query_cache_limit=8M --query_cache_size=256M --query_cache_type=1 --max_heap_table_size=1G --tmp_table_size=1G --innodb_file_per_table --innodb_buffer_pool_size=29025M --innodb_additional_mem_pool_size=16M --innodb_thread_concurrency=16 --default-time-zone=-04:00 --tmpdir=/home/mysqld2tmp
~~~ ~~~
Stoppé l'instance mysql concernée, par exemple : Stopper l'instance mysql concernée, par exemple :
~~~ ~~~
# mysqld_multi stop 2 # mysqld_multi stop 2
~~~ ~~~
Démarré l'instance avec toutes les options du *ps auwx* et ajouter l'option *--skip-grant-tables* pour désactivé l'authentification : Démarrer l'instance avec toutes les options du *ps auwx* et ajouter l'option *--skip-grant-tables* pour désactiver l'authentification :
~~~ ~~~
/bin/bash /usr/bin/mysqld_safe --user=mysqld2 --bind-address=0.0.0.0 --port=3308 --socket=/var/run/mysqld2/mysqld.sock --pid-file=/var/run/mysqld2/mysqld.pid --datadir=/srv/mysqld2/mysql --long_query_time=5 --slow_query_log=1 --slow_query_log_file=/var/log/mysqld2/slow.log --group_concat_max_len=10000 --max_connections=250 --back_log=100 --max_connect_errors=10 --key_buffer_size=512M --max_allowed_packet=64M --thread_stack=192K --thread_cache_size=80 --table_cache=4096 --table_open_cache=4096 --table_definition_cache=4096 --query_cache_limit=8M --query_cache_size=256M --query_cache_type=1 --max_heap_table_size=1G --tmp_table_size=1G --innodb_file_per_table --innodb_buffer_pool_size=29025M --innodb_additional_mem_pool_size=16M --innodb_thread_concurrency=16 --default-time-zone=-04:00 --tmpdir=/home/mysqld2tmp --skip-grant-tables /bin/bash /usr/bin/mysqld_safe --user=mysqld2 --bind-address=0.0.0.0 --port=3308 --socket=/var/run/mysqld2/mysqld.sock --pid-file=/var/run/mysqld2/mysqld.pid --datadir=/srv/mysqld2/mysql --long_query_time=5 --slow_query_log=1 --slow_query_log_file=/var/log/mysqld2/slow.log --group_concat_max_len=10000 --max_connections=250 --back_log=100 --max_connect_errors=10 --key_buffer_size=512M --max_allowed_packet=64M --thread_stack=192K --thread_cache_size=80 --table_cache=4096 --table_open_cache=4096 --table_definition_cache=4096 --query_cache_limit=8M --query_cache_size=256M --query_cache_type=1 --max_heap_table_size=1G --tmp_table_size=1G --innodb_file_per_table --innodb_buffer_pool_size=29025M --innodb_additional_mem_pool_size=16M --innodb_thread_concurrency=16 --default-time-zone=-04:00 --tmpdir=/home/mysqld2tmp --skip-grant-tables
@ -535,12 +535,12 @@ Se connecter à l'instance avec l'utilisateur root, créer l'utilisateur mysqlad
~~~ ~~~
# mysql -u root -P3308 # mysql -u root -P3308
MariaDB [(none)]> CREATE USER mysqladmin@localhost IDENTIFIED BY 'VDDxUhT5HD3mbcct'; MariaDB [(none)]> CREATE USER mysqladmin@localhost IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL ON *.* to mysqladmin@localhost IDENTIFIED BY 'VDDxUhT5HD3mbcct'; MariaDB [(none)]> GRANT ALL ON *.* to mysqladmin@localhost IDENTIFIED BY 'password';
~~~ ~~~
Enfin supprimé l'utilisateur root : Enfin supprimer l'utilisateur root :
~~~ ~~~
MariaDB [(none)]> DELETE FROM mysql.user where User='root'; MariaDB [(none)]> DELETE FROM mysql.user where User='root';
~~~ ~~~