Sunday, January 20, 2013

mysql启动时报错

mysql启动时报错: [Note] Plugin 'FEDERATED' is disabled. Plugin 'ndbcluster' is disabled 

通过innobackupex对mysql进行数据恢复时,恢复完成后导致mysql服务不能正常启动了。。。

innobackupex --defaults-file=/etc/my.cnf --copy-back /data/2012-04-09_00-05-09/


这两天在对mysql数据库进行迁移时,碰到一些小问题,导致恢复后mysql服务无法正常启动,错误日志如下:

120409 13:47:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
120409 13:47:18 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
120409 13:47:18 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
120409 13:47:18 [Note] Plugin 'FEDERATED' is disabled.
120409 13:47:18 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
120409 13:47:19  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 /usr/local/mysql/data/ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120409 13:47:19 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql-db.pid ended


再看看,libdata1的文件大小:

# ls -lh /usr/local/mysql/data/

-rw-r--r-- 1 root  root  1073741824 03-29 00:40 ibdata1
-rw-r--r-- 1 root  root 51287949312 03-29 00:40 ibdata2
-rw-r--r-- 1 root  root  1073741824 03-29 00:40 ibdata3
-rw-r--r-- 1 root  root  5343543296 03-29 00:40 ibdata4

再看下/etc/my.cnf配置文件:

innodb_data_file_path = ibdata1:1000M:autoextend

问题原因,mysql/data目录下的ibdata1文件大小和配置文件里的文件大小不一致造成
原来配置文件里设置的libdata的二进制数据目录就一个,且数据大小也设置过低,需要做下改动(按恢复的数据文件大小来设置),设置如下:

innodb_data_file_path = ibdata1:1024M;ibdata2:48912M;ibdata3:1024M;ibdata4:1024M:autoextend]


再次启动mysql服务,还是报错。。原来是属主权限不对:

120409 14:24:39 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
120409 14:24:39 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
120409 14:24:39 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
120409 14:24:39 [Note] Plugin 'FEDERATED' is disabled.
120409 14:24:39 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
120409 14:24:40  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 /usr/local/mysql/data/ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120409 14:24:40 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql-db.pid ended

将数据目录权限改为mysql用户所有:

# chown -R mysql.mysql ../data

OK,再次启动,就可以了。。

Wednesday, December 19, 2012

system.img.ext4 unpack

system.img.ext4(system partition)
amss.bin(The device driver)
mdm.bin(base band)
recovery.img(recovery partition)
boot.img(core)

use  file ext4_utils (genext4.sh,make_ext4fs,mkuserimg.sh ,pack.sh,simg2img)

copy the file(mkuserimg.sh,simg2img) to "bin" directory and Modify permissions

    sudo cp ~/dir/make_ext4fs /bin/
    sudo chmod 755 /bin/make_ext4fs
    sudo cp ~/dir/simg2img /bin/
    sudo chmod 755 /bin/simg2img
    simg2img system.img.ext4 system.img
    mkdir temp //create directory "temp" to moutn the "system partition"
    file system.img  //dispaly the type of system.img
    mount -o loop system.img temp

Friday, April 13, 2012

Thursday, March 8, 2012

Apple iPad3


As recent history has shown, though, even those relatively modest changes could be enough for the company to attract waves of new buyers for its tablet computer.
The company said the new iPad will go on sale March 16 for a starting price of $499, unchanged from the last generation of iPads. The product will have a screen that provides a comparable level of clarity to the iPhone’s “retina display,” with higher resolution than conventional high-definition televisions, according to Apple executives.
And in a sign that Apple intends to more seriously protect its market share in the tablet market, the company said it would continue to sell its second-generation iPad, dropping the price to $399 from $499.
At a company event here, Apple also introduced a new version of Apple TV, the company’s $99 set-top box for accessing Internet video, which streams movies in the sharpest of the high-definition video formats, called 1080p.
The new product, called simply the new iPad with no numbers or letters following the name, is an effort to keep growth chugging along in a 2-year-old business that has turned into a major technology franchise for the company. Apple’s $9.15 billion in iPad sales over the holiday quarter was almost double the amount of revenue Microsoft brought in from its Windows software and not far from Google’s total revenue as a company during the same period.
Speaking from the same stage where Steve Jobs, the company’s late chief executive, introduced the second-generation iPad almost exactly a year ago, the company’s new chief executive, Timothy D. Cook, said the iPad last quarter outsold the number of PCs sold by any individual manufacturer.
“In many ways, the iPad is reinventing portable computing and outstripping the wildest predictions,” Cook said.
The new iPad, the third generation of the device, looks virtually indistinguishable from its predecessor, without any of the bold outward design changes often associated with new products from the company.
It features a faster processor — an A5X quad-core chip — and a higher-resolution screen — 2,048 by 1,536 pixels, more than 3.1 million pixels, or four times more than the current iPad.
It will also operate on the fourth-generation cellphone network technology known as LTE. In the United States, the new iPad will work on AT&T’s and Verizon’s networks .
The iPad will also allow users to dictate emails, although Apple did not introduce an iPad version of Siri, an iPhone virtual assistant feature that can schedule appoints and perform other tasks using natural sounding commands.
Last fall, Apple disappointed some pundits and enthusiasts by making mostly incremental enhancements with its latest smartphone, the iPhone 4S. That product ended up defying doubts to become a smash hit, leading to record sales over the holidays. During that time, Apple, based in Cupertino, Calif., solidified its lead as the most valuable company in the world, with a market capitalization of almost a half-trillion dollars, well ahead of its nearest rival, Exxon Mobil.
The new iPad may show how durable Apple’s hold on the tablet market is. For most of the two years the iPad has been on sale, Apple has faced competitors from Hewlett-Packard, Research In Motion, Samsung and Motorola, yet none has established a firm beachhead in the tablet business. A few of those competitors, like Hewlett, gave up.
The chief criticism that some stalwarts of the PC industry have leveled at the iPad is that the device is not well suited for creating content, even if it is good for consuming it. Apple, though, sought to undermine that argument with a number of new apps.
Those include a new version of its Mac software, iPhoto, for editing photographs. A new version of Apple’s Garage Band music software lets up to four people play in a virtual band together with four iPads that are connected together wirelessly.

Read more here: http://www.miamiherald.com/2012/03/07/2681449/apple-unveils-its-new-sharper.html#storylink=cpy

Thursday, February 2, 2012

JavaScript

       JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented,imperative, and functional programming styles.

      JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a Web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.

      JavaScript's use in applications outside Web pages — for example in PDF documents, site-specific browsers, and desktop widgets — is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web applications.

       JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.