資源描述:
《linux安裝多個mysql--》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在學術論文-天天文庫。
1、Linux安裝多個MySQL>> 1、按照常規(guī)安裝。[rootff_girlmysql5122]#choysql5122]#choysqldata[rootff_girlmysql5122]#chgrp-Rmysql.[rootff_girlmysql5122]#cpsupport-files/my-small.f/etc/my5122.f[rootff_girlmysql5122]#scripts/mysql_install_db--basedir=/usr/local/mysql5122/--datadir=/usr/loca
2、l/mysql5122/data/--user=mysqlInstallingMySQLsystemtables...OKFillinghelptables...OKTostartmysqldatboottimeyouhavetocopysupport-files/mysql.servertotherightplaceforyoursystem。。?! ∈状螁覯YSQL[rootff_girlmysql5122]#bin/mysqld_safe--defaults-file=/etc/my5122.f[1]13700[rootff
3、_girlmysql5122]#08012415:01:46mysqld_safeLoggingto'/usr/local/mysql5122/data/localhost.localdomain.err'.08012415:01:46mysqld_safeStartingmysqlddaemon/usr/local/mysql5122/data[rootff_girlmysql5122]#bin/mysql-uroot-p-S/tmp/mysql5122.sockEnterpassonitor. mandsendu
4、nityServer(GPL)Type'help;'or'h'forhelp.Type'c'toclearthebuffer.mysql>shoation_schema
5、
6、mysql
7、
8、test
9、+--------------------+3roysql>grantshutdoulti_admin'localhost'identifiedby'123456';QueryOK,0roysql>flushpriv
10、ileges;QueryOK,0roysql>exitBye 停掉MYSQL服務。[rootff_girl~]#/usr/local/mysql5122/bin/mysqladmin-uroot-p-S/tmp/mysql5122.sockshutdoysql5122]#cpdatadata2[rootff_girlmysql5122]#mvdatadata1[rootff_girlmysql5122]#choysqldata2[rootff_girlmysql5122]#chgrp-Rmysql. 示例配置文件 [ro
11、otff_girlmysql5122]#cat/etc/my5122.f[mysqld_multi]mysqld =/usr/local/mysql5122/bin/mysqld_safemysqladmin=/usr/local/mysql5122/bin/mysqladminuser =multi_adminpassysqld1]socket =/tmp/mysql1.sockport =3307pid-file =/usr/local/mysql5122/data1/david_yeung.pid1datadir
12、 =/usr/local/mysql5122/data1language =/usr/local/mysql5122/share/mysql/englishuser =mysql#TheMySQLserver[mysqld2]port =3308socke123下一頁>>>>這篇文章來自..,。t =/tmp/mysql2.sockpid-file =/usr/local/mysql5122/data2/david_yeung.pid2datadir =/usr/local/mysql5122/data2la
13、nguage =/usr/local/mysql5122/share/mysql/englishuser =mysql。。。[isamchk]key_buffer=8Msort_buffer_size=8M[myisamchk]k