关键词搜索

源码搜索 ×
×

linux下安装mysql的步骤详解

发布2017-11-20浏览7154次

详情内容

        以ubuntu为例, 执行:

1. sudo apt-get install mysql-server

2. sudo apt-get install mysql-client

3. sudo apt-get install libmysqlclient-dev

      安装完毕, 就是这么简单。 安装过程会提示输入密码, 建议你输入密码, 不过我只直接一路按enter坐过来的。


      sudo netstat -tap | grep mysql  命令用于检测是否安装成功, 如下:

taogeqq@taogeqq-virtual-machine:~$ sudo netstat -tap | grep mysql
tcp        0      0 localhost:mysql         *:*                     LISTEN      7019/mysqld     
taogeqq@taogeqq-virtual-machine:~$ 
       一切OK, 登录:

taogeqq@taogeqq-virtual-machine:~$ mysql -u root -p              
Enter password: 
       我直接按enter, 于是:
taogeqq@taogeqq-virtual-machine:~$ mysql -u root -p              
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2016, 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> 
        来看看:

  1. mysql> show databases;
  2. +--------------------+
  3. | Database |
  4. +--------------------+
  5. | information_schema |
  6. | mysql |
  7. | performance_schema |
  8. +--------------------+
  9. 3 rows in set (0.01 sec)
  10. mysql>
        如此简单。




相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载