Red Hat enterprise linux 5 mysql安装步骤
一、安装服务器端
(1)、在有两个rmp文件的目录下运行如下命令:
[root@test1 local]# rpm -ivh MySQL-server-5.0.26-0.i386.rpm
显示如下信息:
warning: MySQL-server-5.0.26-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing…… ########################################### [100%]
1:MySQL-server ########################################### [100%]
……(省略显示)
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h test1 password 'new-password'
Starting mysqld daemon with databases from /var/lib/mysql
如出现如上信息,服务端安装完毕。
(2)、测试服务端安装是否成功,可运行netstat看Mysql端口是否打开,如打开表示服务已经启动,安装成功。Mysql默认的端口是3306。
[root@test1 local]# netstat -nat
显示如下信息:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
上面显示可以看出MySQL服务已经启动。
二、安装客户端
运行如下命令:
[root@test1 local]# rpm -ivh MySQL-client-5.0.26-0.i386.rpm
warning: MySQL-client-5.0.26-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing…… ########################################### [100%]
1:MySQL-client ########################################### [100%]
显示安装完毕。
三、登录MySQL
(1)、MySQL默认用户是root,由于初始没有密码,第一次进时只需键入mysql即可。
[root@test1 local]# mysql
出现了“mysql>”提示符,恭喜你,安装成功!
(2)、增加了密码后的登录格式如下:
mysql -u root -p
Enter password: (输入密码)
四、修改登录密码
/usr/bin/mysqladmin -u root password 'new-password'
五、启动与停止
(1)、启动
[root@test1 init.d]# /etc/init.d/mysql start
(2)、停止
/usr/bin/mysqladmin -u root -p shutdown
(3)、自动启动
/sbin/chkconfig mysql on
六、开启远程连接
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
mysq
相关文档:
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
体验一下linux下编写和使用动态库与静态库,范例:helloworld程序。
首先编写静态库:
hellos.h
#ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
hellos.c
#include "hellos.h"
#include <stdio.h>
void prints(char *str)
{
printf("print in sta ......
转载
(1)软连接可以 跨文件系统 ,硬连接不可以 。实践的方法就是用共享文件把windows下的 aa.txt文本文档连接到linux下/root目录 下 bb,cc . ln -s aa.txt /root/bb 连接成功 。ln aa.txt /root/bb 失败 。
(2)关于 I节点的问题 。硬连接不管有多少个,都指向的是同一个I节点,会把 结点连接数增加 ,只要结点的连接 ......
gprof介绍
gprof是GNU profiler工具,存在于binutils工具包。可以显示程序运行的“flat profile”,包括每个函数的调用次数,每个函数消耗的处理器时间。也可以显示“调用图”,包括函数的调用关系,每个函数调用花费了多少时间。还可以显示“注释的源代码”,是程序源代码的一个复本,标记 ......
感觉对这个有些晕,做了个实验,弄清楚了。
实验思路,用同一份代码编译同时生成动态和静态库,通过测试程序调用,看调用的是动态库还是静态库。
生成静态库代码:
/***********hellod.h*************/
#ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
/*hellod.c*/
#include "hellod ......