ITeye博客

mysql

共 9 篇文章

CentOS 6.5 安装与配置LAMP

文章转自 http://fxm5547.blog.163.com/blog/static/122479154201412521342907/ 如若侵权,请与我留言。谢谢! 准备工作: 1、配置防火墙,开启80端口、3306端口 vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #允许80端口通过防火墙 -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT #允许3306端口通过防火…

2014-06-28 17:21 · mysql · php · apache · centos

centos用yum安装mysql-server 详细步骤

1.安装: #yum -y install mysql-server 2.修改配置: #vi /etc/my.cnf 暂时修改一下编码(添加在密码下方添加): default-character-set = utf8 3.启动mysql服务,并设定为系统服务: # chkconfig mysqld on ← 设置MySQL服务随系统启动自启动 # chkconfig –list mysqld ← 确认MySQL自启动mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off ← 如果2–5为on的状态就OK #service mysqld start ←启动服务…

2014-01-10 15:14 · mysql · centos

MySql 性能检查和优化方法

我一直是使用mysql这个数据库软件,它工作比较稳定,效率也很高。在遇到严重性能问题时,一般都有这么几种可能: 1、索引没有建好; 2、sql写法过于复杂; 3、配置错误; 4、机器实在负荷不了; 1、索引没有建好 如果看到mysql消耗的cpu很大,可以用mysql的client工具来检查。 在linux下执行 /usr/local/mysql/bin/mysql -hlocalhost -uroot -p 输入密码,如果没有密码,则不用-p参数就可以进到客户端界面中。 看看当前的运行情况 show full processlist 可以多运行几次 这个命令可以看到当前正在执行的sql语句…

2013-09-22 09:22 · mysql · SQL · MySQL · Linux

关于linux下mysql数据库的自动定时备份教程

最近为了搞linux下mysql的自动定时备份,特意写了个教程,方便以后查阅,并跟大家分享,如有问题,欢迎吐槽。 前提设定为凌晨零点零分,这样保存起来的数据都是昨天的。 废话少说。开始 1. 首先我建立了 /home/user/mysql_autobackup.sh 注:mysql_autobackup.sh 内容如下: /usr/bin/mysqldump -uroot -ppassword_card >/st_backup/stcard/stcard_$(date +%Y%m%d).sql /usr/bin/mysqldump -uroot -ppassword sthy_card >/…

2012-08-14 14:21 · mysql · 程序 · MySQL · SSH · Linux · crontab · 自动定时备份

Write operations are not allowed in read-only mode (FlushMode.NEVER)

使用Spring提供的Open Session In View而引起Write operations are not allowed in read-only mode (FlushMode.NEVER) 错误解决: 在没有使用Spring提供的Open Session In View情况下,因需要在service(or Dao)层里把session关闭,所以lazy loading 为true的话,要在应用层内把关系集合都初始化,如 company.getEmployees(),否则Hibernate抛session already closed Exception; Open Sessi…

2011-11-23 18:02 · JAVA · js · tomcat · jdk · myeclipse · mysql · hibernate · DAO · Spring · Hibernate · Web · Bean

mysql 1064 USING BTREE 问题

从服务器上通过mysqldump命令导出文件 在导入到另外的库时,提示: MySQL 返回: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE, KEY authorid ( authorid ) USING BTREE, KEY dateline (`datel' at line 24 经查找是mysql版本的问题,导入的库是 ser…

2011-09-01 11:34 · mysql · SQL · MySQL · mysqldump

linux下mysql的卸载、安装全过程

卸载mysql 1、查找以前是否装有mysql 命令:rpm -qa|grep -i mysql 可以看到mysql的两个包: mysql-4.1.12-3.RHEL4.1 mysqlclient10-3.23.58-4.RHEL4.1 2、删除mysql 删除命令:rpm -e --nodeps 包名 ( rpm -ev mysql-4.1.12-3.RHEL4.1 ) 3、删除老版本mysql的开发头文件和库 命令:rm -fr /usr/lib/mysql rm -fr /usr/include/mysql 注意:卸载后/var/lib/mysql中的数据及/etc/my.cnf不会删…

2011-08-12 08:38 · mysql · linux · MySQL · Linux

linux下安装mysql详解

(转)安装 mysql5.0 chmod 755 mysql-standard-5.0.15-linux-gnu-i686-glibc23.tar.gz tar xfz mysql-standard-5.0.15-linux-gnu-i686-glibc23.tar.gz //将解压后生成的目录, mv mysql-standard-5.0.15-linux-gnu-i686-glibc23 mysql //复制到/usr/local/下并改名为mysql groupadd mysql // 建立mysql组 useradd mysql -g mysql //建立mysql用户并且加入到my…

2011-08-11 11:29 · mysql · linux · 防火墙 · MySQL · Linux · mysql5

查看linux下mysql的版本号

1:在终端下:mysql -V。 以下是代码片段: [shengting@login ~]$ mysql -V mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686) 2:在mysql中:mysql> status; 以下是代码片段: mysql> status; mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686) Connection id: 416 SSL: Not in use Current pager: stdout Using outfile: ''…

2011-08-11 10:33 · mysql · linux · MySQL · Linux