Linux下基于源码方式安装MySQL 5.6(2)

Linking CXX executable mysqltest_embedded
  [100%] Built target mysqltest_embedded
  Scanning dependencies of target my_safe_process
  [100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
  Linking CXX executable my_safe_process
  [100%] Built target my_safe_process

SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # make install
SZDB:/usr/local/src/mysql_src/mysql-5.6.17 # cd /usr/local/mysql
SZDB:/usr/local/mysql # chown -R mysql .
SZDB:/usr/local/mysql # chgrp -R mysql .
SZDB:/usr/local/mysql # scripts/mysql_install_db --user=mysql

..........
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
   
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
   
      ./bin/mysqladmin -u root password 'new-password'
      ./bin/mysqladmin -u root -h SZDB password 'new-password'
   
    Alternatively you can run:
   
      ./bin/mysql_secure_installation
   
    which will also give you the option of removing the test
    databases and anonymous user created by default.  This is
    strongly recommended for production servers.
   
    See the manual for more instructions.
   
    You can start the MySQL daemon with:
   
      cd . ; ./bin/mysqld_safe &
   
    You can test the MySQL daemon with mysql-test-run.pl
   
      cd mysql-test ; perl mysql-test-run.pl
 
    New default config file was created as ./my.cnf and
    will be used by default by the server when you start it.
    You may edit this file to change server settings
        ..........

SZDB:/usr/local/mysql # chown -R root .
SZDB:/usr/local/mysql # chown -R mysql data   
SZDB:/usr/local/mysql # cp support-files/mysql.server /etc/init.d/mysql.server  #配置自启动
SZDB:/usr/local/mysql # cp support-files/my-default.cnf /etc/my.cnf            #添加缺省的my.cnf配置文件 
SZDB:/usr/local/mysql # bin/mysqld_safe --user=mysql &                          #启动mysql
[1] 21004
SZDB:/usr/local/mysql # 140521 02:54:54 mysqld_safe Logging to '/usr/local/mysql/data/SZDB.err'.
140521 02:54:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

#配置环境变量,通过软链或者修改环境变量实现(PATH=$PATH:/usr/local/mysql/bin/;export PATH)
 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysql /usr/local/bin 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysqladmin /usr/local/bin 
SZDB:~ # ln -fs /usr/local/mysql/bin/mysqld_safe /usr/local/bin 

#登陆到mysql
SZDB:/usr/local/bin # mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.17 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

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

--------------------------------------分割线 --------------------------------------

CentOS 6.5编译安装MySQL 5.6.16 

Ubuntu 14.04下安装MySQL

《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF

Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主从服务器

Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/f343ddce53449ed97e7cefba0b8c7456.html