linux上装多个mysql
安装步骤
1先安装好第一个mysql :
#tar zxvf mysql*.tar.gz
#cd mysql*
#groupadd mysql
#useradd -g mysql mysql
#./configure --prefix=/usr/local/mysql #make
#make install
#scripts/mysql_install_db
#chown -R root /usr/local/mysql
#chown -R mysql /usr/local/mysql/var
#chgrp -R mysql /usr/local/mysql
#cp support-files/my-medium.cnf /etc/my.cnf
#/usr/local/mysql/bin/safe_mysqld --user=mysql &
#ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
#/usr/local/mysql/bin/mysqladmin -u root password uarefool
#echo "/usr/local/mysql/bin/safe_mysqld& --user=mysql" >> /etc/rc.d/rc.local
2安装另外的,
#mysql_install_db --datadir=数据库文件夹(如/home/var)
#chown -R mysql:mysql 数据库文件夹(如/home/var)
拷贝一个my.cnf
#cp /etc/my.cnf /etc/my.cnf2
配置my.cnf2
端口改成其他的比如3307
sock改成 /tmp/mysql.sock2
数据库文件夹位置在
[mysqld]节点下面配置
增加 datadir= 数据库文件夹(如/home/var)
增加节点[mysqld_safe]
pid-file=/home/var/mysqld.pid
log-error= 之类的
bin#mysqld_safe --defaults-file=/etc/my.cnf2 --pid-file=/home/var/mysqld.pid &(如果配置文件里面配置pid-file了 ,这里的pid-file这个参数可以省略)
登陆新的数据库 或改密码 要指定 sock文件位置
如mysql -S /tmp/mysql.sock2
mysqladmin -S /tmp/mysql.sock2 -uroot password root (设置数据库的用户名密码)
相关文档:
牛津字典中对"kernel"一词的定义是:"较软的、通常是一个坚果可食用的部分。"当然还有第二种定义:"某个东西核心或者最重要的部分。"对Linux来说,它的Kernel无疑属于第二种解释。让我们来看看这个重要的东西是如何工作的,先从一点理论说起。
广义地来说kernel就是一个软件,它在硬件和运行在计算机上 ......
Linux, named after the inventor, Linus Torvalds, is a so different OS for everyone against Windows. To everyone who used to use Windows, Linux need us to do more for everything which we usually do by computer, such as playing a video.
Someone says, Linux is for the ones who are good at the computer ......
Linux, named after the inventor, Linus Torvalds, is a so different OS for everyone against Windows. To everyone who used to use Windows, Linux need us to do more for everything which we usually do by computer, such as playing a video.
Someone says, Linux is for the ones who are good at the computer ......
在写这篇文章的时候,有323个不同的发行版
被
distrowatch.com关注。有的被称作Ehad,有的叫做EstrellaRoja。很多名字里面都有包括一个“X”字母,一些展示特性的吉祥
物和自己的交流社区。他们当中并不是所有的都是完全基于Linux基础框架和发展活跃的,但大多数主流发行版如此。这是一个选择多样的世界,是 ......