Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.6.14 MySQL Community Server (GPL)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trade of Oracle Corporation and/or its
affiliates. Other names may be trades of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show VARIABLES like '%max_allowed_packet%';
+--------------------------+------------+
| Variable_name            | Value      |
+--------------------------+------------+
| max_allowed_packet       | 4194304    |
| slave_max_allowed_packet | 1073741824 |
+--------------------------+------------+
2 rows in set (0.00 sec)mysql> set global max_allowed_packet = 2*1024*1024*10;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privileg
e(s) for this operation
mysql> set global max_allowed_packet = 16M;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privileg
e(s) for this operation
mysql>
使用的是mysql-5.6.14-win32

解决方案 »

  1.   

    没有权限
    grant all privileges on *.* to root@'%' identified by "123";
      

  2.   

    修改my.ini,添加  max_allowed_packet = 16M
      

  3.   


    刚用mysql,不懂怎么处理
    上面那句提示
    ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)
      

  4.   


    my.ini 是哪里的?
    我这里根目录有 my-default.ini 文件
    内容
    # For advice on how to change settings please see
    # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
    # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
    # *** default location during install, and will be replaced if you
    # *** upgrade to a newer version of MySQL.[mysqld]
    max_allowed_packet=32M# Remove leading # and set to the amount of RAM for the most important data
    # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    # innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging
    # changes to the binary log between backups.
    # log_bin# These are commonly set, remove the # and set as required.
    # basedir = .....
    # datadir = .....
    # port = .....
    # server_id = .....
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  
    但是还是不行哦
      

  5.   

    你的MYSQL服务的启动命令是什么? 看一下其中的参数文件名。如果没有,创建一个 my.ini
      

  6.   

    谢谢,新建了一个my.ini文件就OK了