WEB开发网
开发学院数据库MySQL Linux安装多个MySQL 阅读

Linux安装多个MySQL

 2008-09-06 11:09:46 来源:WEB开发网   
核心提示:1、按照常规安装,[root@ff_girl mysql5122]# chown -R root .[root@ff_girl mysql5122]# chown -R mysql data[root@ff_girl mysql5122]# chgrp -R mysql .[root@ff_girl mysql5122

1、按照常规安装。

[root@ff_girl mysql5122]# chown -R root .
[root@ff_girl mysql5122]# chown -R mysql data
[root@ff_girl mysql5122]# chgrp -R mysql .
[root@ff_girl mysql5122]# cp support-files/my-small.cnf /etc/my5122.cnf
[root@ff_girl mysql5122]# scripts/mysql_install_db --basedir=/usr/local/mysql5122/ --datadir=/usr/local/mysql5122/data/ --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

。。。

首次启动MYSQL

[root@ff_girl mysql5122]# bin/mysqld_safe --defaults-file=/etc/my5122.cnf &
[1] 13700
[root@ff_girl mysql5122]# 080124 15:01:46 mysqld_safe Logging to '/usr/local/mysql5122/data/localhost.localdomain.err'.
080124 15:01:46 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql5122/data

[root@ff_girl mysql5122]# bin/mysql -uroot -p -S/tmp/mysql5122.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.22-rc MySQL Community Server (GPL)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database      |
+--------------------+
| information_schema |
| mysql       |
| test        |
+--------------------+
3 rows in set (0.00 sec)

1 2 3 4  下一页

Tags:Linux 多个

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接