1.3.1、安装MySQL(版本跟公司线上环境一致就可以)具体可参考MySQL手册。安装完成后加一个远程访问用户权利,后面例子会用到。例如:user:mysql; passwd:1234561.3.2、安装MySQLdbMySQLdb为python连接MySQL数据库的引擎;官方地址:http://...
分类:
数据库 时间:
2014-07-15 08:06:33
阅读次数:
3723
使用Windows Azure 创建好Linux虚拟机之后,如果你使用默认的用户密码登陆root是不行的,其原因是Windows Azure创建Linux虚拟机时并没有同时设置root密码,如果要想使用root账户,还必须得使用“sudo passwd root”指令重新设置root密码。
6.1 引言UNIX系统的正常运行需要使用大量与系统有关的数据文件,针对这些数据文件的可移植接口是本章的主题。本章还介绍了系统标识函数、时间和日期函数6.2 口令文件UNIX系统的口令文件包含了下列各字段,这些字段包含在中定义的passwd结构中用户名 char *pw_name加密口令 ...
分类:
其他好文 时间:
2014-07-14 10:51:13
阅读次数:
257
[root@localhost ~]# which passwd/usr/bin/passwd[root@localhost ~]# whereis passwdpasswd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /...
分类:
系统相关 时间:
2014-07-13 17:55:28
阅读次数:
352
应用背景:我们刚刚添加了一个用户Luffy,但是不知道他的默认shell是什么。问题:如何取出一个用户的默认shell?解决方法:#grep‘^Luffy\>‘/etc/passwd|cut-d:-f7/bin/bashf通过上面的方法,我们就得到了Luffy这个用户的默认shell文本搜索工具:就是要根据用户指定的文本模..
分类:
其他好文 时间:
2014-07-13 14:40:33
阅读次数:
266
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);//封装mysql操作类,包括连接功能,及查询功能.classmysqlextendsabsdb{protectedstatic$ins=null;protected$host;//主机名protected$user;//用户名protected$passwd;//密码protected$db;//数据库名protected$port;//端口protected..
分类:
数据库 时间:
2014-07-13 14:31:08
阅读次数:
354
Red and BlackProblem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on...
分类:
其他好文 时间:
2014-07-13 13:10:07
阅读次数:
220
通过修改/etc/inittab.通过这个文件修改系统的启动方式.
ls –l /etc/ | more (管道),将前面的结果交给后面的命令进行处理。
在linux中遇到问题使用man命令。
查找文件信息并将文件存储到一个制定的文件中。
ls –la > “a.txt”
创建组名:
创建组:
查...
分类:
系统相关 时间:
2014-07-12 20:36:34
阅读次数:
419
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a ...
分类:
其他好文 时间:
2014-07-12 20:10:54
阅读次数:
165
1、添加用户,首先用adduser命令添加一个普通用户,命令如下:#adduser keaising//添加一个名为keaising的用户#passwd ljl //修改密码Changing password for user keaising.New UNIX password: //在这里输入新...
分类:
其他好文 时间:
2014-07-12 15:01:56
阅读次数:
161