mysql的启动
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的启动的更多相关文章
- 关于在安装MySQL时报错"本地计算机上的mysql服务启动后停止,某些服务在未由其他服务或程序使用时将自动停止"的解决方法
首先将你下载的MySQL安装或者解压(对应安装版和解压版),下载地址http://dev.mysql.com/downloads/mysql/ 然后复制你安装目录中的my-default.ini,更改 ...
- CentOS 7下MySQL服务启动失败的解决思路
今天,启动MySQL服务器失败,如下所示: [root@spark01 ~]# /etc/init.d/mysqld start Starting mysqld (via systemctl): Jo ...
- Mysql服务启动的时候 如何加载配置文件
Mysql服务启动的时候 如何引导配置文件 (启动加载顺序)
- MySQL 安装和启动服务,“本地计算机 上的 MySQL 服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。”
MySQL 安装和启动服务,以及遇到的问题 MySQL版本: mysql-5.7.13-winx64.zip (免安装,解压放到程序文件夹即可,比如 C:\Program Files\mysql-5. ...
- 一台MySQL服务器启动多个端口
一台MySQL服务器启动多个端口 在测试Mysql多主一从服务器,即一个从服务器多端口同步不同主库.本文记录了开启不同端口的操作. 详细步骤: 1.首先要先把my.cnf配置文件复制一份,开几个端口要 ...
- MySQL 安装 启动 基本语法概述
MySQL 安装 启动 基本语法概述 MySQL安装和配置 我是直接使用安装包:mysql-installer-community-5.6.10.1.msi 安装的时候其中有几点要注意: 1.记住端口 ...
- MySQL的启动脚本
MySQL的启动脚本#!/bin/bashmysql_port=3308mysql_username="admin"mysql_password="password&qu ...
- mysql无法启动
当在安装mysql服务时,有时会遇到恶心的PID错误而导致安装后无法启动以下为针对mysql-5.5版本在安装mysql时所遇到的问题的解决方法. 1.可能是/usr/local/mysql/data ...
- linux 下mysql的启动 、调试、排错
Linux 下 MySQL 启动与关闭 说明 一.启动 1.1 MySQL 进程 可以用ps 命令查看进程: [root@rac2 ~]# ps -ef|grep mysql root 21 ...
随机推荐
- Asp.net MVC中Html.Partial, RenderPartial, Action,RenderAction 区别和用法
Partial 和RenderPartial:这两个的性质都是一样, 只指把一个个View给镶入进来, 只是回传值有点不一样Partial 回传的一个Object (MvcHtmlString), 回 ...
- vs2008与windbg的使用
WinDbg是微软发布的一款相当优秀的源码级(source-level)调试工具,可以用于Kernel模式调试和用户模式调试,还可以调试Dump文件.使用windgb进行程序调试是一个很有必要的技能. ...
- OPCServer Modbus使用和配置
一,安装KEPware.Enhanced.OPC.DDE.KEPServer.(PLC数据传送给KEPServer,开发的程序用OPCServer读KEPServer) 设置ip地址后面是指的plc站 ...
- ffmpeg-20160629-git-bin.7z
ESC 退出 0 进度条开关 1 屏幕原始大小 2 屏幕1/2大小 3 屏幕1/3大小 4 屏幕1/4大小 S 下一帧 [ -2秒 ] +2秒 ; -1秒 ' +1秒 下一个帧 -> -5秒 f ...
- c语言实现面向对象OOC
这种问题比较锻炼思维,同时考察c和c++的掌握程度.如果你遇到过类似问题,此题意义自不必说.如果用c实现c++,主要解决如何实现封装,继承和多态三大问题,本文分两块说. 1.封装 // Example ...
- BestCoder25 1001.Harry and Magical Computer(hdu 5154) 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5154 题目意思:有 n 门 processes(编号依次为1,2,...,n),然后给出 m 种关系: ...
- Spring JMS ActiveMQ整合(转)
转载自:http://my.oschina.net/xiaoxishan/blog/381209#comment-list ActiveMQ学习笔记(四)http://my.oschina.net/x ...
- 【leetcode】Reverse Linked List(easy)
Reverse a singly linked list. 思路:没啥好说的.秒... ListNode* reverseList(ListNode* head) { ListNode * rList ...
- 【python】f.write()写入中文出错解决办法
一个出错的例子 #coding:utf-8 s = u'中文' f = open("test.txt","w") f.write(s) f.close() 原因 ...
- C#导出Excel动态列
一.用StreamWrite流对象,导出Excel 1. string _sPath = GenerateSalaryMonthlyReport(dgvSalarySum); System.Diagn ...