mysql
tomhat
这个作者很懒,什么都没留下…
展开
-
mysql数据库,命令;mysql 赋权限;
1、安装 MySQL首先来进行 MySQL 的安装。打开超级终端,输入:[root@localhost ~]# yum install mysql mysql-server安装完毕,让 MySQL 能够随系统自动启动:[root@localhost ~]# chkconfig --levels 235 mysqld on[root@localhost ~]# /etc/init...原创 2013-06-21 10:41:42 · 264 阅读 · 0 评论 -
MYSQL数据库导入数据时出现乱码的解决办法
安装mysql后配置MySQL[root@sample ~]#vim /etc/my.cnf ← 编辑MySQL的配置文件[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Default to using old password format for compatibility with my...原创 2013-06-21 12:33:23 · 115 阅读 · 0 评论 -
Mysql : tinytext, text, mediumtext, longtext
Mysql : tinytext, text, mediumtext, longtext(2012-08-01 14:26:23)转载▼标签:杂谈 分类: mysql一、数字类型类型 范围 说明 Char(N) [ binary] N=1~255 个字元 binary :分辨大小写 固定长度 std_name cahr(32) ...原创 2014-09-16 19:22:58 · 163 阅读 · 0 评论 -
Mysql Job failed to start
I got an error while am up starting the mysql service.[code="bash"]/etc/init.d/mysql startRather than invoking init scripts through /etc/init.d, use the service(8)utility, e.g. service mysql s...原创 2016-08-16 09:08:17 · 176 阅读 · 0 评论 -
Ubuntu安装PHP+MYSQL+Apache 和GD库
Ubuntu安装PHP+MYSQL+Apache 和GD库[code="bash"]sudo apt-get updatesudo apt-get dist-upgrade[/code]安置上mysql5[code="bash"]sudo apt-get install mysql-server[/code]安置apache2[code="bash"...原创 2016-01-06 16:06:40 · 188 阅读 · 0 评论 -
自动备份数据库
最近数据库出现问题,想到定时备份数据库SQL于是查到点资料自己总结了一下:[size=large]linux在shell中获取时间[/size]获得当天的日期date +%Y-%m-%d输出: 2011-07-28将当前日期赋值给DATE变量DATE=$(date +%Y%m%d)有时候我们需要使用今天之前或者往后的日期,这时可以使用date的 -d参数...原创 2014-12-11 14:15:32 · 61 阅读 · 0 评论 -
sql查询列为null显示0
查itemfile表中itemdesc、re_level列的信息,要求re_level为NULL时显示为0,写出相应语句。[code="sql"]Oracle :select itemdesc,nvl(re_level,’0’) from itemfile;Mysql: select itemdesc,ifnull(re_level,’0’) from itemfile;Sql...原创 2016-02-22 10:04:18 · 2746 阅读 · 0 评论 -
卸载apt-get安装的mysql
[code="bash"]删除 mysql1 sudo apt-get autoremove --purge mysql-server-5.02 sudo apt-get remove mysql-server3 sudo apt-get autoremove mysql-server4 sudo apt-get remove mysql-common (非常重要)清理...原创 2016-03-04 09:32:21 · 200 阅读 · 0 评论 -
SQL语句
重置root密码[code="bash"]# /etc/init.d/mysqld stop # mysqld_safe --user=mysql --skip-grant-tables --skip-networking & # mysql -uroot -p mysql> UPDATE user SET Password=PASSWORD('newpassword'...原创 2016-03-09 15:43:29 · 79 阅读 · 0 评论