本以为自己用不上这类东西,因为自己的密码几乎都记得。然而经验是没有用的。我确实就忘记了密码。还好有google。找到了这篇:
http://www.91linux.com/html/article/database/mysql/20090330/16283.html
- 在windows下:
- 打开命令行窗口,停止mysql服务:Net stop mysql
- 到mysql的安装路径启动mysql,在bin目录下使用mysqld-nt.exe启动,在命令行窗口执行:mysqld-nt --skip-grant-tables
- 然后另外打开一个命入令行窗口,执行mysql,此时无需输入密码即可进入。
- >use mysql
- >update user set password=password("new_pass") where user="root";
- >flush privileges;
- >exit
- 使用任务管理器,找到mysqld-nt的进程,结束进程!
- 在重新启动mysql-nt服务,就可以用新密码登录了。
-
- 在linux下:
- 如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。
- 启动 MySQL :bin/safe_mysqld --skip-grant-tables &
- 就可以不需要密码就进入 MySQL 了。
- 然后就是
- >use mysql
- >update user set password=password("new_pass") where user="root";
- >flush privileges;
- 重新杀 MySQL ,用正常方法启动 MySQL 。
可惜,在linux下好象不太正确。当然或许我用的是ubuntu的关系。。
找了一下,找不到safe_mysqld,于是我进入/etc/init.d/目录,打开mysql文件,查看了一下里面安全启动的文件发现居然是mysqld_safe。郁闷了一下。。。
作个笔记。
平安夜快乐啊。。。
不想多写了。否则明天就又该说圣诞节快乐了。哈哈
少男少女们可以出去约会了。我是木有机会了啦 。。
同事需要,就写了个插件 。。。。
原来我也写过两个,但这次是正式为jQuery写的插件。。。
JavaScript代码
- $(document).ready(function(){
- $('div').autoResize({height:50});
- });
-
- jQuery.fn.autoResize = function(options)
- {
- var opts = {
- 'width' : 400,
- 'height': 300
- }
- var opt = $.extend(true, {},opts,options || {});
- width = opt.width;
- height = opt.height;
- $('img',this).each(function(){
- var image = new Image();
- image.src = $(this).attr('src');
-
- if(image.width > 0 && image.height > 0 ){
- var image_rate = 1;
- if( (width / image.width) < (height / image.height)){
- image_rate = width / image.width ;
- }else{
- image_rate = height / image.height ;
- }
- if ( image_rate <= 1){
- $(this).width(image.width * image_rate);
- $(this).height(image.height * image_rate);
- }
- }
- });
- }
原来的两篇在这里:
这两天在写公司的程序,也在想着把自己的sbPHP【SuperBase PHP】做好,正好遇到一朋友在试用CRM,突然想起,其实我的服务器基本上还空着。如果我装上CRM,是不是也可以让人使用呢?
于是找了点资料:The Top 10 Open-Source CRM Solutions ,看了一下,这些CRM中,有一些是不能够被我所使用的。。。因为我的服务器终究是只支持LAMP的。所以,只有三个程序可以被支持:
1. SugarCRM Inc. is the 800-pound gorilla in the open-source CRM category. Founded in 2004 by John Roberts, Clint Oram and Jacob Taylor, the Sugar open-source code has been downloaded more than 3 million times. The company has received $26 million in venture financing and employs more than 100 people. More than 12,000 companies use SugarCRM including Honeywell International, Starbucks Corp., First Federal Bank and BDO Seidman LLP. SugarCRM is written in PHP and is compatible with the MySQL database.
6. Vtiger CRM is built upon the LAMP/WAMP (Linux/Windows, Apache, MySQL and PHP) architecture, with the main development team based in Chennai, India. Vtiger CRM includes SFA (Sales Force Automation), customer-support and -service, marketing automation, inventory-management, multiple database support, security-management, product-customization, calendaring and email-integration features. It also offers add-ons (Outlook Plug-in, Office Plug-in, Thunderbird Extension, Customer Self-service Portal and Web Forms) and support for other add-ons. Vtiger is written in JavaScript, PHP and Visual Basic. It is compatible with ADOdb, MySQL and PostgreSQL databases.
8. XRMS CRM is a Web-based application suite that incorporates human-resources management, SFA and CRM. It is an on-premise solution for the small to midsize company. XRMS CRM includes computer telephony integration and the ability to add plug-ins for programs such as Outlook. XRMS CRM is operating-system independent, and it is written in an interpreted language (PHP). Compatible databases include ADOdb, SQL-based, Microsoft SQL Server, MySQL and other network-based DBMS.
好象sugarCRM和vtiger仿佛是一家的。。以前在篱笆的时候,还用过一个简单的CRM,不记得是什么名字了。。【找到了,是http://www.group-office.com/】
如果您需要在线的CRM也可以联系我哦。呵呵【随便说说。。。】
我用的vps是rashost的,装的是64位的ubuntu,9.10哦,最新版的。朋友在上面装个程序,结果发现无法运行。才想起来还没有安装ZendOptimizer。
找了一下ubuntu下如何安装的,却又搜索到Rashost的官方介绍。。。打开看了一下,没排过版。汗死。
原文内容如下:
XML/HTML代码
- Zend Optimizer是由PHP核心引擎“Zend”创建者Zend技术公司所开的免费PHP优化软件。据Zend公司透露使用这个软件某些情况下至少可以提高性能30%以上。今天我在安装了Ubuntu Hardy的VPS上配置了最新的ZendOp。过程记录如下:按照正常流程,在官方网站下载Zend Optimizer是需要注册用户登录之后才能下载的。下载一次后发现其实匿名用户也能下载,用下面这个URL即可: http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glib... 在安装Zend Optimizer之前需要先把apache,php安装好: apt-get install libapache2-mod-php 然后在/var/www/下创建index.php: echo "" > /var/www/index.php 然后用浏览器访问VPS,在首页里面搜索不到Zend Optimizer的字样.安装完成后应该能够搜索到Zend Optimizer才对。 tar zxf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz cd ZendOptimizer-3.3.3-linux-glibc23-i386 ./install.sh 然后安装程序会询问几个路径,一个个回答即可完成安装。 安装完成,重启apache,然后再访问首页,应该能搜索到Zend Optimizer的字样,说明安装成功了,接下来就可以开始测试性能了。
不过,由于我装的是64位的,就没有办法这样安装了。所以我去官方下载了64位的ZendOptimizer。并解压到服务器上。却发现,根本没有上文说的install.sh
打开readme看了一下,才发现,原来在linux下面,居然只需要加一行代码就行了
XML/HTML代码
- [Zend]
- zend_extension = "/xxx/xxx/ZendOptimizer.so"
当然,这或许是3.3.9独有的安装方式,反正而不需象windows那样先设置 zend_extenstion_ts,再设置zend_extension_manager.optimizer_ts了
添加了这一行后,运行/etc/init.d/apache2 restart ,再新建一个phpinfo的文件,发现里面已经有了zend optimizer的信息了。
最后提供一下64位的zendoptimizer的下载地址:http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz