红联Linux门户
Linux帮助

ubuntu15.10安装mysql数据库

发布时间:2015-12-21 15:19:25来源:linux网站作者:dmfrm

(1)在终端下执行sudo apt-get install mysql-server-5.6 命令


(2)一路按回车键,等安装好之后,再设置密码。


(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>  


现在就可以设置root密码了,执行grant all privileges on *.* to root@"%" identified by "passwd" ;把密码设置为passwd。


腾讯云CentOS7.0使用yum安装mysql:http://www.linuxdiyf.com/linux/16624.html

CentOS 7.1上编译安装MySQL 5.7.10:http://www.linuxdiyf.com/linux/16538.html

Ubuntu14.04编译安装mysql5.6.26:http://www.linuxdiyf.com/linux/14453.html

Ubuntu安装mysql和简单操作:http://www.linuxdiyf.com/linux/14327.html

Ununtu 15.04安装MySql(Django连接Mysql):http://www.linuxdiyf.com/linux/13783.html