
Centos 7 y MySql-server problema con root
Publicado por gonzalo (3 intervenciones) el 10/12/2015 19:40:23
Buenos dias a todos
acabo de instalar un servidor centos 7, despues instalar mysql intente asegurar la instalacion pero me pide el password del root de mysql.
apenas lo acabo de instalar asi que no hay password para el root.
segui este procedimiento pero me pide el password del root.
intente seguir este procedimiento y continua negandome el acceso.
We use Yum to Remove MySQL, like so:
yum remove mysql mysql-server
With MySQL removed, we can safely backup the configuration:
mv /var/lib/mysql /var/lib/mysql_old_backup
If you'd rather remove it, issue:
rm -vR /var/lib/mysql
Now we can safely reinstall MySQL, using the default configuration that is included in the package from the Official MySQL repository (we need wget to fetch the rpm that will update your repos):
yum install wget
Now download and install the repository:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm
Verify the repositories are installed:
ls -1 /etc/yum.repos.d/mysql-community*
Issue the actual install command (This will replace the mysql-server in the CentOS repository with the official package from upstream MySQL):
yum install mysql-server
Use the script provided to set the root password, now that we have a fresh install again: mysql_secure_installation
If you ever need to set the password after using the script, use:
mysql -u root
Now you can use the standard commands from systemctl, part of systemd to Start and Stop the daemon like so:
systemctl start mysqld
alguien sabe que problema hay entre Centos y Mysql? en instalaciones anteriores nunca se me presento este caso.
gracias por la ayuda.
salu2
acabo de instalar un servidor centos 7, despues instalar mysql intente asegurar la instalacion pero me pide el password del root de mysql.
apenas lo acabo de instalar asi que no hay password para el root.
segui este procedimiento pero me pide el password del root.
intente seguir este procedimiento y continua negandome el acceso.
We use Yum to Remove MySQL, like so:
yum remove mysql mysql-server
With MySQL removed, we can safely backup the configuration:
mv /var/lib/mysql /var/lib/mysql_old_backup
If you'd rather remove it, issue:
rm -vR /var/lib/mysql
Now we can safely reinstall MySQL, using the default configuration that is included in the package from the Official MySQL repository (we need wget to fetch the rpm that will update your repos):
yum install wget
Now download and install the repository:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm
Verify the repositories are installed:
ls -1 /etc/yum.repos.d/mysql-community*
Issue the actual install command (This will replace the mysql-server in the CentOS repository with the official package from upstream MySQL):
yum install mysql-server
Use the script provided to set the root password, now that we have a fresh install again: mysql_secure_installation
If you ever need to set the password after using the script, use:
mysql -u root
Now you can use the standard commands from systemctl, part of systemd to Start and Stop the daemon like so:
systemctl start mysqld
alguien sabe que problema hay entre Centos y Mysql? en instalaciones anteriores nunca se me presento este caso.
gracias por la ayuda.
salu2
Valora esta pregunta


0