Linux 下 Mysql配置问题集
一直以来我的文章都是以工作笔记的形式存在。这对于自己读起来没什么大碍,但是对于其他读者可能就有些迷茫。我尽量改改,换种方式。
1. MySQL 的版本
如果要支持分区表,则应该使用 5.1.x 以上的版本。如
mysql> show variables like '%version%';
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| protocol_version | 10 |
| version | 5.1.45-community-log |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | unknown-linux-gnu |
+-------------------------+------------------------------+
2. MySQL 的基本参数设定
此处涉及的参数是在应用中不断更新的。如下为 /etc/my.cnf 部分内容
[mysqld]
datadir=/var/lib/mysql
datadir=/home/mysql/data
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
#mysql 5.0 --log-slow-queries
#log-slow-queries=/var/log/mysql/slowquery.log
#log-queries-not-using-indexes=/var/log/mysql/noindex.log
#mysql 5.1
slow_query_log=1
slow_query_log_file=/var/log/mysql/slowquery.log
log-queries-not-using-indexes=1
#创建线程池来处理大链接量的应用
thread_cache_size=80
#加快客户端链接速度,可以屏蔽掉所有的ip反向解析
#当时注意到此问题,是因为在 show processlist 的时候,发现了大量的 user = 'unauthenticated user'链接存在。
#这是因为mysql在客户端链接时,会反向查询ip的hostname,
相关文档:
首先安装phpMyadmin
[root@aladdin phpMyAdmin]# uname -a
Linux aladdin.leadtek.com.cn 2.6.32.11-99.fc12.i686.PAE #1 SMP Mon Apr 5 16:15:03 EDT 2010 i686 i686 i386 GNU/Linux
[root@aladdin phpMyAdmin]# yum info phpmyadmin
Loaded plugins: presto, refresh-packagekit
Installed Packages
Name &nbs ......
安装 MySQL,可以在终端提示符后运行下列命令:
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// 安装php5-mysql 是将php和mysql连接起来
一旦安装完成,MySQL 服务器应该自动启动。您可以在终端提示符后运行以下命令来检查 MySQL 服务器是否正在运行:
s ......
ARM+LINUX路线,主攻嵌入式Linux操作系统及其上应用软件开发目标:
(1)掌握主流嵌入式微处理器的结构与原理(初步定为arm9)
(2)必须掌握一个嵌入式操作系统(初步定为uclinux或linux,版本待定)
(3)必须熟悉嵌入式软件开发流程并至少做一个嵌入式软件项目。
从事嵌入式软件开发的好处是 ......