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

一个 mysql server 上的小技巧

转自http://www.linuxbyte.org/yi-ge-mysql-server-shang-de-xiao-ji-qiao.html
在my.cnf 的 mysql 端 添加如下设置
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
prompt="(\u:mysql1@linuxbyte.org \R:\m)[\d]: "
会产生如下效果:
root@ubuntu:/home/hew# mysql -u hew -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 320
Server version: 5.1.41-3ubuntu12.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
(hew:mysql1@linuxbyte.org 21:12)[(none)]: use linuxbyte #注意这里
 
Database changed
 
(hew:mysql1@linuxbyte.org 21:13)[linuxbyte]: use linuxsky; #这里
 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
 
(hew:mysql1@linuxbyte.org 21:13)[linuxsky]: #这里
如上所示我们可以在mysql命令行下显示当前的mysql 用户,所在主机,时间和所用的数据库。
这个在关键时刻可以让我们避免很多误操作。


相关文档:

mysql alter 语句用法,添加、修改、删除字段等


 源地址: http://www.pcppc.cn/shujuku/mysql/shujuku_163919.html
 
 
您正在看的MySQL教程是:MySQL数据库学习笔记。
  MySQL数据库学习笔记 
(实验环境:Redhat9.0,MySQL3.23.54) 
纲要: 
一,连接MySQL 
二,MySQL管理与授权 
三,数据库简单操作 
四, ......

wamp如何修改mysql默认空密码


cmd下切换到 mysql 安装目录

d:/mysql/bin
  
(如果用WAMP安装则是D:\wamp\bin\mysql\mysql5.1.30\bin)
前提:mysql用户root密码为空.

入 mysql -u root mysql
mysql> 状态下输入 
 update user set password=password('新密码') where user='root';

显   
Quer ......

PHP中的常用的25个MYSQL函数


1、mysql_connect()-建立数据库连接
格式:
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
例:
$conn = @mysql_connect(”localhost”, “username”, “password”) or dir(”不能连接到Mysql Server” ......

如何提高mysql load data infile的速度


版权声明
:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://bbayou.blogbus.com/logs/37045617.html
测试数据2.5G,共有数据9427567条。用的mysql的large服务器的配置。
load
一次需要大概10分钟左右。
建的表用的是MYISAM,调整了几个session的参数值
SET

SESSION

BULK_INSERT_BUFFER_S ......

cmd命令提示行连接mysql乱码的解决

1、MySQL是有一些环境变量可以设置,
可输入:show variables;可查看当前的环境变量设置;
2、这些变量当中有一部分与字符相关的设置,
可输入:show variables like ´character%´;查看;
3、其中character_set_results决定返回结果的编码,
windows下设为gb2312即可正常显示中文;
设置方法:set charac ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号