Public
Snippet $631 authored by Jeremy

MYSQL - Autoriser remote connexion CentOs

Edited
$ yum -y install mysql-server
$ service mysqld start
$ /usr/bin/mysql_secure_installation

Appuyer sur entrée quand demande le mot de passe pour la première fois

Set root password? Y
Mettre password
Appuyer sur entrée 1 fois !
Disallow root login remotely ? N

Appuyer sur entrée 2 fois !

$chkconfig mysqld on
$ iptables -I INPUT -p tcp --dport 3306 --syn -j ACCEPT
$ mysql -u root -p
$ CREATE USER 'root'@'%' IDENTIFIED BY 'password';
$ GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
$ FLUSH PRIVILEGES;
$ exit;
$ service mysqld restart
15 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment