MySQL - Centos 7 y MySql-server problema con root

 
Vista:
sin imagen de perfil

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
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Centos 7 y MySql-server problema con root

Publicado por Martha (80 intervenciones) el 04/01/2016 12:18:07
algunas distribuciones traen el password de Root de MySQL de "serie" para evitar malas prácticas. Otras la traen abierta y te avisan de que pongas password.

Te he encontrado un artículo muy interesante porque yp suelo olvidar el password de root con frecuencia.

http://blog.desdelinux.net/como-cambiar-el-password-del-usuario-root-de-mysql-por-terminal/

De esta manera podrás poner el password que mejor te convenga y no tendrás que desinstalar MySQL si no lo deseas.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar