zoukankan      html  css  js  c++  java
  • 在Ubuntu上安装Mysql

    安装mysql server:

    1、  sudo apt-get install mysql-server

    2、  如果出现Unable to locate package……,执行sudo apt-get update,然后再执行sudo apt-get upgrade,再执行sudo apt-get install mysql-server

    3、  进入mysql命令窗口,需要输入mysql  -h localhost –u root –p

    4、  接着输入安装时的密码

    5、  创建用户CREATE USER 'guo.liang'@'localhost' IDENTIFIED BY '851220';

    6、  授权GRANT ALL ON cookbook.* TO 'guo.liang'@'localhost';

    安装mysql workbench客户端:

    1、  sudo apt-get install mysql-client

    2、  sudo apt-get install mysql-workbench

    运行mysql workbench:

    1、  whereis mysql-workbench  查找在那个目录

    2、  /usr/bin/mysql-workbenth 运行mysql workbench


    Starting, Stopping and Restarting MySQL on Ubuntu

    To start, stop, and restart the MySQL service on Ubuntu, you can use the /etc/init.d/mysql script.

    You need to ssh to your Pod as root, or use sudo command. Here are each of the commands:

    Start:

    root@mypod:~# sudo /etc/init.d/mysql start

    Stop:

    root@mypod:~# sudo /etc/init.d/mysql stop

    Restart:

    root@mypod:~# sudo /etc/init.d/mysql restart

     
     

    A different way to do this, is to use “upstart” (which is what /etc/init.d/mysql links to) which works as follows:

    Start:

    root@mypod:~# sudo start mysql

    Stop:

    root@mypod:~# sudo stop mysql

    Restart:

    root@mypod:~# sudo restart mysql

  • 相关阅读:
    子程序定义-3
    子程序定义-2
    子程序定义-1
    MQ报 AMQ9259
    观nginx与lvs负载均衡的较量
    绑定变量值长度不一致,mismatch问题
    perl-printf 函数
    perl 运算符
    强制让SQL走谓词推入
    PGA概念
  • 原文地址:https://www.cnblogs.com/SuperLiangG/p/4336188.html
Copyright © 2011-2022 走看看