zoukankan      html  css  js  c++  java
  • MySQL问题

    # mysql -u root mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    解决:[root@ZHT02 ~]#  /etc/init.d/mysql stop
    Shutting down MySQL.. SUCCESS!
    [root@ZHT02 ~]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
    [1] 9707
    [root@ZHT02 ~]# 160518 13:37:27 mysqld_safe Logging to '/var/lib/mysql/ZHT02.err'.
    160518 13:37:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    ^C
    [root@ZHT02 ~]# mysql -u root mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 1
    Server version: 5.6.22-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

    Copyright (c) 2000, 2014, 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> UPDATE user SET Password=PASSWORD('1234') where USER='root';
    Query OK, 4 rows affected (0.00 sec)
    Rows matched: 4  Changed: 4  Warnings: 0

    mysql>  FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.00 sec)

    mysql> quit
    Bye

  • 相关阅读:
    JAVAGUI设计步骤
    JAVA接口基础知识总结
    静态关键字static用法。
    JAVA面向对象的多态性
    java封装的概念
    多线程
    关于集合类间的区别
    JAVA——异常
    java——内部类
    Java——接口
  • 原文地址:https://www.cnblogs.com/tianziru/p/5504963.html
Copyright © 2011-2022 走看看