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


相关文档:

VC++ 连接MySQL 数据库

把mysql.h复制到vc的目录的include目录下
mysql.h在你mysql的安装目录下的include里面如:mysql\include
把libmysql.lib(在mysql的安装目录下,搜索下就能找到)复制到这个目录下(C:\Program Files\Microsoft Visual Studio 9.0\VC\lib),要不连接会出错。
如果编译连接时还是出错。就把libmysql.lib复制到你源程序的目 ......

MySQL Cluster Multi Computer Installation

    
Each MySQL Cluster host computer running an SQL node must have
installed on it a MySQL binary. For management nodes and data
nodes, it is not necessary to install the MySQL server binary, but
management nodes require the management server daemon
......

How to change max_allowed_packet value in mysql?

 
If you set it in the cnf(it may be my.ini file) you will likely need to restart the server. Optionally, that is a dynamic variable and can be SET GLOBAL or SET SESSION from the command line as well.So just do as follows.
 
mysql>show variables like’max_allowed_packet’; ......

【转】mysql解决自动断开8小时未曾用过的链接

http://www.cnblogs.com/neonlight/archive/2008/08/25/1276178.html
近一段时间,很多部门同事反映在使用mysql的过程出现数据库连接自动断开的问题,我对该问题做了一些实验。
关于mysql自动断开的问题研究结果如下,在mysql中有相关参数设定,当数据库连接空闲一定时间后,服务器就
会断开等待超时的连接:
1、相关参 ......

转 mysql安全设置

 [转 mysql安全设置]
使用MySQL,安全问题不能不注意。以下是MySQL提示的23个注意事项:
1.如果客户端和服务器端的连接需要跨越并通过不可信任的网络,那么就需要使用SSH隧道来加密该连接的通信。
2.用set password语句来修改用户的密码,三个步骤,先“mysql -u root”登陆数据库系统,然后“my ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号