(OEL 6.3) Mysql6.5二进制安装

本文详细记录了在Oracle Linux Server 6.3操作系统上安装MySQL 5.6的过程,包括创建MySQL用户和组、解压安装包、初始化MySQL数据库、配置开机启动等步骤,并提供了设置root密码的方法。
操作系统
Oracle Linux Server release 6.3

数据库
Mysql5.6

#添加mysql用户和组
[root@localhost app]# groupadd mysql

[root@localhost app]# useradd -g mysql mysql

[root@localhost app]#tar zxvf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
[root@localhost app]# ls
mysql-5.6.12-linux-glibc2.5-x86_64         oracle
mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

[root@localhost app]# mv mysql-5.6.12-linux-glibc2.5-x86_64 mysql

[root@localhost app]# chown mysql:mysql mysql

[root@localhost app]# pwd
/app

[root@localhost app]# cd mysql

#初始化mysql库
[root@localhost mysql]# scripts/mysql_install_db --user=mysql --basedir=/app/mysql --datadir=/mydata/
Installing MySQL system tables...2015-05-01 18:31:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-05-01 18:31:07 7432 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-01 18:31:07 7432 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-01 18:31:07 7432 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-01 18:31:07 7432 [Note] InnoDB: Using Linux native AIO
2015-05-01 18:31:07 7432 [Note] InnoDB: Using CPU crc32 instructions
2015-05-01 18:31:07 7432 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-01 18:31:07 7432 [Note] InnoDB: Completed initialization of buffer pool
2015-05-01 18:31:07 7432 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-05-01 18:31:07 7432 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-05-01 18:31:07 7432 [Note] InnoDB: Database physically writes the file full: wait...
2015-05-01 18:31:08 7432 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-05-01 18:31:08 7432 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-05-01 18:31:10 7432 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-05-01 18:31:10 7432 [Warning] InnoDB: New log files created, LSN=45781
2015-05-01 18:31:10 7432 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-05-01 18:31:10 7432 [Note] InnoDB: Doublewrite buffer created
2015-05-01 18:31:10 7432 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-01 18:31:10 7432 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-05-01 18:31:10 7432 [Note] InnoDB: Foreign key constraint system tables created
2015-05-01 18:31:10 7432 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-05-01 18:31:10 7432 [Note] InnoDB: Tablespace and datafile system tables created.
2015-05-01 18:31:10 7432 [Note] InnoDB: Waiting for purge to start
2015-05-01 18:31:10 7432 [Note] InnoDB: 5.6.12 started; log sequence number 0
2015-05-01 18:31:11 7432 [Note] Binlog end
2015-05-01 18:31:11 7432 [Note] InnoDB: FTS optimize thread exiting.
2015-05-01 18:31:11 7432 [Note] InnoDB: Starting shutdown...
2015-05-01 18:31:12 7432 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK

Filling help tables...2015-05-01 18:31:12 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-05-01 18:31:12 7455 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-01 18:31:12 7455 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-01 18:31:12 7455 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-01 18:31:12 7455 [Note] InnoDB: Using Linux native AIO
2015-05-01 18:31:12 7455 [Note] InnoDB: Using CPU crc32 instructions
2015-05-01 18:31:12 7455 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-01 18:31:12 7455 [Note] InnoDB: Completed initialization of buffer pool
2015-05-01 18:31:12 7455 [Note] InnoDB: Highest supported file format is Barracuda.
2015-05-01 18:31:12 7455 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-01 18:31:12 7455 [Note] InnoDB: Waiting for purge to start
2015-05-01 18:31:12 7455 [Note] InnoDB: 5.6.12 started; log sequence number 1625977
2015-05-01 18:31:12 7455 [Note] Binlog end
2015-05-01 18:31:12 7455 [Note] InnoDB: FTS optimize thread exiting.
2015-05-01 18:31:12 7455 [Note] InnoDB: Starting shutdown...
2015-05-01 18:31:14 7455 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK

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:

  /app/mysql/bin/mysqladmin -u root password 'new-password'
  /app/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

  /app/mysql/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 . ; /app/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /app/mysql/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

#把开机脚本传到etc目录下面
[root@localhost mysql]# cp support-files/mysql.server /etc/init.d/mysqld
cp: overwrite `/etc/init.d/mysqld'? y

#添加数据文件和mysql家目录
[root@localhost mysql]# vi /etc/init.d/mysqld
      1 #!/bin/sh
      2 # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detro        n HB
      3 # This file is public domain and comes with NO WARRANTY of any kind
      4
      5 # MySQL daemon start/stop script.
      6
      7 # Usually this is put in /etc/init.d (at least on machines SYSV R4 based
      8 # systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql.
      9 # When this is done the mysql server will be started when the machine is
     10 # started and shut down when the systems goes down.
     11
     12 # Comments to support chkconfig on RedHat Linux
     13 # chkconfig: 2345 64 36
     14 # description: A very fast and reliable SQL database engine.
     15
     16 # Comments to support LSB init script conventions
     17 ### BEGIN INIT INFO
     18 # Provides: mysql
     19 # Required-Start: $local_fs $network $remote_fs
     20 # Should-Start: ypbind nscd ldap ntpd xntpd
     21 # Required-Stop: $local_fs $network $remote_fs
     22 # Default-Start:  2 3 4 5
     23 # Default-Stop: 0 1 6
     24 # Short-Description: start and stop MySQL
     25 # Description: MySQL is a very fast and reliable SQL database engine.
     26 ### END INIT INFO
     27
     28 # If you install MySQL on some other places than /usr/local/mysql, then         you
     29 # have to do one of the following things for this script to work:
     30 #
     31 # - Run this script from within the MySQL installation directory
     32 # - Create a /etc/my.cnf file with the following information:
     33 #   [mysqld]
     34 #   basedir=<path-to-mysql-installation-directory>
     35 # - Add the above to any other configuration file (for example ~/.my.ini        )
     36 #   and copy my_print_defaults to /usr/bin
     37 # - Add the path to the mysql-installation-directory to the basedir vari        able
     38 #   below.
     39 #
     40 # If you want to affect other MySQL variables, you should make your chan        ges
     41 # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
     42
     43 # If you change base dir, you must also change datadir. These may get
     44 # overwritten by settings in the MySQL configuration files.
     45
     46 basedir=/app/mysql
     47 datadir=/mydata
     48
     49 # Default value, in seconds, afterwhich the script should timeout waitin        g
     50 # for server start.
     51 # Value here is overriden by value in my.cnf.
     52 # 0 means don't wait at all
     53 # Negative numbers mean to wait indefinitely
     54 service_startup_timeout=900
     55
     56 # Lock directory for RedHat / SuSE.
     57 lockdir='/var/lock/subsys'
     58 lock_file_path="$lockdir/mysql"
     59
     60 # The following variables are only set for letting mysql.server find thi        ngs.
     61
"/etc/rc.d/init.d/mysqld" 390L, 10897C written

#拷贝参数文件到、etc目录
[root@localhost mysql]# cp my.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf'? y


[root@localhost mysql]# vi /etc/my.cnf
  # For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
 basedir =/app/mysql
 datadir =/mydata
 port =3306
 server_id =1
 socket=/var/lib/mysql/mysql.sock
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

~
"/etc/my.cnf" 28L, 937C written

#添加开机启动服务
[root@localhost mysql]# chkconfig --add mysqld
[root@localhost mysql]# chkconfig --level 2345 mysqld off
[root@localhost mysql]# su - mysql


#重启mysql
[root@localhost mysql]# service mysqld restart
MySQL server PID file could not be found!                  [FAILED]
Starting MySQL..                                           [  OK  ]

#修改root密码
[root@localhost mysql]# bin/mysqladmin -u root password 'mysql'

-bash-4.1$ mysql -uroot -pmysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.12 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, 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>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29065182/viewspace-1745595/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29065182/viewspace-1745595/

基于分布式模型预测控制的多个固定翼无人机一致性控制(Matlab代码实现)内容概要:本文围绕“基于分布式模型预测控制的多个固定翼无人机一致性控制”展开,采用Matlab代码实现相关算法,属于顶级EI期刊的复现研究成果。文中重点研究了分布式模型预测控制(DMPC)在多无人机系统中的一致性控制问题,通过构建固定翼无人机的动力学模型,结合分布式协同控制策略,实现多无人机在复杂环境下的轨迹一致性和稳定协同飞行。研究涵盖了控制算法设计、系统建模、优化求解及仿真验证全过程,并提供了完整的Matlab代码支持,便于读者复现实验结果。; 适合人群:具备自动控制、无人机系统或优化算法基础,从事科研或工程应用的研究生、科研人员及自动化、航空航天领域的研发工程师;熟悉Matlab编程和基本控制理论者更佳; 使用场景及目标:①用于多无人机协同控制系统的算法研究与仿真验证;②支撑科研论文复现、毕业设计或项目开发;③掌握分布式模型预测控制在实际系统中的应用方法,提升对多智能体协同控制的理解与实践能力; 阅读建议:建议结合提供的Matlab代码逐模块分析,重点关注DMPC算法的构建流程、约束处理方式及一致性协议的设计逻辑,同时可拓展学习文中提及的路径规划、编队控制等相关技术,以深化对无人机集群控制的整体认知。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值