易截截图软件、单文件、免安装、纯绿色、仅160KB

linux下 mysql 忘记root用户密码解决办法

linux下忘记了mysql的root用户密码解决办法:
  一、以系统的root用户(什么,你的系统的root用户密码也忘了。那只好看我另外一篇linux下忘记root用户的解决办法了先解决这个问题)登陆系统,进入终端
  [root@localhost /]#
  二、杀掉mysql进程
  方法1、[root@localhost /]#killall mysqld
  方法2、[root@localhost /]#ps -aux  //查看所有进程,找到mysql进程的pid
  然后
  [root@localhost /]#kill pid   //pid是mysql的进程号
  三、用--skip-grant-tables参数启动mysqld
  [root@localhost /]#/usr/local/mysql/bin/mysqld_safe --skip-grant-tables& 
  // 其中/usr..../bin是我的mysql安装目录
  [root@localhost /]#/usr/local/mysql/bin/mysql  //进入mysql
  mysql> use mysql   //切换到mysql database
  mysql> UPDATE user SET password=password('123456') WHERE user='root';
  //将root密码该为123456了
  四、注意事项
  The full command to load MySQL like this is:
  mysqld_safe --skip-grant-tables --autoclose
  (Editor's Note: Our technical reviewer found that he had to launch the mysqld_safe command
  without the '--autoclose' flag, otherwise the daemon never started.)
  这是国外网站说的,我没用autoclosa也成功了
  但是我在执行/usr/local/mysql/bin/mysqld_safe --skip-grant-tables&即出现错误提示:
  ./mysqld_safe
  starting mysqld daemon with databases from /usr/local/var
  STOPPING server from pid file /usr/local/var/localhost.localdomain.pid
  mysqld  ended
  然后进入/usr/local/var/
  vi ./localhost.localdomain.err 内容如下:
  050410 04:02:59 mysqld started
  050410 4:03:00 InnoDB:Operating system error number 13 in a file operation.
  InnoDB:The error means mysqld does not have the access rights to
  InnoDB:the directory.
  InnoDB:File name ./ibdata1
  InnoDB:File operation call:'create'.
  InnoDB:Cannot continue operation.
  050410 04:03:00 mysqld ended
  怀疑是./var目录的访问权限,故如下操作:
  chmod 777 ./var


相关文档:

Linux学习笔记零零一

Linux的起源
Unix商业化后,现有Minix,后有Linux。Linux是参照Unix写的。
微内核、宏内核;
操作系统提供的功能有两部分:进程管理和为进程提供的服务。
为进程提供的服务包括:文件系统、设备驱动、进程间通信。
为进程提供服务部分可以以独立的进程存在,脱离出内核,这就是微内核。而包含了这部分这部分服务的,就 ......

Linux下二进制文件的查看和编辑

一、在Linux下查看二进制文件的软件:
xxd
hexdump
二、编辑:
1、biew
2、hexedit
3、vim
Vim 来编辑二进制文件。Vim 本非为此而设计的,因而有若干局限。但你能读
取一个文件,改动一个字符,然后把它存盘。结果是你的文件就只有那一个字符给改了,
其它的就跟原来那个一模一样。
   要保证 Vim 别把 ......

linux下md5sum的使用

MD5算法常常被用来验证网络文件传输的完整性,防止文件被人篡改。MD5 全称是报文摘要算法(Message-Digest Algorithm 5),此算法对任意长度的信息逐位进行计算,产生一个二进制长度为128位(十六进制长度就是32位)的“指纹”(或称“报文摘要”),不同的文件产生相同的报文摘要的可能性是非常非常之 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号