广

MYSQL

  • MYSQL
  • MSSQL
  • Redis
  • MongoDB
  • oracle数据库
  • 数据管理

    Linux安装多个MySQL

    2018-04-09 07:41:28 次阅读 稿源:互联网
    零七网广告
    全网推广平台,软文发布

      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)

    零七网部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与零七网进行文章共享合作。

    零七网广告
    零七网广告
    零七网广告
    零七网广告