Ubuntu15.10操作mysql5.6数据库
来源:互联网 发布:佳能调焦软件 编辑:程序博客网 时间:2024/05/05 17:26
Ubuntu Server下启动/停止/重启MySQL数据库的三种方式
系统环境:ubuntu server 12.10 x64(mysql为系统自带)
当我们需要修改MySQL的配置文件my.cnf(windows 下为 my.ini)来进行一些设置的时候,修改完之后我们需要重启MySQL。
my.cnf文件位置为:/ect/mysql/my.cnf
Waring:如果该文件配置错误,MySQL将无法启动。
下面介绍三种方式对MySQL进行启动/停止/重启操作:
启动mysql:
方式一:sudo /etc/init.d/mysql start
方式二:sudo start mysql
方式三:sudo service mysql start
停止mysql:
方式一:sudo /etc/init.d/mysql stop
方式二:sudo stop mysql
方式san:sudo service mysql stop
重启mysql:
方式一:sudo/etc/init.d/mysql restart
方式二:sudo restart mysql
方式三:sudo service mysql restart
安装mysql
(1)在终端下执行sudo apt-get install mysql-server-5.6 命令
(2)一路按TAB键 回车键,等安装好之后,再设置密码。即可
(3)安装成功之后,执行mysql -u root命令,进入数据库,如下:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.6.27-0ubuntu1 (Ubuntu)
Copyright (c) 2000, 2015, 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>
设置mysql开机自启动
开机自动启动
sudo update-rc.d -f mysql.server defaults
开机禁止自动启动
sudo update-rc.d -f mysql.server remove
- Ubuntu15.10操作mysql5.6数据库
- ubuntu15.04手动安装MySQL5.6.27数据库
- ubuntu15.10安装mysql数据库
- 1。ubuntu15.10+eclispse4.5+tomcat7+jdk8+mysql5环境搭建
- MySQL5.6 mysqldump 数据库备份的正确操作
- MySQL5.6 数据库安装
- Ubuntu15.04+Qt5.7+Caffe+Opencv2.4.10+MySql5.6配置.pro文件
- ubuntu15.04 mysql5.6.27编码格式配置
- ubuntu15.10 安装XX-Net 3.3.6
- mysql5.6更改数据库编码
- mysql5.6 数据库的安装
- mysql5.6配置主从数据库
- ubuntu15安装spark1.6
- ubuntu15.10 安装 lampp
- Ubuntu15.10 亲自体验
- ubuntu15.10 安装sikulix
- ubuntu15.10安装wireshark
- ubuntu15.10 配置tftp
- Eclipse调错——Type The type javax.servlet.http.HttpServletRequest cannot be res...
- 线段树求解区间第k大
- How to Advertise Android as a Bluetooth LE Peripheral
- 共用体练习
- HDU3572 Task Schedule(最大流)
- Ubuntu15.10操作mysql5.6数据库
- 校验经过base64编码的字符串是否是图片文件
- hdu 5641 BestCoder Round #75
- 线程间同步,条件变量
- 记一次Android ListView没有成功显示出来的原因
- 老--质价比
- .bash_profile和.bashrc的区别(如何设置生效)
- javaScript
- UINavigationController, UITabBarController