易截截图软件、单文件、免安装、纯绿色、仅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的gcc

本来想装aide的,发现在configure的时候卡住了。仔细一看
checking for gcc......no
原来这个linux没有装gcc。谁叫我懒,直接把linux拷过来用。找了半天安装镜像文件,找到gcc-3.22-5.i386.rpm
。那就开始装吧~
1、检查文件关联
   rpm -ivh *.rpm后,一堆关联出来了
   乖乖,一看,五个包呢~
......

Linux学习笔记零零一

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

linux 2.6源代码情景分析笔记之进程11

下函数,创建进程描述符以及子进程执行所需要的所有其他数据结构。参数与do_fork()的参数相同,外加子进程的pid。
static task_t *copy_process(unsigned long clone_flags,unsigned long stack_start,struct pt_regs *regs,unsigned long stack_size,int __user *parent_tidptr,int __user *child_tidptr,int pid)
{
&n ......

linux服务器异常故障解决一例

服务器突然出现公网网络不通。还好有配两个IP,一公网,一内网,内网可通,通过内网连接到服务器上 。查看日志,dmesg,发现有这样一条:
Sep  9 14:34:36 slave kernel: NETDEV WATCHDOG: eth0: transmit timed out
/etc/init.d/network restart 网络服务重启一下,恢复正常。
到google查找资料,发现也有一样的问 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号