mysql单机多实例运行实践(1)
1.install mysql
get mysql
http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.1/mysql-5.1.41-linux-i686-icc-glibc23.tar.gz
[root@localhost mysql]# tar -zxvf mysql-5.1.41-linux-i686-icc-glibc23.tar.gz
[root@localhost mysql]# cd mysql-5.1.41-linux-i686-icc-glibc23
[root@localhost mysql]# vim README
[root@localhost mysql]# cd ..
[root@localhost mysql]# cp mysql-5.1.41-linux-i686-icc-glibc23 /usr/local/mysql
[root@localhost mysql]# cd /usr/local/mysql/
[root@localhost mysql]# vim INSTALL-BINARY
######################
The basic commands that you must execute to install and use a
MySQL binary distribution are:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
######################
[root@localhost mysql]# netstat -na | grep "3306"
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
[root@localhost mysql]# /usr/local/mysql/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.41 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test 
相关文档:
mysql索引详解,摘自《MySQL 5权威指南》
本文介绍了数据库索引,及其优、缺点。针对MySQL索引的特点、应用进行了详细的描述。分析了如何避免MySQL无法使用,如何使用EXPLAIN分析查询语句,如何优化MySQL索引的应用。本文摘自《MySQL 5权威指南》(3rd)的8.9节。(2007.07.0 ......
SLES 11
设置mysql服务自动启动状态
chkconfig mysql on
(chkconfig mysql off)
添加/删除mysql服务
/sbin/chkconfig --del mysql
/sbin/chkconfig --add mysql
查看mysql版本
mysql -V
mysqld -V
启停 mysql
service mysql start
service mysql stop
service mysql restart
......
大部分服务器管理员知道MySQL数据库管理系统(RDBMS)是高度灵活的软件块,带有范围广阔的启动选项,可以用来修改相关行为。然而,大部分人却不
清楚,标准MySQL客户端带有同等大量的启动选项,其中一些在日常MySQL交互作用中极为有用。这些选项本身不是
“秘密”,而它们中很多未被使用,甚至其中一些可以显著 ......
(1)、back_log:
要求 MySQL 能有的连接数量。当主要MySQL线程在一个很短时间内得到非常多的连接请求,这就起作用,然后主线程花些时间(尽管很短)检查连接并且启动一个新线程。
back_log
值指出在MySQL暂时停止回答新请求之前的短时间内多少个请求可以被存在堆栈中。只有如果期望在一个短时间内有很多连接,你需要增加它 ......