ShuiBo'blog

人生若只如初见

嗨,我是水波 (@saber).


君以国士待我,我必国士报之。

mysql进入安全模式修改密码。

步骤:

首先sudo /etc/init.d/mysql stop 停止服务器

执行 sudo mysqld_safe –skip-grant-tables & 确定服务器已停止,

[1] 5239

melina@melina-laptop:~$ 110320 21:13:14 mysqld_safe Logging to syslog.
110320 21:13:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

看到上面的结果后,输入mysql -u melina 出现下面结果:

Welcome to the MySQL monitor.  Commands end with ; or \\g.
Your MySQL connection id is 1
Server version: 5.1.37-1ubuntu5.5 (Ubuntu)
Type ''help;'' or ''\\h'' for help. Type ''\\c'' to clear the current input statement.
mysql>

输入use mysql

    mysql> use mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed

执行更新密码

    mysql>update  user set password=password("551111") where user="root";
    Query OK, 3 rows affected (0.08 sec)
    Rows matched: 3  Changed: 3  Warnings: 0
    
    mysql> commit;
    Query OK, 0 rows affected (0.00 sec)
    mysql> exit;
    Bye
    melina@melina-laptop:~$ mysql -u root
    Welcome to the MySQL monitor.  Commands end with ; or \\g.
    Your MySQL connection id is 3
    Server version: 5.1.37-1ubuntu5.5 (Ubuntu)
    
    Type ''help;'' or ''\\h'' for help. Type ''\\c'' to clear the current input statement.
    
    mysql>
最近的文章

yii 实现字段排序

为了实现yii1里面字段排序,看了些资料还是没有解决,最后不行了,就直接在header添加连接。。。。array( ''name'' => ''insertDate'', ''header'' => "<a href=''".Yii::app()->createUrl(''data/user/list2'')."''>注册时间</a>", ''value'' => fun...…

继续阅读
更早的文章

wget 搭建lnmp环境

安装必要的软件yum install -y update yum install pcre yum install openssl* yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip...…

继续阅读