MySQL安装与应用【Linux下的安装与配置】
Linux下的安装与配置
如果所安装的Linux系统没有内置的MySQL,笔者建议在Linux中使用RPM包来安装MySQL,同样这也是MySQL官方提供的建议。笔者接触最多的Linux系统是Radhat的“近亲”:CentOS,由于CentOS较新的版本都内置了MySQL,因此在安装系统时就将MySQL安装并注册为系统服务,省去了不少工作量,此处也就不对Linux下的安装做太多陈述,仅提供部分资料供参考。
注意:
MySQL至少需要Linux 2.0版本。
以下是网友提供的CentOS 5下安装MySQL的步骤(出处:http://wenda.tianya.cn/wenda/thread?tid=0c194eed74f2577b),仅供参考。
CentOS5下MySQL的安装步骤
创建mysql用户组和用户
[root@centos ]# groupadd mysql
[root@centos ]# useradd -g mysql mysql
[root@centos ]# cd homexule
[root@centos ]# chmod 755 mysql-5.0.22.tar.gz
编译并安装MySQL
[root@centos ]# tar zxvf mysql-5.0.22.tar.gz
[root@centos ]#cd mysql-5.0.22
[root@centos mysql-5.0.22] .configure --prefix=usrlocalmysql
[root@centos mysql-5.0.22] make
[root@centos mysql-5.0.22] make install
配置并启动MySQL
[root@centos mysql-5.0.22]# cp support-filesmy-medium.cnf etcmy.cnf
[root@centos mysql-5.0.22]# cd usrlocalmysql
[root@centos mysql]# binmysql_install_db --user=mysql
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-filesmysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands
usrlocalmysqlbinmysqladmin -u root password 'new-password'
usrlocalmysqlbinmysqladmin -u root -h centos.job100.com password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with
cd usrlocalmysql ; usrlocalmysqlbinmysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory
cd sql-bench ; perl run-all-tests
Please report any problems with the usrlocalmysqlbinmysqlbug script!
The latest information about MySQL is available on the web at
httpwww.mysql.com
Support MySQL by buying supportlicenses at httpshop.my
相关文档:
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
1. find
find是最常见和最强大的查找命令,你可以用它找到任何你想找的文件。
find的使用格式如下:
$ find <指定目录> <指定条件> <指定动作>
- <指定目录>: 所要搜索的目录及其所有子目录。默认为当前目录。
- <指定条件>: 所要搜索的文件的特征。
- <指定动作 ......
NOW()函数以`'YYYY-MM-DD HH:MM:SS'返回当前的日期时间,可以直接存到DATETIME字段中。
CURDATE()以’YYYY-MM-DD’的格式返回今天的日期,可以直接存到DATE字段中。
CURTIME()以’HH:MM:SS’的格式返回当前的时间,可以直接存到TIME字段中。
例:insert ......
作者:敖士伟
Mysql 用的是Linux (non RPM packages)
一、将mysql-5.5.0-m2-linux-i686-glibc23.tar.gz下载到/home/ikmb 并在当前目录解压;
……..
mysql-5.5.0-m2-linux-i686-glibc23/data/mysql/
mysql-5.5.0-m2-linux-i686-glibc23/data/test/
…………
二、创建MySQL组, ......
mysql字符集编码向来是一个难题,因为有时候为大多数人想的UTF8可以解决一些难题,不过不要太理想化了,有时候在window客户端下 修改成utf8,mysql是不支持的,所以还得具体问题具体分析,可是这个还真得需要你花点时间来研究
下面是一些别人的文章,在此先谢了
& ......