zoukankan      html  css  js  c++  java
  • centos 6.5 安装mysql

    步骤1:

    yum -y install mysql-server 

    步骤2:

    chkconfig mysqld on  

    步骤3:

    service mysqld start  
    mysql -u root 
    set password for root@localhost=password('root');  

    登录mysql创建新用户:

    create user 'test_user'@'%' identified by 'test_user';  

    .给新用户test_user授权,让他可以从外部登陆和本地登陆
    注意:@左边是用户名,右边是域名、IP和%,表示可以访问mysql的域名和IP,%表示外部任何地址都能访问。

    grant all privileges on *.* to 'test_user'@'localhost' identified by 'test_user';
    grant all privileges on *.* to 'test_user'@'%' identified by 'test_user';

     提示1130错误:

    Sql代码
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

    执行完后,再
    mysql:flush privileges; 

  • 相关阅读:
    去重
    JavaScript 数组
    变量
    2017.3.19 for
    2017.3.19 if,for
    2017.3.14
    2017.3.10
    2017.3.9
    2017.3.7-1
    2017.3.7
  • 原文地址:https://www.cnblogs.com/lvlv/p/4834036.html
Copyright © 2011-2022 走看看