易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

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
# ......

使用ADO通过ODBC连接MYSQL >MFC工程

1.配置名字为myodbc的数据源
2.在stdafx.h中加上
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename ("EOF", "adoEOF")
3.在程序初始化的方法中加上
AfxEnableControlContainer();
// 初始化COM,创建ADO连接等操作
AfxOleInit();
4.在合适的地方加上
public:_ConnectionPt ......

Memcache VS MySQL Query Cache.

记得前天有人问我, Memcache 和 MySQL 自己的 Query Cache 有啥区别? 我这样回答的,前者是山寨中的战斗机,后者是官方的战斗机。
新手回答问题,错了莫怪。哈哈哈。
好像细节上的差别还是有的。
Memcache优点如下:
  1. 理论上可以支撑无限并发业务操作。
  2. 可以启用单独的实例来缓存巨多的数据。(当 ......

Mysql 基本的常用命令

有很多朋友虽然安装好了 MySQL 但却不知如何使用它。在这篇文章中我们就从连接 MySQL、修改密码、增加用户等方面来学习一些 MySQL 的常用命令。
一、连接MySQL。
格式: mysql -h主机地址 -u用户名 -p用户密码
1、例1:连接到本机上的MYSQL。
  首先在打开 DOS 窗口,然后进入目录 mysql\bin,再键入命令mysql -u ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号