MYSQL5忘记密码后重置root密码

系统:DEBIAN etch 4.0

MYSQL数 据库版本:5.0.27

(1)以 系统root权限登陆

(2)停止MYSQL服务器:
/etc/init.d/mysql stop

(3)跳过授权表执行MYSQL服务器:
mysqld_safe --skip-grant-tables --skip-networking &
(注:参数--skip-grant-tables为跳过授权表;--skip-networking为不监听TCP/IP连接)

(4)执行MYSQL客户端:
mysql

(5)使用mysql数据库
use mysql;

(6)更新root密码
update user set password=password('新密码') where user='root';

(7)关闭mysql服务器,用正常方试起动
/etc/init.d/mysql restart

Last modified onSaturday, 05 January 2013 13:21

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0018412440{main}( ).../index.php:0
20.08904262616Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08904262616Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.292511453616Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.293111478120Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.293911533448Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.294211560848require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.303311960480K2ControllerItem->execute( ).../k2.php:64
90.303311960480K2ControllerItem->display( ).../BaseController.php:710
100.313612611184K2ControllerItem->display( ).../item.php:78
110.313712611184K2ControllerItem->display( ).../controller.php:19
120.318512982224Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.320413002592K2ViewItem->display( ).../ViewController.php:102
140.391715816776K2ViewItem->display( ).../view.html.php:742
150.391715816776K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.394215989712include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in 主机
  • Read 3609 times

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0018412440{main}( ).../index.php:0
20.08904262616Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08904262616Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.292511453616Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.293111478120Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.293911533448Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.294211560848require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.303311960480K2ControllerItem->execute( ).../k2.php:64
90.303311960480K2ControllerItem->display( ).../BaseController.php:710
100.313612611184K2ControllerItem->display( ).../item.php:78
110.313712611184K2ControllerItem->display( ).../controller.php:19
120.318512982224Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.320413002592K2ViewItem->display( ).../ViewController.php:102
140.391715816776K2ViewItem->display( ).../view.html.php:742
150.391715816776K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.394215989712include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top