Автор Тема: Как да се прескочи MySQL password  (Прочетена 2866 пъти)

BatGeorgeone

  • Напреднали
  • *****
  • Публикации: 18
    • Профил
    • WWW
Здравейте,

срещам следният проблем: имам админ и руут акаунт на един сървър  но нямам руут паролата за MySQL и не знам как мога да правя разните операции изискващи руут парола?

Опитах гимнастики с passwd i shadow файловете но безуспешно.

Бихте ли ме посъветвали как да "прескоча" руут паролата за Базата Данни и евентоално да я сменя с нова?

Предварително благодаря.
Активен

astronom

  • Напреднали
  • *****
  • Публикации: 254
    • Профил
Как да се прескочи MySQL password
« Отговор #1 -: Aug 30, 2005, 11:06 »
Справка в Google ми извади тази страница: http://www.linuxhomenetworking.com/linux-adv/mysql.htm#_Toc105342551, но съм сигурен, че можеш да намериш и други, както и да погледнеш в документацията на MySQL. Ако и това не помогне можеш да премахнеш базата мysql (служебната информация за потребители и т.н.) и да я пресъздадеш наново (погледни наръчника на MySQL, за повече информация).

Успех!
Активен

Г. Д. Сотиров

  • Гост
Как да се прескочи MySQL password
« Отговор #2 -: Aug 30, 2005, 11:08 »
Примерен код
  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.

      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.

      Create a text file and place the following command within it on a single line:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

      Save the file with any name. For this example the file will be ~/mysql-init.
   4.

      Restart the MySQL server with the special --init-file=~/mysql-init option:

shell> mysqld_safe --init-file=~/mysql-init &

      The contents of the init-file are executed at server startup, changing the root password. After the server has started successfully you should delete ~/mysql-init.
   5.

      You should be able to connect using the new password.


OR

Rest MySQL root password
10x to Google  '<img'>
Активен

BatGeorgeone

  • Напреднали
  • *****
  • Публикации: 18
    • Профил
    • WWW
Как да се прескочи MySQL password
« Отговор #3 -: Aug 30, 2005, 11:29 »
God bless ya pal '<img'>)

Мерси много за изчерпателния отговор!
Активен

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
password & samba
Настройка на програми
PAIN1 20 4350 Последна публикация Dec 31, 2003, 15:58
от the_real_maniac
password expiration
Настройка на програми
kostadinz 1 1078 Последна публикация Feb 16, 2004, 13:44
от melwin
password
Настройки на софтуер
Soulstealer 2 2574 Последна публикация Aug 24, 2004, 10:50
от Geek
Mysql загубена  password
Хардуерни и софтуерни проблеми
sredkov 4 3195 Последна публикация Jun 06, 2006, 18:14
от nothing
Security vulnerability in MySQL/MariaDB sql/password.c
Системна Сигурност
b2l 8 4443 Последна публикация Jun 14, 2012, 08:53
от b2l