Faire un backup du serveur maître sur l'esclave. Sur le maitre : GRANT REPLICATION SLAVE ON *.* TO repl@'%' IDENTIFIED BY '<password>'; Dans my.ini : (section mysqld) log-bin server-id=1 Sur l'esclave : Dans my.ini : (section mysqld) server-id=2 # nom d'hote du maitre master-host=serveur_maitre # port sur lequel écoute le serveur maitre master-port=3306 # nom utilisé pour se connecter au maitre master-user=repl # mot de passe pour se connecter au maître master-password=<password> Dans un client mysql : SLAVE START ;
Add user MySQL : GRANT ALL PRIVILEGES ON *.* TO 'SuperUser'@'%' IDENTIFIED BY 'SuperMotDePasse' WITH GRANT OPTION;
- Stop mysql
# /etc/init.d/mysql stop
- Lauch mysql with --skip-grant-tables (WARNING: your mysql server will launch without any password authentication, so please protect it first with a firewall or something if it's world accessible)
# mysqld_safe --skip-grant-tables
- Login as root without a password
$ mysql -u root
- Change the password
mysql> use mysql;
mysql> update user set password=PASSWORD("your_new_root_password") where User='root';
mysql> flush privileges;
mysql> quit
- Stop mysql
# /etc/init.d/mysql stop
- Start mysql again to re-enable authentication
# /etc/init.d/mysql startBackup : mysqldump -u root -pSuperMotDePasse --all-databases > backup.sql Restauration : mysql -u root -pSuperMotDePasse < backup.sql
First / Previous / Next / Last / Page 1 of 1 (5 posteets)