Linux系统下修改MySQL的root密码
第一种方法:
root用户登录系统
usr/local/mysql/bin/mysqladmin -u root -p password 新密码
enter password 旧密码
第二种方法:
root用户登录mysql数据库
mysql> update mysql.user set password=password("新密码")where User="root";
mysql> flush privileges;
mysql> quit ;
mysql忘记root密码如何处理?
如果 MySQL 正在运行,首先结束mysql进程: killall mysqld
启动 MySQL (非正常方式起动):/usr/local/mysql/bin/mysqld_safe –skip-grant-tables &
这样就可以不需要密码进入 MySQL :/usr/local/mysql/bin/mysql -u root -p (要求输入密码时直接回车即可)
mysql> update user mysql.set password=password("新密码") where user="root";
mysql> flush privileges;
mysql> quit;
重新结束进程:killall mysqld
用正常方式启动 MySQL :/usr/local/mysql/bin/mysqld_safe -user=mysql &
注:
update语句里的password=password("新密码")只有新密码三个字在操作时替换成我们要设置的密码,其它原样照写,之前我做失败
的原因就在于把括号及前面的password给略掉造成的.它们的作用是使密码以加密的形式存储在数据库里。
相关文档:
1. download & setup jdk
2. download eclipse and test a simple example of java
3. setup mysql use yum(or download & setup by hand)
yum install mysql
problem1:linux mysql configuration & use
solution1:
mysql -uroot -p
passw ......
引:
Linux操作系统是由Linus Torvalds先生在1991年创建的,之后不断获得互联网上众多程序员的自愿支持,经过十几年的发展,如今已经成为继Windows之后的第二大电脑操作系统软件。
你是否对Linux有充分的了解呢?作为一种平台,Linux首先获得了沉溺于某种癖好之士和黑客们的
青睐。Linux操作系统是由Linus
Torvalds先生 ......
在服务器上写部署项目的脚本 ,需要把上传来的最新的项目解压, 部署 ,启动服务 实现自动化
于是找到最新的文件是第一件事情
就得到了以下脚本
$ ls -lrt | awk '/xmhi/ { f=$NF };END{ print f }'
中间的xmhi是文件所包含的字符串
另外如果要ls出所有的文件名
$ ls -l |awk '{print$9}' ......
10.5.2 精通定时器设置
函数alarm设置的定时器只能精确到秒,而以下函数理论上可以精确到微妙:
#include <sys/select.h>
#include <sys/itimer.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval
*value, struct itimerval *ovalue ......
包含3个文件夹,和一个文件Makefile
目录组织结构如下:
Makefile
inc/hello.h
main/main.c
src/hello.c
Makefile文件在外面,这样生成的.o和可执行文件都在外面,clean之后会很干净,结构清晰
文件内容如下:
Makefile(之所以用大写,因为make可以识别Makefile和makefile,用大写可以鲜明一些)::
# String declar ......