Pages

Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Tuesday, July 10, 2012

Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on CentOS 5.x automatically

Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on CentOS 5.x automatically

This Tutorial is for all phpFox users have unmanaged VPS and interested to enable Video Upload module and i hope this is help.

My primary Linux distribution of choice is CentOS. CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by RedHat. Thus CentOS is merely speaking a copy of RedHat and provides the same stability and security.

Thursday, October 6, 2011

Remote connect to SQL Server 2005 Express

SQL Server 2005 không cho phép remote connection cho nên chúng ta cần phải active service này lên một cách thủ công. Message sau sẽ xuất hiện trong trường hợp service này chưa được start.

“An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connection. ….?"

Friday, June 4, 2010

Thay đổi giá trị max_allowed_packet của MySQL

Thay đổi giá trị max_allowed_packet của MySQL

Trong quá trình thao tác với cơ sở dữ liệu, đặc biệt là khi phải restore các database lớn mình thường gặp phải vấn đề với max_allowed_packet của server. Tranh thủ hôm nay động lại món này mình ghi vào đây để sau này có thể tra cứu :)



Có nhiều cách để thay đổi giá trị của biến max_allowed_packet trong MySQL, mình sẽ nói các cách mình đã dùng nhé :D

1. Chỉnh sửa trực tiếp giá trị của biến max_allowed_packet trong file /etc/my.cnf . Sửa dòng này có nội dung thế này:

[mysqld]
max_allowed_packet=16M => điều chỉnh giá trị theo ý bạn muốn. Đừng để lớn quá nhé ;)

2. Điều chỉnh tại chế độ dòng lệnh nhưng không làm khởi động lại (giá trị max_allowed_packet chỉ được áp dụng trong phiên làm việc đó).

mysql> show variables like ‘max_allowed_packet%’ ;
+——————–+———+
| Variable_name | Value |
+——————–+———+
| max_allowed_packet | 1048576 |
+——————–+———+
1 row in set (0.00 sec)

mysql> set max_allowed_packet = 1073741824;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like ‘max_allowed_packet%’ ;
+———————————–+———————+
| Variable_name | Value |
+———————————-+———————+
| max_allowed_packet | 1073741824 |
+——————–+————+———————-+

3. Khởi động lại MySql server với giá trị của biến –max_allowed_packet do bạn chọn.

/etc/init.d/mysqld restart –max_allowed_packet=1024M (hoặc giá trị bạn muốn thay đổi khác).