Configuracion de mysql linux

Páginas: 2 (326 palabras) Publicado: 5 de octubre de 2010
Hoy veremos como se puede recuperar contraseña de root del servidor de bases de datos MySQL. Este procedimiento funciona en Linux , con los siguientes cinco pasos:

# 1: Detener el proceso delservidor MySQL.

root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL database server mysqld [ OK ]
root@servidor-ubuntu:~#

# 2: Iniciar el servicio/demonio de MySQL (mysqld) con laopcion –skip-grant-tables asi no pedira contraseña.

root@servidor-ubuntu:~# mysqld_safe --skip-grant-tables &
[1] 10702
root@servidor-ubuntu:~# nohup: ignoring input and redirecting stderr tostdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[10741]: started

# 3: Conectar al servidor MySQL como el usuario root.

root@servidor-ubuntu:~# mysql -u root
Welcometo the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql>Paso # 4: Configure la nueva contraseña de root.

mysql> use mysql;

Reading table information for completion of table and column names
You can turn off this feature to get a quickerstartup with -A

Database changed
mysql> update user set password=PASSWORD("321") where User='root';
Query OK, 3 rows affected (0.03 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flushprivileges;
Query OK, 0 rows affected (0.01 sec)

Paso # 5: Salir y reiniciar el servidor MySQL

mysql> quit
Bye
root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL databaseserver mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[11414]: ended
[ OK ]
[1]+ Done mysqld_safe --skip-grant-tables

Paso # 6: Reinicio de MySQLroot@servidor-ubuntu:~# /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

root@servidor-ubuntu:~#...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Configuracion de asterisk cdr en mysql
  • Configuración del SGBD MySQL
  • Instalacion mysql en linux
  • Practica mysql linux
  • Configuración linux (max 4.0)
  • Configuración red linux
  • Configuracion del dhcp en linux
  • Configuracion Servicio Linux

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS