易截截图软件、单文件、免安装、纯绿色、仅160KB

mysql server安装

三. mysql server安装
    ------------------以下为扩展:删除mysql----------------
    删除 mysql
    sudo apt-get autoremove --purge mysql-server-5.0
    sudo apt-get remove mysql-server
    sudo apt-get autoremove mysql-server
    sudo apt-get remove mysql-common //这个很重要  应该为自动删除autoremove
    上面的其实有一些是多余的。
    清理残留数据
    dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
    --------------------扩展完毕--------------------------
1. mysql server安装
    1.sudo apt-get install mysql-server mysql-client
    2.输入root密码为root
    3.更改mysql最大连接数:
    sudo gedit /etc/mysql/my.cnf 增加或修改max_connections=1024;
2.进入mysql:
    sudo mysql –u root -p  输入密码root进入。
3.添加/删除权限
    语法如下:
    grant all privileges(or other options) on *.* (or others) to username@"localhost( or % or otherIP)" identified by"username" (or with grant option);若with         grant option则为超级用户。
   
    revoke all privileges (or other options) on *.* (or others) from username(or username@"localhost( or % or otherIP)");
    默认安转已经为root添加了本机权限,回收权限时请慎重对root权限回收。
    注:回收权限并不删除用户。如果想删除,需要delete from user where USER like '...'
    加权限的用户创建:
    eg:mysql>grant all privileges on epaper.* to wenxin@'localhost' identified by 'xinwen365';   意思是:允许wenxin从本地访问epaper数据库并且具有对该数据库的所有操作
       mysql>grant all privileges on epaper.* to wenxin@'%' identified by 'xinwen365'; &nbs


相关文档:

Initial Startup of MySQL Cluster


Starting the cluster is not very difficult after it has been configured. Each cluster node process must be started separately, and on the host where it resides. The management node should be started first, followed by the data nodes, and then finally by any SQL nodes:
On the management host, issu ......

linux下导入、导出mysql数据库命令

一、导出数据库用mysqldump命令(注意mysql的安装路径,即此命令的路径):
1、导出数据和表结构:
mysqldump -u用户名 -p 数据库名 > 数据库名.sql
#/usr/local/mysql/bin/mysqldump -uroot -p abc > abc.sql
敲回车后会提示输入密码
2、只导出表结构
mysqldump -u用户名 -p -d 数据库名 > 数据库名.sql
# ......

linux 安装 mysql rpm

在linux下面安装mysql,首相要根据操作系统的版本,选择对应的mysql的版本,官方网站上有非常明确的分类
http://dev.mysql.com/downloads/
在这里我实验的操作系统是redhat linux
mysql 用了两个安装包,一个是server端,一个是client,我用的是rpm包,安装的指令比较简单。
MySQL-server-community-5.1.42-0.rhel4.i38 ......

MySQL查询优化 索引

MySQL索引
    MySQL查询优化最重要的当属建立正确的索引,没有索引,面对海量数据,一切的优化纯属空话。什么是索引?索引为什么那么重要呢?这些问题这里就不谈了,还是先写下我首次优化MySQL查询海量数据的心得吧,数据库表类型是MyISAM。
    如果简单的一个查询语句,MySQL查询速度还 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号