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给略掉造成的.它们的作用是使密码以加密的形式存储在数据库里。
相关文档:
首先在Linux系统上安装samba
然后启动Windows虚拟机,在资源管理器中将samba的地址(例如//192.168.1.10/share)映射为一个虚拟盘符Z
最后启动SourceInsight,在Z盘上建立工程,并导入文件。
注意:以后每次使用SourceInsight之前先要连接samba服务器,比如说打开盘符Z。 ......
Linux下软件的安装与卸载
一、二进制分发软件包的安装与卸载
Linux软件的二进制分发是指事先已经编译好二进制形式的软件包的发布形式,其优点是安装使用容易,缺点则是缺乏灵活性,如果该软件包是为特定的硬件/操作系统平台编译的,那它就不能在另外的平台或环境下正确执行。
1、*.rpm形式的二进制软件包
安装:rpm ......
所需文件hello.c, main.c, hello.h, Makefile,在同一个目录下
hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c:
#include "stdio.h"
#include "hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
......
包含3个文件夹
目录组织结构如下:
inc/hello.h
main/main.c, Makefile
src/hello.c
文件内容如下:
hello.h:
void hello(char name[]);
main.c:
#include <stdio.h>
#include "../inc/hello.h"
// The second hello.h should in ""
int main()
{
hello("GCC");
printf("Haha Linux Ub ......
Linux
/ Linux文件系统的入口,也是处于最高一级的目录;
/bin 基础系统所需要的那些命令位于此目录,也是最小系统所需要的命令;比如 ls、cp、mkdir等命令;功能和/usr/bin类似,这个目录中的文件都是可执行的,普通用户都可以使用的命令。做为基础系统所需要的最基础的命令就是放在这里。
/boot Linux的内核及引导系 ......