1。直接用mysqld手工启动

[root@ora11g bin]# ./mysqld --defaults-file=../my.cnf
 :: [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

 :: [ERROR] Aborting

 :: [Note] ./mysqld: Shutdown complete

[root@ora11g bin]# ./mysqld --defaults-file=../my.cnf --user=mysql
 :: InnoDB: The InnoDB memory heap is disabled
 :: InnoDB: Mutexes and rw_locks use InnoDB's own implementation
 :: InnoDB: Compressed tables use zlib
 :: InnoDB: Using Linux native AIO
 :: InnoDB: Initializing buffer pool, size = 128.0M
 :: InnoDB: Completed initialization of buffer pool
 :: InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
 ::  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
 ::  InnoDB: Waiting for the background threads to start
 :: InnoDB:  started; log sequence number
 :: [Note] Server
 :: [Note]   - '0.0.0.0' resolves to '0.0.0.0';
 :: [Note] Server socket created on IP: '0.0.0.0'.
 :: [Note] Event Scheduler: Loaded  events
 :: [Note] ./mysqld: ready for connections.
Version:   Source distribution
[root@ora11g ~]# ps -ef | grep mysql
mysql          : pts/    :: ./mysqld --defaults-file=../my.cnf --user=mysql
root           : pts/    :: grep mysql
[root@ora11g ~]# 

2.安全启动

[root@ora11g bin]# ./mysqld_safe --defaults-file=../my.cnf --user=mysql &
[]
[root@ora11g bin]#  :: mysqld_safe Logging to '/usr/local/mysql/data/ora11g.err'.
 :: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@ora11g bin]# ps -ef | grep mysql
root           : pts/    :: /bin/sh ./mysqld_safe --defaults-file=../my.cnf --user=mysql
mysql          : pts/    :: /usr/local/mysql/bin/mysqld --defaults-
root           : pts/    :: grep mysql
[root@ora11g bin]# 

3.用服务的方式启动

[root@ora11g support-files]#
[root@ora11g support-files]# ./mysql.server start
Starting MySQL                                             [  OK  ]
[root@ora11g support-files]# ps -ef | grep mysql
root              : pts/    :: /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/ora11g.pid
mysql         : pts/    :: /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-
root           : pts/    :: grep mysql
[root@ora11g support-files]# 

把mysql.server cp到 /etc/rc.d/init.d/mysql,再chkconfig --add mysql就ok了

[root@ora11g support-files]# cp mysql.server  /etc/rc.d/init.d/mysql
[root@ora11g support-files]# chkconfig --add mysql
[root@ora11g support-files]# chkconfig --list | grep mysql
mysql           :off   :off   :on    :on    :on    :on    :off
[root@ora11g support-files]# service mysqld stop
mysqld: unrecognized service
[root@ora11g support-files]# service mysql stop
Shutting down MySQL.                                       [  OK  ]
[root@ora11g support-files]# service mysql start
Starting MySQL..                                           [  OK  ]
[root@ora11g support-files]# ps -ef | grep mysql
root              : pts/    :: /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/ora11g.pid
mysql          : pts/    :: /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-
root           : pts/    :: grep mysql
[root@ora11g support-files]# 

查看mysql的启动时的参数:

[root@ora11g bin]# ./mysqld --help --verbose | less

mysql的启动的更多相关文章

  1. 关于在安装MySQL时报错"本地计算机上的mysql服务启动后停止,某些服务在未由其他服务或程序使用时将自动停止"的解决方法

    首先将你下载的MySQL安装或者解压(对应安装版和解压版),下载地址http://dev.mysql.com/downloads/mysql/ 然后复制你安装目录中的my-default.ini,更改 ...

  2. CentOS 7下MySQL服务启动失败的解决思路

    今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...

  3. Mysql服务启动的时候 如何加载配置文件

    Mysql服务启动的时候 如何引导配置文件 (启动加载顺序)

  4. MySQL 安装和启动服务,“本地计算机 上的 MySQL 服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。”

    MySQL 安装和启动服务,以及遇到的问题 MySQL版本: mysql-5.7.13-winx64.zip (免安装,解压放到程序文件夹即可,比如 C:\Program Files\mysql-5. ...

  5. 一台MySQL服务器启动多个端口

    一台MySQL服务器启动多个端口 在测试Mysql多主一从服务器,即一个从服务器多端口同步不同主库.本文记录了开启不同端口的操作. 详细步骤: 1.首先要先把my.cnf配置文件复制一份,开几个端口要 ...

  6. MySQL 安装 启动 基本语法概述

    MySQL 安装 启动 基本语法概述 MySQL安装和配置 我是直接使用安装包:mysql-installer-community-5.6.10.1.msi 安装的时候其中有几点要注意: 1.记住端口 ...

  7. MySQL的启动脚本

    MySQL的启动脚本#!/bin/bashmysql_port=3308mysql_username="admin"mysql_password="password&qu ...

  8. mysql无法启动

    当在安装mysql服务时,有时会遇到恶心的PID错误而导致安装后无法启动以下为针对mysql-5.5版本在安装mysql时所遇到的问题的解决方法. 1.可能是/usr/local/mysql/data ...

  9. linux 下mysql的启动 、调试、排错

    Linux 下 MySQL 启动与关闭 说明 一.启动 1.1  MySQL 进程 可以用ps 命令查看进程: [root@rac2 ~]# ps -ef|grep mysql root     21 ...

随机推荐

  1. linux下合并两个文件夹

    一.我想把自己自定义的软件统一放到man手册路径里.如何和现有的/usr/local/share文件夹合并起来,原来的文件还在? (1)下面是解压出的自定义的bashdb调试软件==>

  2. neutron 网络配置flat模式

    使用flat模式,直接使用物理网络的子网,配置如下:

  3. 常见的MYSQL高可用解决方案

    MySQL 是一种关系数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性.MySQL 软件采用了双授权政策(本词条"授权政策& ...

  4. MongoDB-Getting Started with the C# Driver

    简介:本文仅提供快速入门级别的使用C# Driver操作MongoDB,高手跳过 Downloading the C# Driver 猛击下载 添加相关的dll引用 MongoDB.Bson.dll ...

  5. JS添加删除DIV

    function addDiv(w,h){     //如果原来有“divCell”这个图层,先删除这个图层    deleteDiv();    //创建一个div       var my = d ...

  6. 修改MySQL中字段的类型和长度

    MySQL修改字段类型的命令是: mysql> alter table 表名 modify column 字段名 类型; 假设在MySQL中有一个表为:address,有一个字段为city 初始 ...

  7. ACM/ICPC 之 SPFA-兑换货币(POJ1860)

    //水题-SPFA解法 //套汇是指兑换货币后能使本金上升 //给定本金货币编号,货币间的汇率和手续费,求能否套汇成功 //Time:16Ms Memory:200K #include<iost ...

  8. Es6 学习笔记

    变量 let let用来声明变量,作用和var类似,所声明的变量只在let生命的代码块内有效. //1.不允许重复声明 let num = 2; let num = 3; //error //2.块级 ...

  9. Effective C++ -----条款02:尽量以const, enum, inline替换 #define

    class GamePlayer{private: static const int NumTurns = 5; int scores[NumTurns]; ...}; 万一你的编译器(错误地)不允许 ...

  10. Greedy:Bound Found(POJ 2566)

       神奇密码 题目大意:就是给你一个数组,要你找出连续的数的绝对值的和最接近t的那一串,并且要找出数组的上界和下界的下标,并显示他们的和 因为这一题的数有正有负,所以必须要先把和求出来,然后排序,然 ...