jejeje a decir verdad no es "Una dificil" :D, solo
tienes que hacer lo que se menciona en el mismísimo
manual de MySQL (y al cúal simplemente quise remitirte
pero no lo encontré en linea en español :():
------------------
A.4.1 How to Reset the Root Password
If you have never set a root password for MySQL, the
server will not require a password at all for
connecting as root. However, it is recommended to set
a password for each account. See section 5.4.1 General
Security Guidelines.
If you set a root password previously, but have
forgotten what it was, you can set a new password. The
following procedure is for Windows systems. The
procedure for Unix systems is given later in this
section.
The procedure under Windows:
1. Log on to your system as Administrator.
2. Stop the MySQL server if it is running. For a
server that is running as a Windows service, go to the
Services manager:
Start Menu -> Control Panel -> Administrative Tools ->
Services
Then find the MySQL service in the list, and
stop it. If your server is not running as a service,
you may need to use the Task Manager to force it to
stop.
3. Open a console window to get to the DOS command
prompt:
Start Menu -> Run -> cmd
4. We are assuming that you installed MySQL to
`C:\mysql'. If you installed MySQL to another
location, adjust the following commands accordingly.
At the DOS command prompt, execute this command:
C:\> C:\mysql\bin\mysqld-nt --skip-grant-tables
This starts the server in a special mode that
does not check the grant tables to control access.
5. Keeping the first console window open, open a
second console window and execute the following
commands (type each on a single line):
C:\> C:\mysql\bin\mysqladmin -u root
flush-privileges password "newpwd"
C:\> C:\mysql\bin\mysqladmin -u root -p shutdown
Replace ``newpwd'' with the actual root password
that you want to use. The second command will prompt
you to enter the new password for access. Enter the
password that you assigned in the first command.
6. Stop the MySQL server, then restart it in normal
mode again. If you run the server as a service, start
it from the Windows Services window. If you start the
server manually, use whatever command you normally
use.
7. You should now be able to connect using the new
password.
In a Unix environment, the procedure for resetting the
root password is as follows:
1. Log on to your system as either the Unix root
user or as the same user that the mysqld server runs
as.
2. Locate the `.pid' file that contains the
server's process ID. The exact location and name of
this file depend on your distribution, hostname, and
configuration. Common locations are `/var/lib/mysql/',
`/var/run/mysqld/', and `/usr/local/mysql/data/'.
Generally, the filename has the extension of `.pid'
and begins with either `mysqld' or your system's
hostname. Now you can stop the MySQL server by sending
a normal kill (not kill -9) to the mysqld process,
using the pathname of the `.pid' file in the following
command:
shell> kill `cat /mysql-data-directory/host_name.pid`
Note the use of backticks rather than forward
quotes with the cat command; these cause the output of
cat to be substituted into the kill command.
3. Restart the MySQL server with the special
--skip-grant-tables option:
shell> mysqld_safe --skip-grant-tables &
4. Set a new password for the root@localhost MySQL
account:
shell> mysqladmin -u root flush-privileges password
"newpwd"
Replace ``newpwd'' with the actual root password
that you want to use.
5. You should now be able to connect using the new
password.
Alternatively, on any platform, you can set the new
password using the mysql client:
1. Stop mysqld and restart it with the
--skip-grant-tables option as described earlier.
2. Connect to the mysqld server with this command:
shell> mysql -u root
3. Issue the following statements in the mysql
client:
mysql> UPDATE mysql.user SET
Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;
Replace ``newpwd'' with the actual root password
that you want to use.
4. You should now be able to connect using the new
password.
------------------------
y nuevamente una disculpa por lo extenso y el idioma,
de todas maneras espero te sirva, un saludo a todos
los de la lista!!!! (soy nuevo en ella XD)
--- killyan911 <
killyan911@...> wrote:
>
>
>
> Hola muchachos... que tengan un feliz dia...
> Les cuento que como aprendis de administrador de un
> servidor linux he
> tenido un problemita... ese problemita es que el
> anterior
> edministrador no me entrego el password root de
> Mysql asi que no he
> podido controlar las bases de datos... asi que me
> gustaria saber como
> puedo recuperar la clave root de Mysql sin perder
> los otros usuarios
> que tienen paginas que utilizan Mysql y las bases de
> datos que ya
> existen. yo tengo el root de la maquina pero no se
> como con los
> privilegios de root pueda yo recuperar el root de
> Mysql... la verdad
> les agradesco los aportes y que no he tenido
> coperacion del anterior
> administrador pues no se encuentra en la ciudad y
> cuando lo contacte
> via telefonica la respuesta es que olvido la clave
> root de Mysql y que
> no podia hacer nada.
>
>
>
>
>
>
>
>
>
> Enlaces de Yahoo! Grupos
>
>
http://espanol.groups.yahoo.com/group/software-libre/
>
>
software-libre-unsubscribe@...
>
>
>
>
>
>
Diego C.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com